Updated Branches:
  refs/heads/master af79da5d8 -> 811c904fc

CLOUDSTACK-537: cloudstack UI - Advanced SG-Enabled zone - zone wizard - 
network offering dropdown - populate only network offerings that include 
SecurityGroup service.


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

Branch: refs/heads/master
Commit: 811c904fc34bd3608dacbaf7b4e2892e0af524d8
Parents: af79da5
Author: Jessica Wang <[email protected]>
Authored: Mon Nov 26 13:06:30 2012 -0800
Committer: Jessica Wang <[email protected]>
Committed: Mon Nov 26 13:06:30 2012 -0800

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


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/811c904f/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index c43a747..e238a19 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -455,15 +455,20 @@
                                                                                
                });
                                                                                
        }
                                                                                
});
-                                                                               
                                                                                
-                                                                               
if(args.hypervisor != "VMware" && args.hypervisor != "BareMetal") {
-                                                                               
  availableNetworkOfferingObjs.push(thisNetworkOffering);
+                                                                               
                    
+                                                                               
if(thisNetworkOffering.havingEIP == true && thisNetworkOffering.havingELB == 
true) { //EIP ELB 
+                                                                               
        if(args.hypervisor == "VMware" || args.hypervisor == "BareMetal") { 
//VMware, BareMetal don't support EIP ELB 
+                                                                               
                return true; //move to next item in $.each() loop
+                                                                               
        }
                                                                                
}
-                                                                               
else { //only network offerings that does not include EIP, ELB, SG
-                                                                               
  if(thisNetworkOffering.havingSG != true && thisNetworkOffering.havingEIP != 
true && thisNetworkOffering.havingELB != true) {
-                                                                               
          availableNetworkOfferingObjs.push(thisNetworkOffering);
+                                                                               
                                                                                
+                                                                               
if(args.context.zones[0]["network-model"]       == "Advanced" && 
args.context.zones[0]["zone-advanced-sg-enabled"] ==   "on") { // Advanced 
SG-enabled zone
+                                                                               
  if(thisNetworkOffering.havingSG != true) {
+                                                                               
          return true; //move to next item in $.each() loop
                                                                                
        }
-                                                                               
}               
+                                                                               
}
+                                                                               
+                                                                               
availableNetworkOfferingObjs.push(thisNetworkOffering);                         
                                                
                                                                        });     
                                                                                
                                                
                                                                        
                   args.response.success({

Reply via email to