diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-27 15:14:10 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-27 15:14:10 +0200 |
| commit | 9e42e1c87f3a206f0babc74760ac9a02d8d328f4 (patch) | |
| tree | be3be4cf23f524f430146af472883f63dd8bdfb7 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common | |
| parent | 894d05d59c0e1612903f1adbf908914f2df67ccc (diff) | |
| download | Tango-9e42e1c87f3a206f0babc74760ac9a02d8d328f4.tar.gz Tango-9e42e1c87f3a206f0babc74760ac9a02d8d328f4.zip | |
Implemented Deployment Slots!
Implemented Environment AD Groups.
Implemented Machine Studio environment selection.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common')
4 files changed, 39 insertions, 7 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/DeploymentSlots.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/DeploymentSlots.cs new file mode 100644 index 000000000..857f1e5ba --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/DeploymentSlots.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.MachineStudio.Common +{ + public enum DeploymentSlots + { + [Description("https://machineservice-dev.twine-srv.com")] + Development, + [Description("https://machineservice-test.twine-srv.com")] + Testing, + [Description("https://machineservice-stage.twine-srv.com")] + Staging, + [Description("https://machineservice.twine-srv.com")] + Production + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs index 2de954cbe..cbaeb9d2e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -45,11 +46,6 @@ namespace Tango.MachineStudio.Common public String LastVirtualMachineSerialNumber { get; set; } /// <summary> - /// Gets or sets the machine service address. - /// </summary> - public String MachineServiceAddress { get; set; } - - /// <summary> /// Gets or sets the allow beta release. /// </summary> public bool AcceptBetaRelease { get; set; } @@ -100,16 +96,30 @@ namespace Tango.MachineStudio.Common public WorkingEnvironment Environment { get; set; } /// <summary> + /// Gets or sets the deployment slot. + /// </summary> + public DeploymentSlots DeploymentSlot { get; set; } + + /// <summary> + /// Gets the machine service address. + /// </summary> + /// <returns></returns> + public String GetMachineServiceAddress() + { + return DeploymentSlot.ToDescription(); + } + + /// <summary> /// Initializes a new instance of the <see cref="MachineStudio"/> class. /// </summary> public MachineStudioSettings() { LastBounds = new Rect(); LoggingCategories = new List<LogCategory>(); - MachineServiceAddress = "http://machineservice.twine-srv.com/"; DefaultIssueReportTags = new List<string>(); StudioModulesBounds = new List<StudioModuleBounds>(); Environment = WorkingEnvironment.Remote; + DeploymentSlot = DeploymentSlots.Development; } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index 85b194173..58a0d5f7e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -94,6 +94,7 @@ <Compile Include="Controls\TableGrid.cs" /> <Compile Include="Converters\PermissionToVisibilityConverter.cs" /> <None Include="Converters\SecondsToGraphPointsConverter.cs" /> + <Compile Include="DeploymentSlots.cs" /> <Compile Include="Diagnostics\DefaultDiagnosticsFrameProvider.cs" /> <Compile Include="Diagnostics\IDiagnosticsFrameProvider.cs" /> <Compile Include="EventLogging\DefaultEventLogger.cs" /> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs index aae1fe70d..77828d490 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/MachineStudioUpdateService.cs @@ -15,7 +15,7 @@ namespace Tango.MachineStudio.Common.Update public MachineStudioUpdateService() { - address = SettingsManager.Default.GetOrCreate<MachineStudioSettings>().MachineServiceAddress + "/api/MachineStudio/"; + address = SettingsManager.Default.GetOrCreate<MachineStudioSettings>().GetMachineServiceAddress() + "/api/MachineStudio/"; _client = new WebTransportClient(); } |
