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/ui-mixed-zone-management to f85ab8a
Date Mon, 15 Apr 2013 21:34:57 GMT
Updated Branches:
  refs/heads/ui-mixed-zone-management d146f3d93 -> f85ab8a26


CLOUDSTACK-2038: cloudstack UI - mixed zone management - network menu - show different sections
upon selected zone type on top menu.


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

Branch: refs/heads/ui-mixed-zone-management
Commit: f85ab8a26b48a022b1f025ce35a9b9a12c7dac04
Parents: d146f3d
Author: Jessica Wang <jessica.wang@citrix.com>
Authored: Mon Apr 15 14:34:14 2013 -0700
Committer: Jessica Wang <jessica.wang@citrix.com>
Committed: Mon Apr 15 14:34:14 2013 -0700

----------------------------------------------------------------------
 ui/scripts/network.js |   27 ++-------------------------
 1 files changed, 2 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f85ab8a2/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 6c31192..dfb9f10 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -281,29 +281,7 @@
     id: 'network',
     sectionSelect: {
       preFilter: function(args) {
-        var havingSecurityGroupNetwork = false;
-        var havingBasicZones = false;
-        var havingAdvancedZones = true;
-
-        // Get zone types
-        $.ajax({
-          url: createURL('listZones'),
-          async: false,
-          success: function(json) {
-            var zones = json.listzonesresponse.zone ?
-                  json.listzonesresponse.zone : [];
-            var basicZones = $.grep(zones, function(zone) {
-              return zone.networktype == 'Basic';
-            });
-            var advancedZones = $.grep(zones, function(zone) {
-              return zone.networktype == 'Advanced';
-            });
-
-            
-            havingBasicZones = basicZones.length ? true : false;
-            havingAdvancedZones = advancedZones.length ? true : false;    
-      }
-        });
+        var havingSecurityGroupNetwork = false;           
         
         $.ajax({
           url: createURL('listNetworks', { ignoreProject: true }),
@@ -322,11 +300,10 @@
 
         var sectionsToShow = ['networks'];
 
-        if (havingAdvancedZones) {
+        if(args.context.zoneType != 'Basic') { //Advanced type or all types				
           sectionsToShow.push('vpc');
           sectionsToShow.push('vpnCustomerGateway');
         }
-
         
         if(havingSecurityGroupNetwork == true)
           sectionsToShow.push('securityGroups');


Mime
View raw message