diff --git a/src/datasource-zabbix/datasource.js b/src/datasource-zabbix/datasource.js index a2c86a8..3f2ac58 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;