From 6cc7cda9ce38f612aae1af82f85318748aca281f Mon Sep 17 00:00:00 2001 From: Pranav Saxena Date: Thu, 2 Aug 2012 02:59:30 +0530 Subject: [PATCH] CS:15792- S2S VPN : A tier created in VPC from a domain-admin account does not show up in the VPC configuration page. Instead, it is seen in the guest networks page --- ui/scripts/vpc.js | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index 384e58a7482..dea9e45efbb 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -1888,14 +1888,26 @@ }, // Get tiers - dataProvider: function(args) { + dataProvider: function(args) { + var data = { vpcid: args.context.vpc[0].id }; + + if (isDomainAdmin()) { + $.extend(data, { + account: args.context.users[0].account, + domainid: args.context.users[0].domainid + }); + } + else { + $.extend(data, { + listAll: true + }); + } + + $.ajax({ url: createURL("listNetworks"), dataType: "json", - data: { - vpcid: args.context.vpc[0].id, - listAll: true - }, + data: data, async: true, success: function(json) { var networks = json.listnetworksresponse.network;