aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs104
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml2
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/>