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 2013/07/08 21:00:02 UTC
git commit: updated refs/heads/4.2 to 5dc8bf9
Updated Branches:
refs/heads/4.2 e03ea2702 -> 5dc8bf9ec
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/5dc8bf9e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5dc8bf9e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5dc8bf9e
Branch: refs/heads/4.2
Commit: 5dc8bf9ec3459c31d66b7832e58577356d72d138
Parents: e03ea27
Author: Jessica Wang <je...@apache.org>
Authored: Wed Jul 3 17:05:00 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Mon Jul 8 11:59:52 2013 -0700
----------------------------------------------------------------------
ui/scripts/zoneWizard.js | 49 +++++++++++++++++++------------------------
1 file changed, 21 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5dc8bf9e/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index cb92c4e..08e9fe3 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: {
@@ -1723,7 +1709,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");