diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-05-02 14:15:19 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-05-02 14:15:19 +0300 |
| commit | 18cf37b20f217a1f3e5aeff94e48dbefb25f0e1b (patch) | |
| tree | 1f39a5bc8c0845051bb978a01a489fc986f54f23 /Software/Visual_Studio/Azure | |
| parent | 8b35520dd5b9214ddf78898ed49c0b5942dc2d37 (diff) | |
| download | Tango-18cf37b20f217a1f3e5aeff94e48dbefb25f0e1b.tar.gz Tango-18cf37b20f217a1f3e5aeff94e48dbefb25f0e1b.zip | |
Azure Utils Improvements.
Diffstat (limited to 'Software/Visual_Studio/Azure')
| -rw-r--r-- | Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs | 104 | ||||
| -rw-r--r-- | Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml | 2 |
2 files changed, 96 insertions, 10 deletions
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 70561311f..fede74347 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 @@ -168,9 +168,14 @@ namespace Tango.AzureUtils.UI.Controls { IsBusy = true; + + TangoVersion = null; + EurekaVersion = null; + X1Version = null; MachineStudioVersion = null; FseVersion = null; + TwineRSMVersion = null; MachineServiceVersion = null; HostNames = app.HostNames.Select(x => x).ToList(); @@ -179,19 +184,95 @@ namespace Tango.AzureUtils.UI.Controls var azure = await AzureUtilsAuthenticationFactory.AuthenticateOrGetAsync(); var databaseManager = new DatabaseManager(azure); - TangoVersion = await databaseManager.GetLatestTangoVersion(app, MachineTypes.TS1800, PPCVersionTag); - EurekaVersion = await databaseManager.GetLatestTangoVersion(app, MachineTypes.Eureka, EurekaVersionTag); - X1Version = await databaseManager.GetLatestTangoVersion(app, MachineTypes.X1, X1VersionTag); - MachineStudioVersion = await databaseManager.GetLatestMachineStudioVersion(app); - FseVersion = await databaseManager.GetLatestFSEVersion(app, FSEBuildVariants.FSE); - TwineRSMVersion = await databaseManager.GetLatestFSEVersion(app, FSEBuildVariants.TwineRSM); - FtpManager ftpManager = new FtpManager(azure); - MachineServiceVersion = await ftpManager.GetMachineServiceVersion(app); + if (app != WebApp) return; + + //PPC + try + { + TangoVersion = await databaseManager.GetLatestTangoVersion(app, MachineTypes.TS1800, PPCVersionTag); + } + catch (Exception ex) + { + ShowError(app, ex.Message); + } + + if (app != WebApp) return; + + //Twine X4 + try + { + EurekaVersion = await databaseManager.GetLatestTangoVersion(app, MachineTypes.Eureka, EurekaVersionTag); + } + catch (Exception ex) + { + ShowError(app, ex.Message); + } + + if (app != WebApp) return; + + //Twine X1 + try + { + X1Version = await databaseManager.GetLatestTangoVersion(app, MachineTypes.X1, X1VersionTag); + } + catch (Exception ex) + { + ShowError(app, ex.Message); + } + + if (app != WebApp) return; + + //Machine Studio + try + { + MachineStudioVersion = await databaseManager.GetLatestMachineStudioVersion(app); + } + catch (Exception ex) + { + ShowError(app, ex.Message); + } + + if (app != WebApp) return; + + //FSE + try + { + FseVersion = await databaseManager.GetLatestFSEVersion(app, FSEBuildVariants.FSE); + } + catch (Exception ex) + { + ShowError(app, ex.Message); + } + + if (app != WebApp) return; + + //Twine Studio + try + { + TwineRSMVersion = await databaseManager.GetLatestFSEVersion(app, FSEBuildVariants.TwineRSM); + } + catch (Exception ex) + { + ShowError(app, ex.Message); + } + + if (app != WebApp) return; + + //Machine Service + try + { + FtpManager ftpManager = new FtpManager(azure); + MachineServiceVersion = await ftpManager.GetMachineServiceVersion(app); + } + catch (Exception ex) + { + ShowError(app, ex.Message); + } } catch (Exception ex) { - Debug.WriteLine(ex); + ShowError(app, ex.Message); } finally { @@ -199,5 +280,10 @@ namespace Tango.AzureUtils.UI.Controls } } } + + private void ShowError(IWebAppBase app, String error) + { + MessageBox.Show(Application.Current.MainWindow, error, app.Name, MessageBoxButton.OK, MessageBoxImage.Warning); + } } } diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml index 16a742df9..46a11ed37 100644 --- a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml +++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml @@ -6,7 +6,7 @@ xmlns:views="clr-namespace:Tango.AzureUtils.UI.Views" xmlns:local="clr-namespace:Tango.AzureUtils.UI" mc:Ignorable="d" - Title="Azure Utils" Height="800" Width="1280" WindowStartupLocation="CenterScreen"> + Title="Azure Utils" Height="930" Width="1280" WindowStartupLocation="CenterScreen"> <Grid> <views:MainView/> |
