Fix alert states for templated queries, closes #424

This commit is contained in:
Alexander Zobnin
2017-07-10 12:18:53 +03:00
parent 309f6fd275
commit e58cf62c36
4 changed files with 10 additions and 4 deletions

View File

@@ -424,7 +424,9 @@ class ZabbixAPIDatasource {
*/
alertQuery(options) {
let enabled_targets = filterEnabledTargets(options.targets);
let getPanelItems = _.map(enabled_targets, target => {
let getPanelItems = _.map(enabled_targets, t => {
let target = _.cloneDeep(t);
this.replaceTargetVariables(target, options);
return this.zabbix.getItemsFromTarget(target, {itemtype: 'num'});
});