incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject git commit: CS-16147: Always show VPC section and VPN customer Gateway if advanced zone is present
Date Wed, 29 Aug 2012 07:58:41 GMT
Updated Branches:
  refs/heads/master ad78a0e91 -> d134a63ea


CS-16147: Always show VPC section and VPN customer Gateway if advanced zone is present


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

Branch: refs/heads/master
Commit: d134a63ea8324a1295ff637fc5525812937c6e91
Parents: ad78a0e
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Wed Aug 29 13:28:00 2012 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Wed Aug 29 13:28:00 2012 +0530

----------------------------------------------------------------------
 ui/scripts/network.js |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/d134a63e/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index ecc69d7..8d1eb2e 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -165,8 +165,9 @@
       preFilter: function(args) {
         var havingSecurityGroupNetwork = false;
         var havingBasicZones = false;
+        var havingAdvancedZones = true;
 
-        // Get basic zones
+        // Get zone types
         $.ajax({
           url: createURL('listZones'),
           async: false,
@@ -176,9 +177,14 @@
             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;    
+      }
         });
         
         $.ajax({
@@ -197,7 +203,7 @@
 
         var sectionsToShow = ['networks'];
 
-        if (!havingBasicZones) {
+        if (havingAdvancedZones) {
           sectionsToShow.push('vpc');
           sectionsToShow.push('vpnCustomerGateway');
         }


Mime
View raw message