diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 1aea9c47bc7..63688176c7a 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -1382,7 +1382,9 @@ async: false, data: { vpcid: args.context.vpc[0].id, - listAll: true, + //listAll: true, //do not pass listAll to listNetworks under VPC + domainid: args.context.vpc[0].domainid, + account: args.context.vpc[0].account, supportedservices: 'StaticNat' }, success: function(json) { @@ -2207,12 +2209,14 @@ select: function(args) { if('vpc' in args.context) { var data = { - listAll: true, + //listAll: true, //do not pass listAll to listNetworks under VPC supportedservices: 'Lb' }; if(args.context.ipAddresses[0].associatednetworkid == null) { $.extend(data, { - vpcid: args.context.vpc[0].id + vpcid: args.context.vpc[0].id, + domainid: args.context.vpc[0].domainid, + account: args.context.vpc[0].account }); } else { @@ -2635,12 +2639,14 @@ select: function(args) { if('vpc' in args.context) { var data = { - listAll: true, + //listAll: true, //do not pass listAll to listNetworks under VPC supportedservices: 'PortForwarding' }; if(args.context.ipAddresses[0].associatednetworkid == null) { $.extend(data, { - vpcid: args.context.vpc[0].id + vpcid: args.context.vpc[0].id, + domainid: args.context.vpc[0].domainid, + account: args.context.vpc[0].account }); } else { diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index dea9e45efbb..6ed045ef96e 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -1888,26 +1888,16 @@ }, // Get tiers - 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 - }); - } - - + dataProvider: function(args) { $.ajax({ url: createURL("listNetworks"), dataType: "json", - data: data, + data: { + vpcid: args.context.vpc[0].id, + //listAll: true, //do not pass listAll to listNetworks under VPC + domainid: args.context.vpc[0].domainid, + account: args.context.vpc[0].account + }, async: true, success: function(json) { var networks = json.listnetworksresponse.network;