From 0ddcf0b175bbabf3915c9e250dcbe90a8a7ade1e Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Wed, 1 Mar 2017 14:52:13 +0530 Subject: [PATCH] CLOUDSTACK-9805: Display VR list in network details Displays a VR tab that lists VRs for the network in the detail views for isolated networks, shared networks and for VPCs. Signed-off-by: Rohit Yadav --- ui/index.jsp | 2 +- ui/scripts/network.js | 17 ++++++++++++++++- ui/scripts/system.js | 10 ++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/ui/index.jsp b/ui/index.jsp index 34f6310f9c94..49290fe95be0 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -1818,7 +1818,6 @@ - @@ -1833,6 +1832,7 @@ + diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 428807e41118..569e31db58d1 100755 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -1194,6 +1194,10 @@ hiddenTabs.push('egressRules'); } + if (!isAdmin()) { + hiddenTabs.push("virtualRouters"); + } + return hiddenTabs; }, @@ -1892,6 +1896,11 @@ } }); } + }, + + virtualRouters: { + title: "label.virtual.appliances", + listView: cloudStack.sections.system.subsections.virtualRouters.sections.routerNoGroup.listView } } } @@ -5738,8 +5747,10 @@ tabFilter: function(args) { var hiddenTabs = []; var isRouterOwner = isAdmin(); - if (!isRouterOwner) + if (!isRouterOwner) { hiddenTabs.push("router"); + hiddenTabs.push("virtualRouters"); + } return hiddenTabs; }, @@ -5905,6 +5916,10 @@ } }); } + }, + virtualRouters: { + title: "label.virtual.routers", + listView: cloudStack.sections.system.subsections.virtualRouters.sections.routerNoGroup.listView } } } diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 98403ed9cf65..b55ca0dcfa07 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -9769,6 +9769,16 @@ domainid: args.context.routerGroupByAccount[0].domainid }) } + if ("networks" in args.context) { + $.extend(data2, { + networkid: args.context.networks[0].id + }) + } + if ("vpc" in args.context) { + $.extend(data2, { + vpcid: args.context.vpc[0].id + }) + } } var routers =[];