aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Azure/Tango.AzureUtils.UI
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2020-02-04 16:32:43 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2020-02-04 16:32:43 +0200
commit5bf3a7b36b3ccc7942f4e8e3fa227a38c04a8451 (patch)
tree03019be5bddc677ddb440fa00affc9b7c24aa1ce /Software/Visual_Studio/Azure/Tango.AzureUtils.UI
parentc6a0f97efd7fc804e761086db3179443d1414df7 (diff)
downloadTango-5bf3a7b36b3ccc7942f4e8e3fa227a38c04a8451.tar.gz
Tango-5bf3a7b36b3ccc7942f4e8e3fa227a38c04a8451.zip
Working on azure utils.
Diffstat (limited to 'Software/Visual_Studio/Azure/Tango.AzureUtils.UI')
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/App.config56
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/App.xaml12
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/AzureDashboardViewModel.cs29
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Converters/IWebAppBaseToDisplayNameConverter.cs38
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml19
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml.cs40
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Managers/DefaultStatusManager.cs45
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Managers/IStatusManager.cs19
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Resources/Colors.xaml11
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Resources/Converters.xaml39
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Tango.AzureUtils.UI.csproj49
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModelLocator.cs47
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/EnvironmentCreationViewVM.cs23
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/EnvironmentUpgradeViewVM.cs96
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/MainViewVM.cs121
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentCreationView.xaml19
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentCreationView.xaml.cs28
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentUpgradeView.xaml75
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentUpgradeView.xaml.cs28
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/MainView.xaml51
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/MainView.xaml.cs28
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/packages.config1
22 files changed, 830 insertions, 44 deletions
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/App.config b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/App.config
index 2b12e43f8..26e48b10f 100644
--- a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/App.config
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/App.config
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
- <startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
- </startup>
+ <configSections>
+ <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+ <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+ </configSections>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+ </startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
@@ -13,6 +17,52 @@
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
</dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
+ <entityFramework>
+ <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
+ <providers>
+ <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+ </providers>
+ </entityFramework>
</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/App.xaml b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/App.xaml
index 160510bb5..92695c778 100644
--- a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/App.xaml
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/App.xaml
@@ -2,8 +2,16 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Tango.AzureUtils.UI"
- StartupUri="MainWindow.xaml">
+ StartupUri="MainWindow.xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ d1p1:Ignorable="d"
+ xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006">
<Application.Resources>
-
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="/Resources/Colors.xaml"></ResourceDictionary>
+ <ResourceDictionary Source="/Resources/Converters.xaml"></ResourceDictionary>
+ </ResourceDictionary.MergedDictionaries>
+ </ResourceDictionary>
</Application.Resources>
</Application>
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/AzureDashboardViewModel.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/AzureDashboardViewModel.cs
new file mode 100644
index 000000000..80431db3b
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/AzureDashboardViewModel.cs
@@ -0,0 +1,29 @@
+using Microsoft.Azure.Management.AppService.Fluent;
+using Microsoft.Azure.Management.Fluent;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.AzureUtils.UI.Managers;
+using Tango.Core.DI;
+using Tango.SharedUI;
+
+namespace Tango.AzureUtils.UI
+{
+ public abstract class AzureDashboardViewModel : ViewModel
+ {
+ [TangoInject]
+ public IStatusManager StatusManager { get; set; }
+
+ public virtual void OnApplicationReady()
+ {
+
+ }
+
+ public virtual void OnAuthenticated(IAzure azure, List<IWebAppBase> apps)
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Converters/IWebAppBaseToDisplayNameConverter.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Converters/IWebAppBaseToDisplayNameConverter.cs
new file mode 100644
index 000000000..3433dfc24
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Converters/IWebAppBaseToDisplayNameConverter.cs
@@ -0,0 +1,38 @@
+using Microsoft.Azure.Management.AppService.Fluent;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace Tango.AzureUtils.UI.Converters
+{
+ public class IWebAppBaseToDisplayNameConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ IWebAppBase app = value as IWebAppBase;
+
+ if (app != null)
+ {
+ if (app is IDeploymentSlot)
+ {
+ return $"{(app as IDeploymentSlot).Parent.Name} => {app.Name}";
+ }
+ else
+ {
+ return app.Name;
+ }
+ }
+
+ return value;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml
index 4190337ce..7985f7985 100644
--- a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml
@@ -3,23 +3,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:views="clr-namespace:Tango.AzureUtils.UI.Views"
xmlns:local="clr-namespace:Tango.AzureUtils.UI"
mc:Ignorable="d"
- Title="Azure Utils" Height="700" Width="1280">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="100"/>
- <RowDefinition Height="1*"/>
- </Grid.RowDefinitions>
-
- <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="40">Azure Utils</TextBlock>
+ Title="Azure Utils" Height="900" Width="1280">
- <Grid Grid.Row="1">
- <TabControl Margin="10">
- <TabItem Header="Environment Copy Wizard">
-
- </TabItem>
- </TabControl>
- </Grid>
+ <Grid>
+ <views:MainView/>
</Grid>
</Window>
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml.cs
index 2ba632f76..73f192319 100644
--- a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/MainWindow.xaml.cs
@@ -12,6 +12,8 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using Tango.Core.DI;
+using Tango.SharedUI;
namespace Tango.AzureUtils.UI
{
@@ -20,38 +22,28 @@ namespace Tango.AzureUtils.UI
/// </summary>
public partial class MainWindow : Window
{
- private static string app_id = "be33437c-5052-449f-ab9d-a88d008eae24";
- private static string client_secret = "bf67fb6f-4d06-4893-988c-6b347aff23d6";
- private static string tenant_id = "2ebd63a5-bc2f-41dc-9066-4409ed5e5dd4";
- private static string subscription_id = "10c8aa60-3b15-4e0d-b412-6aeef90e5e91";
-
- Tango.AzureUtils.Deployment.DeploymentManager manager = new Deployment.DeploymentManager(new AzureUtilsCredentials()
- {
- ClientID = app_id,
- ClientSecret = client_secret,
- TenantID = tenant_id,
- SubscriptionID = subscription_id
- });
+ private bool preventIsFreeChange;
public MainWindow()
{
InitializeComponent();
-
- Test();
+ ContentRendered += MainWindow_ContentRendered;
}
- private async void Test()
+ private void MainWindow_ContentRendered(object sender, EventArgs e)
{
- var apps = await manager.GetAllWebAppsAsync();
-
- var machineService = apps.SingleOrDefault(x => x.Name == "MachineService");
-
- var devSlot = await machineService.DeploymentSlots.GetByNameAsync("MachineService-DEV");
- var testSlot = await machineService.DeploymentSlots.GetByNameAsync("MachineService-TEST");
-
- await manager.OpenSQLExaminerData(devSlot, testSlot);
+ TangoIOC.Default.GetAllInstancesByBase<AzureDashboardViewModel>().ToList().ForEach(x => { x.OnApplicationReady(); x.PropertyChanged += ViewModel_PropertyChanged; });
+ }
- var a = 5;
+ private void ViewModel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+ if (!preventIsFreeChange && e.PropertyName == nameof(ViewModel.IsFree))
+ {
+ preventIsFreeChange = true;
+ var viewModel = sender as AzureDashboardViewModel;
+ TangoIOC.Default.GetAllInstancesByBase<AzureDashboardViewModel>().Where(x => x != viewModel).ToList().ForEach(x => x.IsFree = viewModel.IsFree);
+ preventIsFreeChange = false;
+ }
}
}
}
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Managers/DefaultStatusManager.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Managers/DefaultStatusManager.cs
new file mode 100644
index 000000000..59c2cdc40
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Managers/DefaultStatusManager.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Input;
+
+namespace Tango.AzureUtils.UI.Managers
+{
+ public class DefaultStatusManager : IStatusManager
+ {
+ public event EventHandler<AzureUtilsProgressEventArgs> StatusUpdated;
+
+ public void UpdateStatus(AzureUtilsStage stage, string message, bool isIndeterminate = false)
+ {
+ UpdateStatus(new AzureUtilsProgressEventArgs()
+ {
+ IsIndeterminate = isIndeterminate,
+ Message = message,
+ Stage = stage,
+ Maximum = 100,
+ Progress = 0
+ });
+ }
+
+ public void UpdateStatus(AzureUtilsProgressEventArgs progress)
+ {
+ if (progress.IsIndeterminate || (progress.Maximum == 0 && progress.Progress == 0))
+ {
+ Mouse.OverrideCursor = Cursors.Wait;
+ }
+ else
+ {
+ Mouse.OverrideCursor = null;
+ }
+
+ StatusUpdated?.Invoke(this, progress);
+ }
+
+ public void UpdateStatus(Exception ex)
+ {
+ UpdateStatus(AzureUtilsStage.Error, ex.Message, false);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Managers/IStatusManager.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Managers/IStatusManager.cs
new file mode 100644
index 000000000..691e573ec
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Managers/IStatusManager.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.AzureUtils.UI.Managers
+{
+ public interface IStatusManager
+ {
+ event EventHandler<AzureUtilsProgressEventArgs> StatusUpdated;
+
+ void UpdateStatus(AzureUtilsStage stage, String message, bool isIndeterminate = false);
+
+ void UpdateStatus(AzureUtilsProgressEventArgs progress);
+
+ void UpdateStatus(Exception ex);
+ }
+}
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Resources/Colors.xaml b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Resources/Colors.xaml
new file mode 100644
index 000000000..efc198008
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Resources/Colors.xaml
@@ -0,0 +1,11 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:local="clr-namespace:Tango.AzureUtils.UI.Resources">
+
+ <SolidColorBrush x:Key="PrimaryBackgroundBrush" Color="White"></SolidColorBrush>
+ <SolidColorBrush x:Key="SecondaryBackgroundBrush" Color="#E6E6E6"></SolidColorBrush>
+ <SolidColorBrush x:Key="LightBorderBrush" Color="#A5A5A5"></SolidColorBrush>
+
+ <SolidColorBrush x:Key="PrimaryForegroundBrush" Color="#3E3E3E"></SolidColorBrush>
+
+</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Resources/Converters.xaml b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Resources/Converters.xaml
new file mode 100644
index 000000000..36c68c859
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Resources/Converters.xaml
@@ -0,0 +1,39 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:localConverters="clr-namespace:Tango.AzureUtils.UI.Converters"
+ xmlns:local="clr-namespace:Tango.AzureUtils.UI.Resources">
+
+ <localConverters:IWebAppBaseToDisplayNameConverter x:Key="IWebAppBaseToDisplayNameConverter" />
+
+ <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
+ <converters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
+ <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
+ <converters:DateTimeUTCToShortDateConverter x:Key="DateTimeUTCToShortDateConverter" />
+ <converters:MathOperatorConverter x:Key="MathOperatorConverter" />
+ <converters:IsSegmentGradientConverter x:Key="IsSegmentGradientConverter" />
+ <converters:IsSegmentGradientToVisibilityConverter x:Key="IsSegmentGradientToVisibilityConverter" />
+ <converters:SegmentToBrushConverterMulti x:Key="SegmentToBrushConverterMulti" />
+ <converters:SegmentLengthToWidthConverter x:Key="SegmentLengthToWidthConverter" />
+ <converters:WidthHeightToRectConverter x:Key="WidthHeightToRectConverter" />
+ <converters:OneToPercentConverter x:Key="OneToPercentConverter" />
+ <converters:SmallerThanToBooleanConverter x:Key="SmallerThanToBooleanConverter" />
+ <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
+ <converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
+ <converters:TimeSpanToTwoDigitsTimeConverter x:Key="TimeSpanToTwoDigitsTimeConverter" />
+ <converters:TimeSpanToLabelConverter x:Key="TimeSpanToLabelConverter" />
+ <converters:GreaterThanToBooleanConverter x:Key="GreaterThanToBooleanConverter" />
+ <converters:ByteArrayToFileSizeConverter x:Key="ByteArrayToFileSizeConverter" />
+ <converters:EnumToVisibilityConverter x:Key="EnumToVisibilityConverter" />
+ <converters:EnumToBooleanConverter x:Key="EnumToBooleanConverter" />
+ <converters:DateTimeUTCToStringConverter x:Key="DateTimeUTCToStringConverter" />
+ <converters:NullObjectToBooleanConverter x:Key="NullObjectToBooleanConverter" />
+ <converters:IsNullToVisibilityConverter x:Key="IsNullToVisibilityConverter" />
+ <converters:StringToLinesConverter x:Key="StringToLinesConverter" />
+ <converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter" />
+ <converters:StringEllipsisConverter x:Key="StringEllipsisConverter" />
+ <converters:DateTimeUTCToShortDateTimeConverter x:Key="DateTimeUTCToShortDateTimeConverter" />
+ <converters:TimeSpanToMinutesConverter x:Key="TimeSpanToMinutesConverter" />
+ <converters:TimeSpanToSecondsConverter x:Key="TimeSpanToSecondsConverter" />
+
+</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Tango.AzureUtils.UI.csproj b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Tango.AzureUtils.UI.csproj
index c2b723760..4f67722f4 100644
--- a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Tango.AzureUtils.UI.csproj
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Tango.AzureUtils.UI.csproj
@@ -35,6 +35,12 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
+ </Reference>
+ <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
+ </Reference>
<Reference Include="Hyak.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Hyak.Common.1.2.2\lib\net452\Hyak.Common.dll</HintPath>
</Reference>
@@ -159,6 +165,7 @@
<HintPath>..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
+ <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.IdentityModel" />
@@ -186,6 +193,23 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
+ <Compile Include="AzureDashboardViewModel.cs" />
+ <Compile Include="Converters\IWebAppBaseToDisplayNameConverter.cs" />
+ <Compile Include="Managers\DefaultStatusManager.cs" />
+ <Compile Include="Managers\IStatusManager.cs" />
+ <Compile Include="ViewModelLocator.cs" />
+ <Compile Include="ViewModels\EnvironmentCreationViewVM.cs" />
+ <Compile Include="ViewModels\EnvironmentUpgradeViewVM.cs" />
+ <Compile Include="ViewModels\MainViewVM.cs" />
+ <Compile Include="Views\EnvironmentCreationView.xaml.cs">
+ <DependentUpon>EnvironmentCreationView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\EnvironmentUpgradeView.xaml.cs">
+ <DependentUpon>EnvironmentUpgradeView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Views\MainView.xaml.cs">
+ <DependentUpon>MainView.xaml</DependentUpon>
+ </Compile>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -198,6 +222,26 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
+ <Page Include="Resources\Colors.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Resources\Converters.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Views\EnvironmentCreationView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Views\EnvironmentUpgradeView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Views\MainView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
@@ -231,10 +275,15 @@
<Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
<Name>Tango.Core</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\Tango.SharedUI\Tango.SharedUI.csproj">
+ <Project>{8491D07B-C1F6-4B62-A412-41B9FD2D6538}</Project>
+ <Name>Tango.SharedUI</Name>
+ </ProjectReference>
<ProjectReference Include="..\Tango.AzureUtils\Tango.AzureUtils.csproj">
<Project>{4a6b97e5-5eba-4702-a016-6f4004f14b08}</Project>
<Name>Tango.AzureUtils</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModelLocator.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModelLocator.cs
new file mode 100644
index 000000000..a522d62cc
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModelLocator.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.AzureUtils.UI.Managers;
+using Tango.AzureUtils.UI.ViewModels;
+using Tango.Core.DI;
+
+namespace Tango.AzureUtils.UI
+{
+ public static class ViewModelLocator
+ {
+ static ViewModelLocator()
+ {
+ TangoIOC.Default.Register<MainViewVM>();
+ TangoIOC.Default.Register<EnvironmentUpgradeViewVM>();
+ TangoIOC.Default.Register<EnvironmentCreationViewVM>();
+
+ TangoIOC.Default.Register<IStatusManager, DefaultStatusManager>();
+ }
+
+ public static MainViewVM MainViewVM
+ {
+ get
+ {
+ return TangoIOC.Default.GetInstance<MainViewVM>();
+ }
+ }
+
+ public static EnvironmentUpgradeViewVM EnvironmentUpgradeViewVM
+ {
+ get
+ {
+ return TangoIOC.Default.GetInstance<EnvironmentUpgradeViewVM>();
+ }
+ }
+
+ public static EnvironmentCreationViewVM EnvironmentCreationViewVM
+ {
+ get
+ {
+ return TangoIOC.Default.GetInstance<EnvironmentCreationViewVM>();
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/EnvironmentCreationViewVM.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/EnvironmentCreationViewVM.cs
new file mode 100644
index 000000000..919e361e1
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/EnvironmentCreationViewVM.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.Azure.Management.AppService.Fluent;
+using Microsoft.Azure.Management.Fluent;
+
+namespace Tango.AzureUtils.UI.ViewModels
+{
+ public class EnvironmentCreationViewVM : AzureDashboardViewModel
+ {
+ public override void OnApplicationReady()
+ {
+
+ }
+
+ public override void OnAuthenticated(IAzure azure, List<IWebAppBase> apps)
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/EnvironmentUpgradeViewVM.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/EnvironmentUpgradeViewVM.cs
new file mode 100644
index 000000000..56228e1c5
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/EnvironmentUpgradeViewVM.cs
@@ -0,0 +1,96 @@
+using Microsoft.Azure.Management.AppService.Fluent;
+using Microsoft.Azure.Management.Fluent;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.AzureUtils.Deployment;
+using Tango.Core.Commands;
+using Tango.SharedUI;
+
+namespace Tango.AzureUtils.UI.ViewModels
+{
+ public class EnvironmentUpgradeViewVM : AzureDashboardViewModel
+ {
+ private List<IWebAppBase> _apps;
+ public List<IWebAppBase> Apps
+ {
+ get { return _apps; }
+ set { _apps = value; RaisePropertyChangedAuto(); }
+ }
+
+ private IWebAppBase _selectedSourceApp;
+ public IWebAppBase SelectedSourceApp
+ {
+ get { return _selectedSourceApp; }
+ set { _selectedSourceApp = value; RaisePropertyChangedAuto(); }
+ }
+
+ private IWebAppBase _selectedTargetAPp;
+ public IWebAppBase SelectedTargetApp
+ {
+ get { return _selectedTargetAPp; }
+ set { _selectedTargetAPp = value; RaisePropertyChangedAuto(); }
+ }
+
+ private DeploymentManager _deploymentManager;
+ public DeploymentManager DeploymentManager
+ {
+ get { return _deploymentManager; }
+ set { _deploymentManager = value; RaisePropertyChangedAuto(); }
+ }
+
+ private bool _canUpgrade;
+ public bool CanUpgrade
+ {
+ get { return _canUpgrade; }
+ set { _canUpgrade = value; RaisePropertyChangedAuto(); }
+ }
+
+ public RelayCommand ValidateUpgradeCommand { get; set; }
+
+ public EnvironmentUpgradeViewVM()
+ {
+ ValidateUpgradeCommand = new RelayCommand(() => ValidateUpgrade());
+ }
+
+ public override void OnAuthenticated(IAzure azure, List<IWebAppBase> apps)
+ {
+ Apps = apps;
+
+ SelectedSourceApp = Apps.FirstOrDefault();
+ SelectedTargetApp = Apps.FirstOrDefault();
+
+ DeploymentManager = new DeploymentManager(azure);
+ DeploymentManager.Progress += (x, e) => StatusManager.UpdateStatus(e);
+ DeploymentManager.UpgradeConfiguration.PropertyChanged += (x, e) => CanUpgrade = false;
+ }
+
+ private async void ValidateUpgrade()
+ {
+ if (SelectedSourceApp == null || SelectedTargetApp == null)
+ {
+ return;
+ }
+
+ try
+ {
+ IsFree = false;
+ StatusManager.UpdateStatus(AzureUtilsStage.Validating, "Validating configuration...", true);
+ await DeploymentManager.ValidateUpgrade(SelectedSourceApp, SelectedTargetApp);
+ CanUpgrade = true;
+ StatusManager.UpdateStatus(AzureUtilsStage.Ready, "Configuration validated successfully.");
+ }
+ catch (Exception ex)
+ {
+ CanUpgrade = false;
+ StatusManager.UpdateStatus(ex);
+ }
+ finally
+ {
+ IsFree = true;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/MainViewVM.cs
new file mode 100644
index 000000000..958d1b857
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModels/MainViewVM.cs
@@ -0,0 +1,121 @@
+using Microsoft.Azure.Management.AppService.Fluent;
+using Microsoft.Azure.Management.Fluent;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Input;
+using Tango.AzureUtils.Deployment;
+using Tango.AzureUtils.UI.Managers;
+using Tango.Core.Commands;
+using Tango.Core.DI;
+using Tango.SharedUI;
+
+namespace Tango.AzureUtils.UI.ViewModels
+{
+ public class MainViewVM : AzureDashboardViewModel
+ {
+ private static string app_id = "be33437c-5052-449f-ab9d-a88d008eae24";
+ private static string client_secret = "bf67fb6f-4d06-4893-988c-6b347aff23d6";
+ private static string tenant_id = "2ebd63a5-bc2f-41dc-9066-4409ed5e5dd4";
+ private static string subscription_id = "10c8aa60-3b15-4e0d-b412-6aeef90e5e91";
+
+ private IAzure _azure;
+
+ #region Properties
+
+ private bool _isInitialized;
+ public bool IsInitialized
+ {
+ get { return _isInitialized; }
+ set { _isInitialized = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
+ }
+
+ private AzureUtilsProgressEventArgs _progress;
+ public AzureUtilsProgressEventArgs Progress
+ {
+ get { return _progress; }
+ set { _progress = value; RaisePropertyChangedAuto(); }
+ }
+
+ #endregion
+
+ #region Commands
+
+ public RelayCommand InitCommand { get; set; }
+
+ #endregion
+
+ public MainViewVM()
+ {
+ InitCommand = new RelayCommand(Init, () => !IsInitialized);
+ }
+
+ public override void OnApplicationReady()
+ {
+ StatusManager.StatusUpdated += StatusManager_StatusUpdated;
+ StatusManager.UpdateStatus(AzureUtilsStage.Ready, "Waiting for authentication...", false);
+ }
+
+ private void StatusManager_StatusUpdated(object sender, AzureUtilsProgressEventArgs e)
+ {
+ Progress = e;
+ }
+
+ public async void Init()
+ {
+ try
+ {
+ IsFree = false;
+
+ StatusManager.UpdateStatus(AzureUtilsStage.Initializing, "Authenticating...", true);
+ _azure = await AzureUtilsAuthenticationFactory.AuthenticateOrGetAsync(new AzureUtilsCredentials()
+ {
+ ClientID = app_id,
+ ClientSecret = client_secret,
+ TenantID = tenant_id,
+ SubscriptionID = subscription_id
+ });
+
+ List<IWebAppBase> allApps = new List<IWebAppBase>();
+
+ StatusManager.UpdateStatus(AzureUtilsStage.Initializing, "Retrieving machine service deployment slots...", true);
+
+ var apps = await _azure.WebApps.ListAsync();
+
+ foreach (var app in apps)
+ {
+ if (app.Name.Contains("Machine"))
+ {
+ allApps.Add(app);
+ }
+
+ var slots = await app.DeploymentSlots.ListAsync();
+
+ foreach (var slot in slots)
+ {
+ if (slot.Name.Contains("Machine"))
+ {
+ allApps.Add(slot);
+ }
+ }
+ }
+
+ IsInitialized = true;
+
+ StatusManager.UpdateStatus(AzureUtilsStage.Ready, "Authenticated successfully.", false);
+
+ TangoIOC.Default.GetAllInstancesByBase<AzureDashboardViewModel>().Where(x => x != this).ToList().ForEach(x => x.OnAuthenticated(_azure, allApps.ToList()));
+ }
+ catch (Exception ex)
+ {
+ StatusManager.UpdateStatus(ex);
+ }
+ finally
+ {
+ IsFree = true;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentCreationView.xaml b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentCreationView.xaml
new file mode 100644
index 000000000..6c886deb7
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentCreationView.xaml
@@ -0,0 +1,19 @@
+<UserControl x:Class="Tango.AzureUtils.UI.Views.EnvironmentCreationView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:vm="clr-namespace:Tango.AzureUtils.UI.ViewModels"
+ xmlns:global="clr-namespace:Tango.AzureUtils.UI"
+ xmlns:local="clr-namespace:Tango.AzureUtils.UI.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="700"
+ d:DesignWidth="1100"
+ d:DataContext="{d:DesignInstance Type=vm:EnvironmentUpgradeViewVM, IsDesignTimeCreatable=False}"
+ DataContext="{x:Static global:ViewModelLocator.EnvironmentUpgradeViewVM}"
+ Background="{StaticResource PrimaryBackgroundBrush}"
+ Foreground="{StaticResource PrimaryForegroundBrush}">
+ <Grid>
+
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentCreationView.xaml.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentCreationView.xaml.cs
new file mode 100644
index 000000000..1a45db254
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentCreationView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.AzureUtils.UI.Views
+{
+ /// <summary>
+ /// Interaction logic for EnvironmentCreationView.xaml
+ /// </summary>
+ public partial class EnvironmentCreationView : UserControl
+ {
+ public EnvironmentCreationView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentUpgradeView.xaml b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentUpgradeView.xaml
new file mode 100644
index 000000000..67eaa52e2
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentUpgradeView.xaml
@@ -0,0 +1,75 @@
+<UserControl x:Class="Tango.AzureUtils.UI.Views.EnvironmentUpgradeView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:vm="clr-namespace:Tango.AzureUtils.UI.ViewModels"
+ xmlns:global="clr-namespace:Tango.AzureUtils.UI"
+ xmlns:local="clr-namespace:Tango.AzureUtils.UI.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="700"
+ d:DesignWidth="1100"
+ d:DataContext="{d:DesignInstance Type=vm:EnvironmentUpgradeViewVM, IsDesignTimeCreatable=False}"
+ DataContext="{x:Static global:ViewModelLocator.EnvironmentUpgradeViewVM}"
+ Background="{StaticResource PrimaryBackgroundBrush}"
+ Foreground="{StaticResource PrimaryForegroundBrush}">
+ <Grid Margin="5">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*" />
+ <ColumnDefinition Width="300" />
+ <ColumnDefinition Width="1*" />
+ </Grid.ColumnDefinitions>
+
+ <Grid>
+ <GroupBox Header="Source App" Padding="10">
+ <StackPanel>
+ <ComboBox ItemsSource="{Binding Apps}" SelectedItem="{Binding SelectedSourceApp}">
+ <ComboBox.ItemTemplate>
+ <DataTemplate>
+ <TextBlock Text="{Binding Converter={StaticResource IWebAppBaseToDisplayNameConverter}}"></TextBlock>
+ </DataTemplate>
+ </ComboBox.ItemTemplate>
+ </ComboBox>
+ </StackPanel>
+ </GroupBox>
+ </Grid>
+
+ <Grid Grid.Column="1" Margin="20 0">
+ <StackPanel>
+ <GroupBox Header="Upgrade Configuration" Padding="10">
+ <StackPanel>
+ <CheckBox IsChecked="{Binding DeploymentManager.UpgradeConfiguration.UpgradeMachineStudio}" >Upgrade Machine Studio</CheckBox>
+ <CheckBox Margin="0 5 0 0" IsChecked="{Binding DeploymentManager.UpgradeConfiguration.UpgradePPC}" >Upgrade PPC</CheckBox>
+ <CheckBox Margin="0 5 0 0" IsChecked="{Binding DeploymentManager.UpgradeConfiguration.UpgradeMachineService}" >Upgrade Machine Service</CheckBox>
+ </StackPanel>
+ </GroupBox>
+
+ <StackPanel Margin="0 20 0 0">
+ <Button Padding="20" Command="{Binding ValidateUpgradeCommand}">Validate</Button>
+ <StackPanel Margin="0 20 0 0" IsEnabled="{Binding CanUpgrade}">
+ <Button Padding="20">Upgrade Database Schema</Button>
+ <Button Margin="0 10 0 0" Padding="20">Upgrade Database Static Collections</Button>
+ <Button Margin="0 10 0 0" Padding="20">Upgrade Machine Studio</Button>
+ <Button Margin="0 10 0 0" Padding="20">Upgrade PPC</Button>
+ <Button Margin="0 10 0 0" Padding="20">Upgrade Machine Service</Button>
+ <Button Margin="0 10 0 0" Padding="20">Full Upgrade</Button>
+ </StackPanel>
+ </StackPanel>
+ </StackPanel>
+ </Grid>
+
+ <Grid Grid.Column="2">
+ <GroupBox Header="Target App" Padding="10">
+ <StackPanel>
+ <ComboBox ItemsSource="{Binding Apps}" SelectedItem="{Binding SelectedTargetApp}">
+ <ComboBox.ItemTemplate>
+ <DataTemplate>
+ <TextBlock Text="{Binding Converter={StaticResource IWebAppBaseToDisplayNameConverter}}"></TextBlock>
+ </DataTemplate>
+ </ComboBox.ItemTemplate>
+ </ComboBox>
+ </StackPanel>
+ </GroupBox>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentUpgradeView.xaml.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentUpgradeView.xaml.cs
new file mode 100644
index 000000000..f904a2aef
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/EnvironmentUpgradeView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.AzureUtils.UI.Views
+{
+ /// <summary>
+ /// Interaction logic for EnvironmentUpgradeView.xaml
+ /// </summary>
+ public partial class EnvironmentUpgradeView : UserControl
+ {
+ public EnvironmentUpgradeView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/MainView.xaml b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/MainView.xaml
new file mode 100644
index 000000000..fcef3e2ea
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/MainView.xaml
@@ -0,0 +1,51 @@
+<UserControl x:Class="Tango.AzureUtils.UI.Views.MainView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:vm="clr-namespace:Tango.AzureUtils.UI.ViewModels"
+ xmlns:global="clr-namespace:Tango.AzureUtils.UI"
+ xmlns:views="clr-namespace:Tango.AzureUtils.UI.Views"
+ xmlns:local="clr-namespace:Tango.AzureUtils.UI.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="900"
+ d:DesignWidth="1280"
+ d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}"
+ DataContext="{x:Static global:ViewModelLocator.MainViewVM}"
+ Background="{StaticResource PrimaryBackgroundBrush}"
+ Foreground="{StaticResource PrimaryForegroundBrush}"
+ IsEnabled="{Binding IsFree}">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="100"/>
+ <RowDefinition Height="1*"/>
+ <RowDefinition Height="70"/>
+ </Grid.RowDefinitions>
+
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10 0 0 0" FontSize="50">Azure Utils</TextBlock>
+
+ <Button Command="{Binding InitCommand}" HorizontalAlignment="Right" VerticalAlignment="Center" Padding="30 10" Margin="10" FontSize="20">Authenticate</Button>
+
+ <Grid Grid.Row="1" IsEnabled="{Binding IsInitialized}">
+ <TabControl Margin="10">
+ <TabItem Header="Environment Upgrade Dashboard" Padding="5">
+ <views:EnvironmentUpgradeView/>
+ </TabItem>
+ <TabItem Header="Environment Creation Wizard" Padding="5">
+ <views:EnvironmentCreationView/>
+ </TabItem>
+ </TabControl>
+ </Grid>
+
+ <Border Grid.Row="2" Background="{StaticResource SecondaryBackgroundBrush}" BorderBrush="{StaticResource LightBorderBrush}" BorderThickness="0 1 0 0">
+ <DockPanel Margin="10 0">
+ <TextBlock DockPanel.Dock="Top" VerticalAlignment="Center" FontSize="18" FontWeight="SemiBold" Text="{Binding Progress.Stage,Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock>
+
+ <StackPanel DockPanel.Dock="Top" VerticalAlignment="Bottom" Margin="0 0 0 5">
+ <TextBlock VerticalAlignment="Bottom" Text="{Binding Progress.Message}"></TextBlock>
+ <ProgressBar Foreground="{StaticResource PrimaryForegroundBrush}" Height="15" VerticalAlignment="Bottom" Margin="0 2 0 0" IsIndeterminate="{Binding Progress.IsIndeterminate}" Maximum="{Binding Progress.Maximum}" Value="{Binding Progress.Progress}"></ProgressBar>
+ </StackPanel>
+ </DockPanel>
+ </Border>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/MainView.xaml.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/MainView.xaml.cs
new file mode 100644
index 000000000..b1cab3c49
--- /dev/null
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Views/MainView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.AzureUtils.UI.Views
+{
+ /// <summary>
+ /// Interaction logic for MainView.xaml
+ /// </summary>
+ public partial class MainView : UserControl
+ {
+ public MainView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/packages.config b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/packages.config
index 9f49cc92c..14a601db9 100644
--- a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/packages.config
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/packages.config
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
+ <package id="EntityFramework" version="6.2.0" targetFramework="net461" />
<package id="Hyak.Common" version="1.2.2" targetFramework="net461" />
<package id="Microsoft.Azure.Common" version="2.2.1" targetFramework="net461" />
<package id="Microsoft.Azure.KeyVault" version="3.0.1" targetFramework="net461" />