Skip to content

Commit b8e87cf

Browse files
author
Jessica Wang
committed
CS-16573: cloudstack UI - Alerts page - basic search - encode data passed to API call.
1 parent 1400f84 commit b8e87cf

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

ui/scripts/events.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -175,20 +175,12 @@
175175
sent: { label: 'label.date', converter: cloudStack.converters.toLocalDate }
176176
},
177177
dataProvider: function(args) {
178-
var array1 = [];
179-
if(args.filterBy != null) {
180-
if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
181-
switch(args.filterBy.search.by) {
182-
case "name":
183-
if(args.filterBy.search.value.length > 0)
184-
array1.push("&keyword=" + args.filterBy.search.value);
185-
break;
186-
}
187-
}
188-
}
178+
var data = {};
179+
listViewDataProvider(args, data);
180+
189181
$.ajax({
190-
url: createURL("listAlerts&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
191-
dataType: "json",
182+
url: createURL('listAlerts'),
183+
data: data,
192184
async: true,
193185
success: function(json) {
194186
var items = json.listalertsresponse.alert;

0 commit comments

Comments
 (0)