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 9E354171E9 for ; Tue, 7 Oct 2014 21:21:33 +0000 (UTC) Received: (qmail 86795 invoked by uid 500); 7 Oct 2014 21:21:33 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 86761 invoked by uid 500); 7 Oct 2014 21:21:33 -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 86752 invoked by uid 99); 7 Oct 2014 21:21:33 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Oct 2014 21:21:33 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 36295905738; Tue, 7 Oct 2014 21:21:33 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jessicawang@apache.org To: commits@cloudstack.apache.org Message-Id: <4b49a996703144ec9b9f0c69574ea982@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to 794ee69 Date: Tue, 7 Oct 2014 21:21:33 +0000 (UTC) Repository: cloudstack Updated Branches: refs/heads/master e2ca6e38d -> 794ee6929 CLOUDSTACK-4987: UI > Instances > detailView > NICs tab > Add network to VM > Network dropdown => (1) For root-admin, populate networks of all accounts. (2) For regular-user/domain-admin, populate only networks belonging to this VM owner. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/794ee692 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/794ee692 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/794ee692 Branch: refs/heads/master Commit: 794ee6929d078fd919842f2c1f55156f133d7934 Parents: e2ca6e3 Author: Jessica Wang Authored: Tue Oct 7 14:20:59 2014 -0700 Committer: Jessica Wang Committed: Tue Oct 7 14:21:22 2014 -0700 ---------------------------------------------------------------------- ui/scripts/instances.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/794ee692/ui/scripts/instances.js ---------------------------------------------------------------------- diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index 46df52d..a15fcd9 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -1945,13 +1945,22 @@ networkid: { label: 'label.network', select: function(args) { + var data1 = { + zoneid: args.context.instances[0].zoneid + }; + if (isAdmin()) { + $.extend(data1, { + listAll: true + }); + } else { + $.extend(data1, { + account: args.context.instances[0].account, + domainid: args.context.instances[0].domainid + }); + } $.ajax({ url: createURL('listNetworks'), - data: { - zoneid: args.context.instances[0].zoneid, - account: args.context.instances[0].account, - domainid: args.context.instances[0].domainid - }, + data: data1, success: function(json) { args.response.success({ data: $.map(json.listnetworksresponse.network, function(network) {