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

@@ -12,6 +12,7 @@ import {migratePanelSchema, CURRENT_SCHEMA_VERSION} from './migrations';
import { ProblemList } from './components/Problems';
const ZABBIX_DS_ID = 'alexanderzobnin-zabbix-datasource';
const PROBLEM_EVENTS_LIMIT = 100;
export const DEFAULT_TARGET = {
group: {filter: ""},
@@ -470,7 +471,7 @@ export class TriggerPanelCtrl extends PanelCtrl {
const timeTo = Math.ceil(dateMath.parse(this.range.to) / 1000);
return this.datasourceSrv.get(trigger.datasource)
.then(datasource => {
return datasource.zabbix.getEvents(triggerids, timeFrom, timeTo, [0, 1]);
return datasource.zabbix.getEvents(triggerids, timeFrom, timeTo, [0, 1], PROBLEM_EVENTS_LIMIT);
});
}