mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
CS-16573: cloudstack UI - IP Address page, VPN Customer Gateway page - basic search - encode data passed to API call.
This commit is contained in:
parent
47c83ef403
commit
8e2ebb26a8
@ -1311,10 +1311,8 @@
|
||||
},
|
||||
|
||||
dataProvider: function(args) {
|
||||
var data = {
|
||||
page: args.page,
|
||||
pageSize: pageSize
|
||||
};
|
||||
var data = {};
|
||||
listViewDataProvider(args, data);
|
||||
|
||||
if (g_supportELB == "guest") // IPs are allocated on guest network
|
||||
$.extend(data, {
|
||||
@ -1329,28 +1327,17 @@
|
||||
|
||||
if (args.context.networks) {
|
||||
$.extend(data, { associatedNetworkId: args.context.networks[0].id });
|
||||
|
||||
}
|
||||
|
||||
if("vpc" in args.context) {
|
||||
$.extend(data, {
|
||||
vpcid: args.context.vpc[0].id
|
||||
});
|
||||
}
|
||||
|
||||
var array1 = [];
|
||||
if(args.filterBy != null) {
|
||||
if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
|
||||
switch(args.filterBy.search.by) {
|
||||
case "name":
|
||||
if(args.filterBy.search.value.length > 0)
|
||||
array1.push("&keyword=" + args.filterBy.search.value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if("vpc" in args.context) {
|
||||
$.extend(data, {
|
||||
vpcid: args.context.vpc[0].id
|
||||
});
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: createURL("listPublicIpAddresses&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||
url: createURL('listPublicIpAddresses'),
|
||||
data: data,
|
||||
dataType: "json",
|
||||
async: true,
|
||||
@ -4200,22 +4187,14 @@
|
||||
cidrlist: { label: 'label.CIDR.list' },
|
||||
ipsecpsk: { label: 'label.IPsec.preshared.key' }
|
||||
},
|
||||
dataProvider: function(args) {
|
||||
var array1 = [];
|
||||
if(args.filterBy != null) {
|
||||
if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
|
||||
switch(args.filterBy.search.by) {
|
||||
case "name":
|
||||
if(args.filterBy.search.value.length > 0)
|
||||
array1.push("&keyword=" + args.filterBy.search.value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dataProvider: function(args) {
|
||||
var data = {};
|
||||
listViewDataProvider(args, data);
|
||||
|
||||
$.ajax({
|
||||
url: createURL("listVpnCustomerGateways&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||
dataType: "json",
|
||||
url: createURL('listVpnCustomerGateways'),
|
||||
data: data,
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var items = json.listvpncustomergatewaysresponse.vpncustomergateway;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user