Updated Branches:
  refs/heads/master 080a2dc9c -> b94981343

CLOUDSTACK-537: cloudstack UI - Advanced SG-Enabled zone - Infrastructure menu 
- zone detail - physical network - guest - network tab - crate network dailog - 
scope dropdown - list only Accounts option if it's for an Advanced SG-enabled 
zone.


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

Branch: refs/heads/master
Commit: b94981343813a8698a9e4818d70e444873f684d3
Parents: 080a2dc
Author: Jessica Wang <[email protected]>
Authored: Mon Nov 26 13:10:44 2012 -0800
Committer: Jessica Wang <[email protected]>
Committed: Mon Nov 26 13:10:44 2012 -0800

----------------------------------------------------------------------
 ui/scripts/system.js |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b9498134/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 9e3932f..6bdff2e 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -1145,12 +1145,16 @@
                             label: 'label.scope',
                             docID: 'helpGuestNetworkZoneScope',
                             select: function(args) {
-                              var array1 = [];
-                                                                               
                                        array1.push({id: 'zone-wide', 
description: 'All'});
-                                                                               
                                        array1.push({id: 'domain-specific', 
description: 'Domain'});
-                                                                               
                                        array1.push({id: 'account-specific', 
description: 'Account'});
-                                                                               
                                        array1.push({id: 'project-specific', 
description: 'Project'});
-
+                              var array1 = [];                                 
                                                                                
+                                                                               
                                        if(args.context.zones[0].networktype == 
"Advanced" && args.context.zones[0].securitygroupsenabled       == true) {
+                                                                               
                                          array1.push({id: 'account-specific', 
description: 'Account'});
+                                                                               
                                        }
+                                                                               
                                        else {                                  
                                                                                
+                                                                               
                                                array1.push({id: 'zone-wide', 
description: 'All'});
+                                                                               
                                                array1.push({id: 
'domain-specific', description: 'Domain'});
+                                                                               
                                                array1.push({id: 
'account-specific', description: 'Account'});
+                                                                               
                                                array1.push({id: 
'project-specific', description: 'Project'});
+                                                                               
                                        }
                               args.response.success({data: array1});
 
                               args.$select.change(function() {

Reply via email to