Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7CF5CDD7E for ; Wed, 29 Aug 2012 07:58:45 +0000 (UTC) Received: (qmail 36923 invoked by uid 500); 29 Aug 2012 07:58:45 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 36724 invoked by uid 500); 29 Aug 2012 07:58:42 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 36706 invoked by uid 99); 29 Aug 2012 07:58:41 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Aug 2012 07:58:41 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 92AEF21F3F; Wed, 29 Aug 2012 07:58:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: pranavs@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: CS-16147: Always show VPC section and VPN customer Gateway if advanced zone is present Message-Id: <20120829075841.92AEF21F3F@tyr.zones.apache.org> Date: Wed, 29 Aug 2012 07:58:41 +0000 (UTC) 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 Authored: Wed Aug 29 13:28:00 2012 +0530 Committer: Pranav Saxena 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'); }