You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2012/10/12 23:51:18 UTC
git commit: CS-16493: cloudstack UI - guest network page - hide VLAN
ID for regular-user/domain-admin.
Updated Branches:
refs/heads/master 23495c7e2 -> 318a60fd6
CS-16493: cloudstack UI - guest network page - hide VLAN ID 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/318a60fd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/318a60fd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/318a60fd
Branch: refs/heads/master
Commit: 318a60fd6a3f7237f8dcdfccc41fbd7530ece6f1
Parents: 23495c7
Author: Jessica Wang <je...@citrix.com>
Authored: Fri Oct 12 14:42:22 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Fri Oct 12 14:50:55 2012 -0700
----------------------------------------------------------------------
ui/scripts/network.js | 35 ++++++++++++++++-------------------
1 files changed, 16 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/318a60fd/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index d3912a0..fff70be 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -422,22 +422,9 @@
id: 'networks',
fields: {
name: { label: 'label.name' },
- account: { label: 'label.account' },
- //zonename: { label: 'label.zone' },
- type: { label: 'label.type' },
- vlan: { label: 'label.vlan' },
- cidr: { label: 'label.cidr' }
- /*
- state: {
- label: 'label.state',
- indicator: {
- 'Implemented': 'on',
- 'Setup': 'on',
- 'Allocated': 'on',
- 'Destroyed': 'off'
- }
- }
- */
+ account: { label: 'label.account' },
+ type: { label: 'label.type' },
+ cidr: { label: 'label.cidr' }
},
advSearchFields: {
@@ -841,7 +828,19 @@
hiddenFields.push("networkdomain");
}
return hiddenFields;
+ },
+
+ preFilter: function(args) {
+ var hiddenFields;
+ if(isAdmin()) {
+ hiddenFields = [];
+ }
+ else {
+ hiddenFields = ["vlan"];
+ }
+ return hiddenFields;
},
+
fields: [
{
name: {
@@ -871,9 +870,7 @@
return "No";
}
},
- vlan: { label: 'label.vlan.id' },
-
- networkofferingname: { label: 'label.network.offering' },
+ vlan: { label: 'label.vlan.id' },
networkofferingid: {
label: 'label.network.offering',