From 0c7cf8678b1b33a763340ef1ea11110343a0c2ad Mon Sep 17 00:00:00 2001 From: Letsibogo Ramadi Date: Thu, 4 May 2017 14:09:26 +0100 Subject: [PATCH] CA-251526 - Change template order in New VM wizard Moved "Legacy Windows" template to the bottom of the Windows templates to discourage users from selecting it and avoid it being selected by default at the top of the list as was the case. Signed-off-by: Letsibogo Ramadi --- XenAdmin/Wizards/NewVMWizard/Page_Template.cs | 2 ++ XenModel/XenAPI-Extensions/VM.cs | 34 +++++++++++-------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/XenAdmin/Wizards/NewVMWizard/Page_Template.cs b/XenAdmin/Wizards/NewVMWizard/Page_Template.cs index e5bd3fac2..583f6a3c1 100644 --- a/XenAdmin/Wizards/NewVMWizard/Page_Template.cs +++ b/XenAdmin/Wizards/NewVMWizard/Page_Template.cs @@ -301,6 +301,7 @@ namespace XenAdmin.Wizards.NewVMWizard switch (templateType) { case VM.VmTemplateType.Windows: + case VM.VmTemplateType.LegacyWindows: return Messages.NEWVMWIZARD_TEMPLATEPAGE_WINDOWS; case VM.VmTemplateType.Centos: return Messages.NEWVMWIZARD_TEMPLATEPAGE_CENTOS; @@ -339,6 +340,7 @@ namespace XenAdmin.Wizards.NewVMWizard case VM.VmTemplateType.Custom: return Resources._000_UserTemplate_h32bit_16; case VM.VmTemplateType.Windows: + case VM.VmTemplateType.LegacyWindows: return Resources.windows_h32bit_16; case VM.VmTemplateType.Centos: return Resources.centos_16x; diff --git a/XenModel/XenAPI-Extensions/VM.cs b/XenModel/XenAPI-Extensions/VM.cs index 71c090df9..0d9d09d33 100644 --- a/XenModel/XenAPI-Extensions/VM.cs +++ b/XenModel/XenAPI-Extensions/VM.cs @@ -1018,21 +1018,22 @@ namespace XenAPI NoTemplate = 0,//it's not a template Custom = 1, Windows = 2, - Centos = 3, - CoreOS = 4, - Debian = 5, - NeoKylin = 6, - Oracle = 7, - RedHat = 8, - SciLinux = 9, - Suse = 10, - Ubuntu = 11, - Citrix = 12, - Solaris = 13, - Misc = 14, - Snapshot = 15, - SnapshotFromVmpp = 16, - Count = 17 //bump this if values are added + LegacyWindows = 3, + Centos = 4, + CoreOS = 5, + Debian = 6, + NeoKylin = 7, + Oracle = 8, + RedHat = 9, + SciLinux = 10, + Suse = 11, + Ubuntu = 12, + Citrix = 13, + Solaris = 14, + Misc = 15, + Snapshot = 16, + SnapshotFromVmpp = 17, + Count = 18 //bump this if values are added } public VmTemplateType TemplateType @@ -1074,6 +1075,9 @@ namespace XenAPI if (os.Contains("scientific")) return VmTemplateType.SciLinux; + if (os.Contains("legacy windows")) + return VmTemplateType.LegacyWindows; + if (os.Contains("windows")) return VmTemplateType.Windows;