From 86a153c595d65049fcd1a93bca1bf3ef40364fd3 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 28 Mar 2013 14:38:17 -0700 Subject: [PATCH] CLOUDSTACK-1838: cloudstack UI - volume page - listView, detailView - hide hypervisor field when log in as regular-user/domain-admin. --- ui/scripts/storage.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 5c19bd0a2dc..54605e266ae 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -34,6 +34,12 @@ listView: { id: 'volumes', label: 'label.volumes', + preFilter: function(args) { + var hiddenFields = []; + if(isAdmin() != true) + hiddenFields.push('hypervisor'); + return hiddenFields; + }, fields: { name: { label: 'label.name' }, type: { label: 'label.type' }, @@ -1113,7 +1119,7 @@ hiddenFields = []; } else { - hiddenFields = ["storage"]; + hiddenFields = ['storage', 'hypervisor']; } return hiddenFields; },