You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2012/12/06 19:44:33 UTC

git commit: CLOUDSTACK-537: cloudstack UI - Advanced SG-enabled zone - zone wizard - cluster dropdown - Make "KVM" the 1st option in dropdown.

Updated Branches:
  refs/heads/master 1fbf2a286 -> 391e873bd


CLOUDSTACK-537: cloudstack UI - Advanced SG-enabled zone - zone wizard - cluster dropdown - Make "KVM" the 1st option in dropdown.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/391e873b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/391e873b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/391e873b

Branch: refs/heads/master
Commit: 391e873bd94df1f9bcd8e897910e1d5b9c20f84f
Parents: 1fbf2a2
Author: Jessica Wang <je...@citrix.com>
Authored: Thu Dec 6 10:43:50 2012 -0800
Committer: Jessica Wang <je...@citrix.com>
Committed: Thu Dec 6 10:43:50 2012 -0800

----------------------------------------------------------------------
 ui/scripts/zoneWizard.js |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/391e873b/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index ef874d4..92e2230 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -368,9 +368,14 @@
                 success: function(json) {								 
 									var items = json.listhypervisorsresponse.hypervisor;
 									var array1 = [];
+									
+									var firstOption = "XenServer";
+									if(args.context.zones[0]['network-model']	== "Advanced" && args.context.zones[0]['zone-advanced-sg-enabled'] ==	"on")
+									  firstOption = "KVM";
+									
 									if(items != null) {
 									  for(var i = 0; i < items.length; i++) {
-										  if(items[i].name == "XenServer")
+										  if(items[i].name == firstOption)
 											  array1.unshift({id: items[i].name, description: items[i].name});
 											else
 											  array1.push({id: items[i].name, description: items[i].name});