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 <letsibogo.ramadi@citrix.com>
This commit is contained in:
Letsibogo Ramadi 2017-05-04 14:09:26 +01:00
parent 76b3c05b9a
commit 0c7cf8678b
2 changed files with 21 additions and 15 deletions

View File

@ -301,6 +301,7 @@ namespace XenAdmin.Wizards.NewVMWizard
switch (templateType) switch (templateType)
{ {
case VM.VmTemplateType.Windows: case VM.VmTemplateType.Windows:
case VM.VmTemplateType.LegacyWindows:
return Messages.NEWVMWIZARD_TEMPLATEPAGE_WINDOWS; return Messages.NEWVMWIZARD_TEMPLATEPAGE_WINDOWS;
case VM.VmTemplateType.Centos: case VM.VmTemplateType.Centos:
return Messages.NEWVMWIZARD_TEMPLATEPAGE_CENTOS; return Messages.NEWVMWIZARD_TEMPLATEPAGE_CENTOS;
@ -339,6 +340,7 @@ namespace XenAdmin.Wizards.NewVMWizard
case VM.VmTemplateType.Custom: case VM.VmTemplateType.Custom:
return Resources._000_UserTemplate_h32bit_16; return Resources._000_UserTemplate_h32bit_16;
case VM.VmTemplateType.Windows: case VM.VmTemplateType.Windows:
case VM.VmTemplateType.LegacyWindows:
return Resources.windows_h32bit_16; return Resources.windows_h32bit_16;
case VM.VmTemplateType.Centos: case VM.VmTemplateType.Centos:
return Resources.centos_16x; return Resources.centos_16x;

View File

@ -1018,21 +1018,22 @@ namespace XenAPI
NoTemplate = 0,//it's not a template NoTemplate = 0,//it's not a template
Custom = 1, Custom = 1,
Windows = 2, Windows = 2,
Centos = 3, LegacyWindows = 3,
CoreOS = 4, Centos = 4,
Debian = 5, CoreOS = 5,
NeoKylin = 6, Debian = 6,
Oracle = 7, NeoKylin = 7,
RedHat = 8, Oracle = 8,
SciLinux = 9, RedHat = 9,
Suse = 10, SciLinux = 10,
Ubuntu = 11, Suse = 11,
Citrix = 12, Ubuntu = 12,
Solaris = 13, Citrix = 13,
Misc = 14, Solaris = 14,
Snapshot = 15, Misc = 15,
SnapshotFromVmpp = 16, Snapshot = 16,
Count = 17 //bump this if values are added SnapshotFromVmpp = 17,
Count = 18 //bump this if values are added
} }
public VmTemplateType TemplateType public VmTemplateType TemplateType
@ -1074,6 +1075,9 @@ namespace XenAPI
if (os.Contains("scientific")) if (os.Contains("scientific"))
return VmTemplateType.SciLinux; return VmTemplateType.SciLinux;
if (os.Contains("legacy windows"))
return VmTemplateType.LegacyWindows;
if (os.Contains("windows")) if (os.Contains("windows"))
return VmTemplateType.Windows; return VmTemplateType.Windows;