From c8926de01838d70891425fa630aa57e7a76d852e Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 12 Dec 2012 14:30:12 -0800 Subject: [PATCH] CS-17074: cloudstack UI - Advanced SG-enabled zone - Zone Wizard - When Advanced option is selected and Security Groups checkbox is checked, hypervisor dropdown will list only KVM option (if KVM is in listHypervisors API response). --- ui/scripts/zoneWizard.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js index 92e2230d760..0bfcaad8085 100755 --- a/ui/scripts/zoneWizard.js +++ b/ui/scripts/zoneWizard.js @@ -370,11 +370,20 @@ var array1 = []; var firstOption = "XenServer"; - if(args.context.zones[0]['network-model'] == "Advanced" && args.context.zones[0]['zone-advanced-sg-enabled'] == "on") + var nonSupportedHypervisors = {}; + if(args.context.zones[0]['network-model'] == "Advanced" && args.context.zones[0]['zone-advanced-sg-enabled'] == "on") { firstOption = "KVM"; + nonSupportedHypervisors["XenServer"] = 1; //to developers: comment this line if you need to test Advanced SG-enabled zone with XenServer hypervisor + nonSupportedHypervisors["VMware"] = 1; + nonSupportedHypervisors["BareMetal"] = 1; + nonSupportedHypervisors["Ovm"] = 1; + } if(items != null) { for(var i = 0; i < items.length; i++) { + if(items[i].name in nonSupportedHypervisors) + continue; + if(items[i].name == firstOption) array1.unshift({id: items[i].name, description: items[i].name}); else