mirror of https://github.com/apache/cloudstack.git
CS-15792: cloudstack 3.0 UI - VPC - pass domainid+account instead of listAll to all listNetworks API calls under VPC section.
This commit is contained in:
parent
4ddc002764
commit
541bb95d63
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue