Problems: fix filtering by tags

This commit is contained in:
Alexander Zobnin
2020-05-08 15:29:38 +03:00
parent 001d911282
commit 0916f2eff7
2 changed files with 1 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ export function filterTriggersPre(triggerList, replacedTarget) {
const tags = utils.parseTags(tagsFilter);
triggerList = _.filter(triggerList, trigger => {
return _.every(tags, tag => {
return _.includes(trigger.tags, {tag: tag.tag, value: tag.value});
return _.find(trigger.tags, t => t.tag === tag.tag && (!tag.value || t.value === tag.value));
});
});
}

View File

@@ -117,7 +117,6 @@ export class ZabbixQueryController extends QueryCtrl {
});
this.init = function() {
console.log(this);
var target = this.target;
// Migrate old targets