alert error message is an error is returned instead of rows
This commit is contained in:
parent
944c04e5b4
commit
71931f007a
|
@ -35,12 +35,16 @@ var params =
|
||||||
|
|
||||||
// Called by bootstrap-table to retrieve zm event data
|
// Called by bootstrap-table to retrieve zm event data
|
||||||
function ajaxRequest(params) {
|
function ajaxRequest(params) {
|
||||||
if ( params.data && params.data.filter ) {
|
if (params.data && params.data.filter) {
|
||||||
params.data.advsearch = params.data.filter;
|
params.data.advsearch = params.data.filter;
|
||||||
delete params.data.filter;
|
delete params.data.filter;
|
||||||
}
|
}
|
||||||
$j.getJSON(thisUrl + '?view=request&request=events&task=query'+filterQuery, params.data)
|
$j.getJSON(thisUrl + '?view=request&request=events&task=query'+filterQuery, params.data)
|
||||||
.done(function(data) {
|
.done(function(data) {
|
||||||
|
if (data.result == 'Error') {
|
||||||
|
alert(data.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
var rows = processRows(data.rows);
|
var rows = processRows(data.rows);
|
||||||
// rearrange the result into what bootstrap-table expects
|
// rearrange the result into what bootstrap-table expects
|
||||||
params.success({total: data.total, totalNotFiltered: data.totalNotFiltered, rows: rows});
|
params.success({total: data.total, totalNotFiltered: data.totalNotFiltered, rows: rows});
|
||||||
|
|
Loading…
Reference in New Issue