aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml3
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs14
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml2
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils/FTP/FtpManager.cs17
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Properties/AssemblyInfo.cs2
5 files changed, 36 insertions, 2 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 aadfb7918..6eb78c808 100644
--- a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml
@@ -64,6 +64,9 @@
<TextBlock FontWeight="SemiBold">Tango FSE Version:</TextBlock>
<TextBlock Text="{Binding ElementName=control,Path=FseVersion.Version}"></TextBlock>
+
+ <TextBlock FontWeight="SemiBold">Machine Service Version:</TextBlock>
+ <TextBlock Text="{Binding ElementName=control,Path=MachineServiceVersion}"></TextBlock>
</controls:TableGrid>
</StackPanel>
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 8888dfc02..129550d14 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
@@ -14,6 +14,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Tango.AzureUtils.Database;
+using Tango.AzureUtils.FTP;
using Tango.BL.Entities;
namespace Tango.AzureUtils.UI.Controls
@@ -63,6 +64,16 @@ namespace Tango.AzureUtils.UI.Controls
public static readonly DependencyProperty MachineStudioVersionProperty =
DependencyProperty.Register("MachineStudioVersion", typeof(MachineStudioVersion), typeof(WebAppPropertiesControl), new PropertyMetadata(null));
+ public String MachineServiceVersion
+ {
+ get { return (String)GetValue(MachineServiceVersionProperty); }
+ set { SetValue(MachineServiceVersionProperty, value); }
+ }
+ public static readonly DependencyProperty MachineServiceVersionProperty =
+ DependencyProperty.Register("MachineServiceVersion", typeof(String), typeof(WebAppPropertiesControl), new PropertyMetadata(null));
+
+
+
public bool IsBusy
{
get { return (bool)GetValue(IsBusyProperty); }
@@ -97,6 +108,9 @@ namespace Tango.AzureUtils.UI.Controls
TangoVersion = await databaseManager.GetLatestPPCVersion(app);
MachineStudioVersion = await databaseManager.GetLatestMachineStudioVersion(app);
FseVersion = await databaseManager.GetLatestFSEVersion(app);
+
+ FtpManager ftpManager = new FtpManager(azure);
+ MachineServiceVersion = await ftpManager.GetMachineServiceVersion(app);
}
catch { }
finally
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml
index 6eaedea2a..d23fd41d8 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="920" Width="1280">
+ Title="Azure Utils" Height="950" Width="1280" WindowStartupLocation="CenterScreen">
<Grid>
<views:MainView/>
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils/FTP/FtpManager.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils/FTP/FtpManager.cs
index 5a174dcb2..021426d12 100644
--- a/Software/Visual_Studio/Azure/Tango.AzureUtils/FTP/FtpManager.cs
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils/FTP/FtpManager.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
using System.Security.Authentication;
using System.Text;
@@ -115,5 +116,21 @@ namespace Tango.AzureUtils.FTP
var downloadResults = await DownloadWebAppFiles(sourceApp, webAppFilesTempFolder);
var uploadResults = await UploadWebAppFiles(targetApp, webAppFilesTempFolder);
}
+
+ public async Task<String> GetMachineServiceVersion(IWebAppBase app)
+ {
+ var exeTempFile = TemporaryManager.CreateImaginaryFile(".dll");
+
+ var profile = await app.GetPublishingProfileAsync();
+
+ using (var ftp = CreateFtpClient(profile.FtpUrl, profile.FtpUsername, profile.FtpPassword))
+ {
+ await ftp.ConnectAsync();
+ await ftp.DownloadFileAsync(exeTempFile, "/site/wwwroot/bin/Tango.MachineService.dll");
+ String version = FileVersionInfo.GetVersionInfo(exeTempFile).ProductVersion;
+ await exeTempFile.DeleteAsync();
+ return version;
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Web/Tango.MachineService/Properties/AssemblyInfo.cs
index 142676f82..386a7c4b8 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Properties/AssemblyInfo.cs
@@ -24,4 +24,4 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("2.0.*")]
+[assembly: AssemblyVersion("3.0.0.0")]