cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject [1/3] git commit: refs/heads/4.1 - CLOUDSTACK-1008:Egress tab should not be presented in the UI for Shared Networks
Date Tue, 26 Mar 2013 14:32:42 GMT
Updated Branches:
  refs/heads/4.1 af442f762 -> 66fe03429


CLOUDSTACK-1008:Egress tab should not be presented in the UI for Shared Networks


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

Branch: refs/heads/4.1
Commit: e1a9062e1c5d27e5b7a63d4f00c783112a1d3558
Parents: e33ab6e
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Tue Mar 26 16:02:19 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Tue Mar 26 16:02:19 2013 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e1a9062e/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 84cc067..9bd0857 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -807,6 +807,7 @@
               var hasSRXFirewall = false;
               var isVPC = false;
               var isAdvancedSGZone = false;
+              var type;
               var hiddenTabs = [];
 
               // Get network offering data
@@ -862,12 +863,24 @@
                   isAdvancedSGZone = zone.securitygroupsenabled;
                 }
               });
+ 
+               $.ajax({
+                 url:createURL('listNetworks'),
+                 data:{ id:args.context.networks[0].id },
+                 async:false,
+                 success:function(json){
+                   type = json.listnetworksresponse.network[0].type;
+
+                 }
+
+             });
+
 
               if (!networkOfferingHavingELB) {
                 hiddenTabs.push("addloadBalancer");
               }
 
-              if (isVPC || isAdvancedSGZone || hasSRXFirewall) {
+              if (isVPC || isAdvancedSGZone || hasSRXFirewall || type="Shared") {
                 hiddenTabs.push('egressRules');
                }
               


Mime
View raw message