Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EDC37FE93 for ; Sat, 30 Mar 2013 09:58:51 +0000 (UTC) Received: (qmail 68232 invoked by uid 500); 30 Mar 2013 09:58:45 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 68105 invoked by uid 500); 30 Mar 2013 09:58:45 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 62487 invoked by uid 99); 30 Mar 2013 09:58:32 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Mar 2013 09:58:32 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 49104834573; Sat, 30 Mar 2013 09:58:31 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: widodh@apache.org To: commits@cloudstack.apache.org Date: Sat, 30 Mar 2013 09:58:48 -0000 Message-Id: <87989afac07448668563f5c0797bf988@git.apache.org> In-Reply-To: <4247a17f41bc48deb8f48309d3d6aadf@git.apache.org> References: <4247a17f41bc48deb8f48309d3d6aadf@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [19/52] [abbrv] git commit: updated refs/heads/qemu-img to 44197a0 CLOUDSTACK-1838: cloudstack UI - volume page - listView, detailView - hide hypervisor field when log in as regular-user/domain-admin. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/86a153c5 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/86a153c5 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/86a153c5 Branch: refs/heads/qemu-img Commit: 86a153c595d65049fcd1a93bca1bf3ef40364fd3 Parents: 34a59fc Author: Jessica Wang Authored: Thu Mar 28 14:38:17 2013 -0700 Committer: Jessica Wang Committed: Thu Mar 28 14:38:52 2013 -0700 ---------------------------------------------------------------------- ui/scripts/storage.js | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/86a153c5/ui/scripts/storage.js ---------------------------------------------------------------------- diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 5c19bd0..54605e2 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; },