incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: CS-16493: cloudstack UI - IP Address page - hide VLAN for regular-user/domain-admin.
Date Fri, 12 Oct 2012 22:23:01 GMT
Updated Branches:
  refs/heads/master 318a60fd6 -> 08b074a10


CS-16493: cloudstack UI - IP Address page - hide VLAN for regular-user/domain-admin.


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

Branch: refs/heads/master
Commit: 08b074a10193155b0ecfd795a6ece05507882b2e
Parents: 318a60f
Author: Jessica Wang <jessica.wang@citrix.com>
Authored: Fri Oct 12 14:49:34 2012 -0700
Committer: Jessica Wang <jessica.wang@citrix.com>
Committed: Fri Oct 12 15:22:15 2012 -0700

----------------------------------------------------------------------
 ui/scripts/network.js |   40 +++++++++++++++++++++-------------------
 1 files changed, 21 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/08b074a1/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index fff70be..3ff35b4 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -1727,25 +1727,27 @@
             tabs: {
               details: {
                 title: 'label.details',
-								
-								preFilter: function(args) {
-								  var hiddenFields = [];								
-									var zoneObj;
-									$.ajax({
-									  url: createURL("listZones&id=" + args.context.ipAddresses[0].zoneid),
-										dataType: "json",
-										async: false,
-										success: function(json) {										  
-											zoneObj = json.listzonesresponse.zone[0];											
-										}
-									});							
-									if(zoneObj.networktype == "Advanced") {
-									  hiddenFields.push("issystem");
-										hiddenFields.push("purpose");
-									}																	
-									return hiddenFields;								
-								},
-								
+                preFilter: function(args) {
+                  var hiddenFields = [];
+                  var zoneObj;
+                  $.ajax({
+                    url: createURL("listZones&id=" + args.context.ipAddresses[0].zoneid),
+                    dataType: "json",
+                    async: false,
+                    success: function(json) {
+                      zoneObj = json.listzonesresponse.zone[0];
+                    }
+                  });
+                  if(zoneObj.networktype == "Advanced") {
+                    hiddenFields.push("issystem");
+                    hiddenFields.push("purpose");
+                  }
+									
+									if(!isAdmin()) {                   
+                    hiddenFields.push("vlanname");
+                  }									
+                  return hiddenFields;
+                },
                 fields: [
                   {
                     ipaddress: { label: 'label.ip' }


Mime
View raw message