Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3C5E4DF5A for ; Thu, 4 Oct 2012 21:23:03 +0000 (UTC) Received: (qmail 24634 invoked by uid 500); 4 Oct 2012 21:23:03 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 24607 invoked by uid 500); 4 Oct 2012 21:23:03 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 24599 invoked by uid 99); 4 Oct 2012 21:23:03 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2012 21:23:03 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id DA3813A373; Thu, 4 Oct 2012 21:23:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jessicawang@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: cloudstack UI - advanced search on VPC page - add domain dropdown, account text field. Message-Id: <20121004212302.DA3813A373@tyr.zones.apache.org> Date: Thu, 4 Oct 2012 21:23:02 +0000 (UTC) Updated Branches: refs/heads/master d80debcbf -> c0c0ae1c3 cloudstack UI - advanced search on VPC page - add domain dropdown, account text field. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/c0c0ae1c Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/c0c0ae1c Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/c0c0ae1c Branch: refs/heads/master Commit: c0c0ae1c36bfc7c52e04cc481e21efdfc243803f Parents: d80debc Author: Jessica Wang Authored: Thu Oct 4 14:10:30 2012 -0700 Committer: Jessica Wang Committed: Thu Oct 4 14:22:39 2012 -0700 ---------------------------------------------------------------------- ui/scripts/network.js | 41 ++++++++++++++++++++++++++++++++++++++++- 1 files changed, 40 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c0c0ae1c/ui/scripts/network.js ---------------------------------------------------------------------- diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 86ef9dc..a4f4a4d 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -3680,7 +3680,46 @@ } }); } - }, + }, + domainid: { + label: 'Domain', + select: function(args) { + $.ajax({ + url: createURL('listDomains'), + data: { + listAll: true, + details: 'min' + }, + success: function(json) { + var array1 = [{id: '', description: ''}]; + var domains = json.listdomainsresponse.domain; + if(domains != null && domains.length > 0) { + for(var i = 0; i < domains.length; i++) { + array1.push({id: domains[i].id, description: domains[i].path}); + } + } + args.response.success({ + data: array1 + }); + } + }); + }, + isHidden: function(args) { + if(isAdmin() || isDomainAdmin()) + return false; + else + return true; + } + }, + account: { + label: 'Account', + isHidden: function(args) { + if(isAdmin() || isDomainAdmin()) + return false; + else + return true; + } + }, tagKey: { label: 'Tag Key' }, tagValue: { label: 'Tag Value' } },