You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2012/11/06 01:07:28 UTC

[4/9] git commit: Update tabFilter for egress rules

Update tabFilter for egress rules


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

Branch: refs/heads/master
Commit: 7707b3b4b3a161480506feabad6f49cfb2782ece
Parents: c3f1a69
Author: Brian Federle <br...@citrix.com>
Authored: Mon Nov 5 15:20:42 2012 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Nov 5 15:42:11 2012 -0800

----------------------------------------------------------------------
 ui/scripts/network.js |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7707b3b4/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index a7482f8..ace810b 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -762,6 +762,7 @@
             tabFilter: function(args) {
               var networkOfferingHavingELB = false;
               var hasNetworkACL = false;
+              var isVPC = false;
               
               $.ajax({
                 url: createURL("listNetworkOfferings&id=" + args.context.networks[0].networkofferingid),
@@ -770,6 +771,10 @@
                 success: function(json) {
                   var networkoffering = json.listnetworkofferingsresponse.networkoffering[0];
 
+                  if (networkoffering.forvpc) {
+                    isVPC = true;
+                  }
+
                   $(networkoffering.service).each(function(){
                     var thisService = this;
 
@@ -792,7 +797,7 @@
                 hiddenTabs.push("addloadBalancer");
               }
 
-              if (!hasNetworkACL) {
+              if (!hasNetworkACL || isVPC) {
                 hiddenTabs.push('egressRules');
               }
               
@@ -3414,6 +3419,7 @@
                   }
                 })
               },
+              
               egressRules: {
                 title: 'label.egress.rule',
                 custom: function(args) {