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

@@ -595,7 +595,9 @@ System.register(['lodash', 'app/core/utils/datemath', './utils', './migrations',
var _this7 = this;
var enabled_targets = filterEnabledTargets(options.targets);
var getPanelItems = _.map(enabled_targets, function (target) {
var getPanelItems = _.map(enabled_targets, function (t) {
var target = _.cloneDeep(t);
_this7.replaceTargetVariables(target, options);
return _this7.zabbix.getItemsFromTarget(target, { itemtype: 'num' });
});

File diff suppressed because one or more lines are too long

View File

@@ -499,7 +499,9 @@ var ZabbixAPIDatasource = function () {
var _this7 = this;
var enabled_targets = filterEnabledTargets(options.targets);
var getPanelItems = _lodash2.default.map(enabled_targets, function (target) {
var getPanelItems = _lodash2.default.map(enabled_targets, function (t) {
var target = _lodash2.default.cloneDeep(t);
_this7.replaceTargetVariables(target, options);
return _this7.zabbix.getItemsFromTarget(target, { itemtype: 'num' });
});

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'});
});