From 2f884dd0bc28b0a40e5f84ced324171fed3edf3f Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 1 Dec 2011 13:55:42 -0800 Subject: [PATCH] cloudStack 3.0 new UI - VM Wizard - select network/securityGroup step - having dedicate direct tagged default network or not is no longer a criterion for showing network or security groups. --- ui/scripts/instances.js | 49 +++++------------------------------------ 1 file changed, 6 insertions(+), 43 deletions(-) diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index 0f71a96b4bb..bddf1fae0ee 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -203,51 +203,14 @@ } } - if (selectedZoneObj.securitygroupsenabled == false) { //show network container - //vmWizardShowNetworkContainer($thisPopup); + if (selectedZoneObj.securitygroupsenabled == false) { //show network container step5ContainerType = 'select-network'; } - else if (selectedZoneObj.securitygroupsenabled == true) { // if security group is enabled - var hasDedicatedDirectTaggedDefaultNetwork = false; - $.ajax({ - url: createURL("listNetworks&type=Shared&domainid="+g_domainid+"&account="+g_account+"&zoneId="+args.currentData.zoneid), - dataType: "json", - async: false, - success: function(json) { - var items = json.listnetworksresponse.network; - if (items != null && items.length > 0) { - for (var i = 0; i < items.length; i++) { - if(items[i].isshared == false && items[i].isdefault == true) { //dedicated, is default one. - var broadcasturi = items[i].broadcasturi; //e.g. "vlan://53" - if(broadcasturi != null && broadcasturi.length > 0) { - var vlanIdString = broadcasturi.substring(7); //e.g. "53" - if(isNaN(vlanIdString) == false) - hasDedicatedDirectTaggedDefaultNetwork = true; - } - } - } - } - } - }); - - //hasDedicatedDirectTaggedDefaultNetwork = true; //for testing only, comment it out before checking in!!!!!!!!!!!! - if(hasDedicatedDirectTaggedDefaultNetwork == true) { - if(confirm("Do you wish to launch your instance on your own private dedicated network?")) { - step5ContainerType = 'select-network'; - } - else { - if(selectedHypervisor == "VMware" || g_directAttachSecurityGroupsEnabled != "true") - step5ContainerType = 'nothing-to-select'; - else - step5ContainerType = 'select-security-group'; - } - } - else { - if(selectedHypervisor == "VMware" || g_directAttachSecurityGroupsEnabled != "true") - step5ContainerType = 'nothing-to-select'; - else - step5ContainerType = 'select-security-group'; - } + else if (selectedZoneObj.securitygroupsenabled == true) { // if security group is enabled + if(selectedHypervisor == "VMware" || g_directAttachSecurityGroupsEnabled != "true") + step5ContainerType = 'nothing-to-select'; + else + step5ContainerType = 'select-security-group'; } //step5ContainerType = 'nothing-to-select'; //for testing only, comment it out before checking in!!!!!!!!!!!!