diff options
| author | Roy <Roy.mail.net@gmail.com> | 2022-11-20 19:06:28 +0200 |
|---|---|---|
| committer | Roy <Roy.mail.net@gmail.com> | 2022-11-20 19:06:28 +0200 |
| commit | 7c7e27fad7deb4c82a5ca7e5cb19184fa324b8d5 (patch) | |
| tree | 4ebd799531535c2415e9640d2a17e9763c83e2df /Software/Visual_Studio/Azure/Tango.AzureUtils.UI | |
| parent | fa2c00989b50258d1195925030ed1da2a1d6d040 (diff) | |
| download | Tango-7c7e27fad7deb4c82a5ca7e5cb19184fa324b8d5.tar.gz Tango-7c7e27fad7deb4c82a5ca7e5cb19184fa324b8d5.zip | |
AzureUtils PPC VersionTag kind of working.
Diffstat (limited to 'Software/Visual_Studio/Azure/Tango.AzureUtils.UI')
4 files changed, 34 insertions, 10 deletions
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml index aadd7a6d8..40c1b8223 100644 --- a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml +++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml @@ -57,7 +57,7 @@ <TextBlock Text="{Binding ElementName=control,Path=MachineStudioVersion.Version}"></TextBlock> <TextBlock FontWeight="SemiBold">Tango Application Version:</TextBlock> - <TextBlock Text="{Binding ElementName=control,Path=TangoVersion.Version}"></TextBlock> + <TextBlock Text="{Binding ElementName=control,Path=TangoVersion.VersionAndTag}"></TextBlock> <TextBlock FontWeight="SemiBold">Tango Firmware Version::</TextBlock> <TextBlock Text="{Binding ElementName=control,Path=TangoVersion.FirmwareVersion}"></TextBlock> diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs index a0e01e160..51303d126 100644 --- a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs +++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs @@ -26,6 +26,22 @@ namespace Tango.AzureUtils.UI.Controls /// </summary> public partial class WebAppPropertiesControl : UserControl { + public IWebAppBase WebApp + { + get { return (IWebAppBase)GetValue(WebAppProperty); } + set { SetValue(WebAppProperty, value); } + } + public static readonly DependencyProperty WebAppProperty = + DependencyProperty.Register("WebApp", typeof(IWebAppBase), typeof(WebAppPropertiesControl), new PropertyMetadata(null, (d, e) => (d as WebAppPropertiesControl).UpdateControl())); + + public String PPCVersionTag + { + get { return (String)GetValue(PPCVersionTagProperty); } + set { SetValue(PPCVersionTagProperty, value); } + } + public static readonly DependencyProperty PPCVersionTagProperty = + DependencyProperty.Register("PPCVersionTag", typeof(String), typeof(WebAppPropertiesControl), new PropertyMetadata(null, (d, e) => (d as WebAppPropertiesControl).UpdateControl())); + public MachineServiceSettings Settings { get { return (MachineServiceSettings)GetValue(SettingsProperty); } @@ -99,15 +115,18 @@ namespace Tango.AzureUtils.UI.Controls public WebAppPropertiesControl() { InitializeComponent(); + } - DataContextChanged += WebAppPropertiesControl_DataContextChanged; + private void WebAppPropertiesControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) + { + UpdateControl(); } - private async void WebAppPropertiesControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) + private async void UpdateControl() { - if (DataContext != null && DataContext is IWebAppBase) + if (WebApp != null && WebApp is IWebAppBase) { - IWebAppBase app = DataContext as IWebAppBase; + IWebAppBase app = WebApp as IWebAppBase; try { @@ -124,7 +143,7 @@ namespace Tango.AzureUtils.UI.Controls var azure = await AzureUtilsAuthenticationFactory.AuthenticateOrGetAsync(); var databaseManager = new DatabaseManager(azure); - TangoVersion = await databaseManager.GetLatestPPCVersion(app); + TangoVersion = await databaseManager.GetLatestPPCVersion(app, PPCVersionTag); MachineStudioVersion = await databaseManager.GetLatestMachineStudioVersion(app); FseVersion = await databaseManager.GetLatestFSEVersion(app, FSEBuildVariants.FSE); TwineRSMVersion = await databaseManager.GetLatestFSEVersion(app, FSEBuildVariants.TwineRSM); diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/EnvironmentFirmwareUpgradeViewVM.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/EnvironmentFirmwareUpgradeViewVM.cs index 964febbd8..931182c90 100644 --- a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/EnvironmentFirmwareUpgradeViewVM.cs +++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/EnvironmentFirmwareUpgradeViewVM.cs @@ -51,7 +51,7 @@ namespace Tango.AzureUtils.UI.ViewModels public EnvironmentFirmwareUpgradeViewVM() { - UpgradeFirmwareCommand = new RelayCommand(UpgradeFirmware,() => FilePath != null); + UpgradeFirmwareCommand = new RelayCommand(UpgradeFirmware, () => FilePath != null); BrowseFileCommand = new RelayCommand(BrowseFile); } @@ -93,7 +93,7 @@ namespace Tango.AzureUtils.UI.ViewModels IsFree = false; - await _firmwareManager.InjectFirmwarePackage(SelectedDeploymentSlot, FilePath); + await _firmwareManager.InjectFirmwarePackage(SelectedDeploymentSlot, FilePath, null); } catch (Exception ex) { diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentUpgradeView.xaml b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentUpgradeView.xaml index 249dbabc6..5b6491a48 100644 --- a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentUpgradeView.xaml +++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentUpgradeView.xaml @@ -32,7 +32,7 @@ </ComboBox.ItemTemplate> </ComboBox> - <localControls:WebAppPropertiesControl VerticalAlignment="Top" Margin="0 20 0 0" DataContext="{Binding SelectedSourceApp}" /> + <localControls:WebAppPropertiesControl VerticalAlignment="Top" Margin="0 20 0 0" PPCVersionTag="{Binding Config.PPCVersionTag}" WebApp="{Binding SelectedSourceApp}" /> </DockPanel> </GroupBox> </Grid> @@ -52,6 +52,11 @@ <CheckBox Click="OnConfigChanged" Margin="0 5 0 0" IsChecked="{Binding Config.CopyTwineRSMStorageBlobs}" >Upgrade Twine RSM Blob Storage</CheckBox> <CheckBox Click="OnConfigChanged" Margin="0 5 0 0" IsChecked="{Binding Config.UpgradeTwineRSMDatabaseVersion}" >Upgrade Twine RSM Database Version</CheckBox> <CheckBox Click="OnConfigChanged" Margin="0 5 0 0" IsChecked="{Binding Config.CopyMachineServiceFiles}" >Upgrade Machine Service</CheckBox> + + <StackPanel Margin="0 5 0 0"> + <TextBlock FontSize="10">PPC Version Tag</TextBlock> + <TextBox x:Name="txtPPCVersionTag" Text="{Binding Config.PPCVersionTag,Mode=TwoWay,Delay=500,UpdateSourceTrigger=PropertyChanged}"></TextBox> + </StackPanel> </StackPanel> </GroupBox> @@ -75,7 +80,7 @@ </ComboBox.ItemTemplate> </ComboBox> - <localControls:WebAppPropertiesControl VerticalAlignment="Top" Margin="0 20 0 0" DataContext="{Binding SelectedTargetApp}" /> + <localControls:WebAppPropertiesControl VerticalAlignment="Top" Margin="0 20 0 0" PPCVersionTag="{Binding Config.PPCVersionTag}" WebApp="{Binding SelectedTargetApp}" /> </DockPanel> </GroupBox> </Grid> |
