Fixed annotation popup bug after lodash upgrade.

This commit is contained in:
Alexander Zobnin
2016-11-07 21:14:40 +03:00
parent 62509caeb9
commit ca97d392e9

View File

@@ -388,7 +388,7 @@ export class ZabbixAPIDatasource {
return self.zabbixAPI return self.zabbixAPI
.getEvents(objectids, timeFrom, timeTo, showOkEvents) .getEvents(objectids, timeFrom, timeTo, showOkEvents)
.then(events => { .then(events => {
var indexedTriggers = _.groupBy(triggers, 'triggerid'); var indexedTriggers = _.keyBy(triggers, 'triggerid');
// Hide acknowledged events if option enabled // Hide acknowledged events if option enabled
if (annotation.hideAcknowledged) { if (annotation.hideAcknowledged) {
@@ -500,6 +500,5 @@ function sequence(funcsArray) {
} }
// Fix for backward compatibility with lodash 2.4 // Fix for backward compatibility with lodash 2.4
if (!_.includes) { if (!_.includes) {_.includes = _.contains;}
_.includes = _.contains; if (!_.keyBy) {_.keyBy = _.indexBy;}
}