problems: limit events in timeline

This commit is contained in:
Alexander Zobnin
2018-12-29 19:19:13 +03:00
parent 7734bcd6c0
commit 268de33d96
2 changed files with 10 additions and 3 deletions

View File

@@ -368,7 +368,7 @@ export class ZabbixAPIConnector {
return this.request('trigger.get', params);
}
getEvents(objectids, timeFrom, timeTo, showEvents) {
getEvents(objectids, timeFrom, timeTo, showEvents, limit) {
var params = {
output: 'extend',
time_from: timeFrom,
@@ -376,9 +376,15 @@ export class ZabbixAPIConnector {
objectids: objectids,
select_acknowledges: 'extend',
selectHosts: 'extend',
value: showEvents
value: showEvents,
};
if (limit) {
params.limit = limit;
params.sortfield = 'clock';
params.sortorder = 'DESC';
}
return this.request('event.get', params);
}