mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CS-16573: cloudstack UI - Alerts page - basic search - encode data passed to API call.
This commit is contained in:
parent
1400f84a33
commit
b8e87cff00
@ -175,20 +175,12 @@
|
|||||||
sent: { label: 'label.date', converter: cloudStack.converters.toLocalDate }
|
sent: { label: 'label.date', converter: cloudStack.converters.toLocalDate }
|
||||||
},
|
},
|
||||||
dataProvider: function(args) {
|
dataProvider: function(args) {
|
||||||
var array1 = [];
|
var data = {};
|
||||||
if(args.filterBy != null) {
|
listViewDataProvider(args, data);
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL("listAlerts&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
url: createURL('listAlerts'),
|
||||||
dataType: "json",
|
data: data,
|
||||||
async: true,
|
async: true,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var items = json.listalertsresponse.alert;
|
var items = json.listalertsresponse.alert;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user