Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 878D5200D33 for ; Wed, 8 Nov 2017 21:40:09 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 848801609E0; Wed, 8 Nov 2017 20:40:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AD6E5160BDA for ; Wed, 8 Nov 2017 21:40:08 +0100 (CET) Received: (qmail 96568 invoked by uid 500); 8 Nov 2017 20:40:07 -0000 Mailing-List: contact issues-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 issues@cloudstack.apache.org Received: (qmail 96559 invoked by uid 500); 8 Nov 2017 20:40:07 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 96556 invoked by uid 99); 8 Nov 2017 20:40:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Nov 2017 20:40:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 1763D1A3524 for ; Wed, 8 Nov 2017 20:40:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id zsbPPeIpBtsj for ; Wed, 8 Nov 2017 20:40:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 91FD7611CF for ; Wed, 8 Nov 2017 20:40:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CF57AE0E08 for ; Wed, 8 Nov 2017 20:40:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6742F240DE for ; Wed, 8 Nov 2017 20:40:01 +0000 (UTC) Date: Wed, 8 Nov 2017 20:40:01 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-10129) Show instances attached to a network/VR via navigation from VRs->instances MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 08 Nov 2017 20:40:09 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-10129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16244686#comment-16244686 ] ASF GitHub Bot commented on CLOUDSTACK-10129: --------------------------------------------- rhtyd closed pull request #2306: CLOUDSTACK-10129: Allow navigation from VRs to network, instances, owners etc. URL: https://github.com/apache/cloudstack/pull/2306 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js index 77c528f2ed1..a9f7381e641 100644 --- a/ui/scripts/accounts.js +++ b/ui/scripts/accounts.js @@ -137,6 +137,19 @@ }); } + if ("routers" in args.context) { + if ("account" in args.context.routers[0]) { + $.extend(data, { + name: args.context.routers[0].account + }); + } + if ("domainid" in args.context.routers[0]) { + $.extend(data, { + domainid: args.context.routers[0].domainid + }); + } + } + $.ajax({ url: createURL('listAccounts'), data: data, diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index 252eb1ac84b..ca77c27e6b1 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -379,6 +379,31 @@ }); } + if ("routers" in args.context) { + if ("vpcid" in args.context.routers[0]) { + $.extend(data, { + vpcid: args.context.routers[0].vpcid + }); + } else { + if ("guestnetworkid" in args.context.routers[0]) { + $.extend(data, { + networkid: args.context.routers[0].guestnetworkid + }); + } + } + if ("projectid" in args.context.routers[0]) { + $.extend(data, { + projectid: args.context.routers[0].projectid + }); + } + } + + if ("networks" in args.context) { + $.extend(data, { + networkid: args.context.networks[0].id + }); + } + if ("templates" in args.context) { $.extend(data, { templateid: args.context.templates[0].id diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 83701065c60..7ffb16dcd94 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -914,6 +914,25 @@ var data = {}; listViewDataProvider(args, data); + if ("routers" in args.context) { + if ("vpcid" in args.context.routers[0]) { + $.extend(data, { + vpcid: args.context.routers[0].vpcid + }); + } else { + if ("guestnetworkid" in args.context.routers[0]) { + $.extend(data, { + id: args.context.routers[0].guestnetworkid + }); + } + } + if ("projectid" in args.context.routers[0]) { + $.extend(data, { + projectid: args.context.routers[0].projectid + }); + } + } + $.ajax({ url: createURL('listNetworks'), data: data, @@ -931,7 +950,7 @@ detailView: { name: 'label.guest.network.details', - viewAll: { + viewAll: [{ path: 'network.ipAddresses', label: 'label.menu.ipaddresses', preFilter: function(args) { @@ -940,7 +959,10 @@ return true; } - }, + }, { + label: 'label.instances', + path: 'instances' + }], actions: { edit: { label: 'label.edit', @@ -6334,7 +6356,6 @@ } }, action: function(args) { - console.log(args.context); $.ajax({ url: createURL('removeVpnUser'), data: { diff --git a/ui/scripts/system.js b/ui/scripts/system.js index e912f3b3ce8..9fc96ce5f66 100755 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -31,6 +31,7 @@ if (router.projectid) routerType = _l('label.project'); if (router.vpcid) routerType = _l('label.vpc'); + if ("isredundantrouter" in router && router.isredundantrouter) routerType = routerType + " (" + router.redundantstate + ")"; return $.extend(router, { routerType: routerType @@ -9599,6 +9600,23 @@ }, detailView: { name: 'label.virtual.appliance.details', + viewAll: [{ + label: 'label.account', + path: 'accounts', + preFilter: function(args) { + if (args.context.routers[0].projectid) + return false; + if (args.context.routers[0].account == 'system') + return false; + return true; + } + }, { + label: 'label.networks', + path: 'network', + }, { + label: 'label.instances', + path: 'instances' + }], actions: { start: { label: 'label.action.start.router', ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org > Show instances attached to a network/VR via navigation from VRs->instances > -------------------------------------------------------------------------- > > Key: CLOUDSTACK-10129 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10129 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Reporter: Rohit Yadav > Assignee: Rohit Yadav > Priority: Trivial > Fix For: 4.11.0.0 > > > Navigate to Infra->Vrs->select a VR->View instances should show instances belonging to guest network id of the VR -- This message was sent by Atlassian JIRA (v6.4.14#64029)