From 6449b8b255119180aa7a454c6a053ed99f708fc1 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Fri, 1 Mar 2019 14:00:15 +0300 Subject: [PATCH] fix annotations with full day/week/month intervals, closes #680 --- src/datasource-zabbix/datasource.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/datasource-zabbix/datasource.js b/src/datasource-zabbix/datasource.js index a2c86a8d3..3f2ac5800 100644 --- a/src/datasource-zabbix/datasource.js +++ b/src/datasource-zabbix/datasource.js @@ -470,8 +470,9 @@ export class ZabbixDatasource { ///////////////// annotationQuery(options) { - var timeFrom = Math.ceil(dateMath.parse(options.rangeRaw.from) / 1000); - var timeTo = Math.ceil(dateMath.parse(options.rangeRaw.to) / 1000); + const timeRange = options.range || options.rangeRaw; + const timeFrom = Math.ceil(dateMath.parse(timeRange.from) / 1000); + const timeTo = Math.ceil(dateMath.parse(timeRange.to) / 1000); var annotation = options.annotation; var showOkEvents = annotation.showOkEvents ? c.SHOW_ALL_EVENTS : c.SHOW_OK_EVENTS;