cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/master-6-17-stable to 608f1a6
Date Mon, 08 Jul 2013 18:46:44 GMT
Updated Branches:
  refs/heads/master-6-17-stable 7eff343e4 -> 608f1a686


CLOUDSTACK-1676: UI > zone wizard > basic zone > pass securitygroupenabled=true if
selected network offering includes security group service; pass securitygroupenabled=false
if selected network offering does not include security group service.


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

Branch: refs/heads/master-6-17-stable
Commit: 608f1a6869d2ad2fc8cd2e0f0a139f65cbdbe507
Parents: 7eff343
Author: Jessica Wang <jessicawang@apache.org>
Authored: Wed Jul 3 17:05:00 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Mon Jul 8 11:46:25 2013 -0700

----------------------------------------------------------------------
 ui/scripts/zoneWizard.js | 49 +++++++++++++++++++------------------------
 1 file changed, 21 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/608f1a68/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 1cd8d5e..a0608fa 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -324,42 +324,28 @@
           var $form = args.$form;
 
           if (args.data['network-model'] == 'Basic') { //Basic zone
-            args.$form.find('[rel=networkOfferingId]').show();
+            args.$form.find('[rel=networkOfferingId]').show(); //will be used to create a
guest network during zone creation 
             args.$form.find('[rel=guestcidraddress]').hide();						
 	    
             args.$form.find('[rel=ip6dns1]').hide();
-	    args.$form.find('[rel=ip6dns2]').hide();
+	          args.$form.find('[rel=ip6dns2]').hide();
           }
-          else { //Advanced zone
-            args.$form.find('[rel=networkOfferingId]').hide();
-						
-	    if(args.data["zone-advanced-sg-enabled"] !=	"on") { //Advanced SG-disabled zone
+          else { //Advanced zone 					
+	          if(args.data["zone-advanced-sg-enabled"] !=	"on") { //Advanced SG-disabled zone
+	            args.$form.find('[rel=networkOfferingId]').hide();
               args.$form.find('[rel=guestcidraddress]').show();
               					  
-	      args.$form.find('[rel=ip6dns1]').show();
-	      args.$form.find('[rel=ip6dns2]').show();
+	            args.$form.find('[rel=ip6dns1]').show();
+	            args.$form.find('[rel=ip6dns2]').show();
             }
-	    else { //Advanced SG-enabled zone
-	      args.$form.find('[rel=guestcidraddress]').hide();
+	          else { //Advanced SG-enabled zone
+	            args.$form.find('[rel=networkOfferingId]').show(); //will be used to create
a guest network during zone creation 
+	            args.$form.find('[rel=guestcidraddress]').hide();
 
               args.$form.find('[rel=ip6dns1]').hide();
-	      args.$form.find('[rel=ip6dns2]').hide();
-            }
-          
-	  }													
-										
-      /*    setTimeout(function() {
-            if ($form.find('input[name=ispublic]').is(':checked')) {
-              $form.find('[rel=domain]').show();
-              $form.find('[rel=accountId]').show();
-            }
- 
-            else{
-
-              $form.find('[rel=domain]').hide();
-              $form.find('[rel=accountId]').hide();
-             }             
-          });*/
+	            args.$form.find('[rel=ip6dns2]').hide();
+            }          
+	        }			
         },
         fields: {
           name: {
@@ -1561,7 +1547,14 @@
           var array1 = [];
           var networkType = args.data.zone.networkType;  //"Basic", "Advanced"
           array1.push("&networktype=" + todb(networkType));
-          if(networkType == "Advanced") {            
+          
+          if (networkType == "Basic") {        
+            if(selectedNetworkOfferingHavingSG == true)
+              array1.push("&securitygroupenabled=true");  
+            else
+              array1.push("&securitygroupenabled=false");             
+          }
+          else { // networkType == "Advanced"            
 						if(args.data.zone.sgEnabled	!= true) {
 							array1.push("&securitygroupenabled=false"); 
 							


Mime
View raw message