problems: fix panel update when datasource removed from targets

This commit is contained in:
Alexander Zobnin
2019-03-01 13:12:08 +03:00
parent a71d101f77
commit 956ad652fb

View File

@@ -83,6 +83,12 @@ class TriggersTabCtrl {
this.panel.targets[ds] = getDefaultTarget();
}
});
// Remove unchecked targets
_.each(this.panel.targets, (target, ds) => {
if (!_.includes(this.panel.datasources, ds)) {
delete this.panel.targets[ds];
}
});
this.parseTarget();
}