From ca97d392e9e43dd9ab5cbf0435869d7402a7aa62 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Mon, 7 Nov 2016 21:14:40 +0300 Subject: [PATCH] Fixed annotation popup bug after lodash upgrade. --- src/datasource-zabbix/datasource.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/datasource-zabbix/datasource.js b/src/datasource-zabbix/datasource.js index 5a1321b..eea0db2 100644 --- a/src/datasource-zabbix/datasource.js +++ b/src/datasource-zabbix/datasource.js @@ -388,7 +388,7 @@ export class ZabbixAPIDatasource { return self.zabbixAPI .getEvents(objectids, timeFrom, timeTo, showOkEvents) .then(events => { - var indexedTriggers = _.groupBy(triggers, 'triggerid'); + var indexedTriggers = _.keyBy(triggers, 'triggerid'); // Hide acknowledged events if option enabled if (annotation.hideAcknowledged) { @@ -500,6 +500,5 @@ function sequence(funcsArray) { } // Fix for backward compatibility with lodash 2.4 -if (!_.includes) { - _.includes = _.contains; -} +if (!_.includes) {_.includes = _.contains;} +if (!_.keyBy) {_.keyBy = _.indexBy;}