From 98025026f7e4eaaae618e5b775910b96b46ec57c Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Wed, 23 Dec 2020 12:48:46 +0300 Subject: [PATCH] Filter problems by time range, fix #1094 --- src/datasource-zabbix/datasource.ts | 4 ++-- src/datasource-zabbix/partials/query.editor.html | 6 ++++++ src/datasource-zabbix/query.controller.ts | 7 +++---- src/datasource-zabbix/types.ts | 4 ++++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/datasource-zabbix/datasource.ts b/src/datasource-zabbix/datasource.ts index 640c810..2d6cb08 100644 --- a/src/datasource-zabbix/datasource.ts +++ b/src/datasource-zabbix/datasource.ts @@ -453,7 +453,7 @@ export class ZabbixDatasource extends DataSourceApi; - if (showProblems === ShowProblemTypes.History) { + if (showProblems === ShowProblemTypes.History || target.options?.useTimeRange) { problemsOptions.timeFrom = timeFrom; problemsOptions.timeTo = timeTo; getProblemsPromise = this.zabbix.getProblemsHistory(groupFilter, hostFilter, appFilter, proxyFilter, problemsOptions); diff --git a/src/datasource-zabbix/partials/query.editor.html b/src/datasource-zabbix/partials/query.editor.html index f01affb..1679ba6 100644 --- a/src/datasource-zabbix/partials/query.editor.html +++ b/src/datasource-zabbix/partials/query.editor.html @@ -334,6 +334,12 @@ + +