Fix evaltype for problems history

This commit is contained in:
Alexander Zobnin
2023-08-01 17:44:43 +02:00
parent 4373ef8667
commit e45277c7bf

View File

@@ -612,7 +612,7 @@ export class ZabbixAPIConnector {
}
getEventsHistory(groupids, hostids, applicationids, options) {
const { timeFrom, timeTo, severities, limit, value, tags } = options;
const { timeFrom, timeTo, severities, limit, value, tags, evaltype } = options;
const params: any = {
output: 'extend',
@@ -621,7 +621,7 @@ export class ZabbixAPIConnector {
value: '1',
source: '0',
object: '0',
evaltype: '2',
evaltype: '0',
sortfield: ['eventid'],
sortorder: 'DESC',
select_acknowledges: 'extend',
@@ -648,6 +648,10 @@ export class ZabbixAPIConnector {
params.tags = tags;
}
if (evaltype) {
params.evaltype = evaltype;
}
return this.request('event.get', params).then(utils.mustArray);
}