Fix error for new empty panel, fixes #337
This commit is contained in:
@@ -394,7 +394,9 @@ class ZabbixAPIDatasource {
|
|||||||
replaceTargetVariables(target, options) {
|
replaceTargetVariables(target, options) {
|
||||||
let parts = ['group', 'host', 'application', 'item'];
|
let parts = ['group', 'host', 'application', 'item'];
|
||||||
parts.forEach(p => {
|
parts.forEach(p => {
|
||||||
|
if (target[p] && target[p].filter) {
|
||||||
target[p].filter = this.replaceTemplateVars(target[p].filter, options.scopedVars);
|
target[p].filter = this.replaceTemplateVars(target[p].filter, options.scopedVars);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
target.textFilter = this.replaceTemplateVars(target.textFilter, options.scopedVars);
|
target.textFilter = this.replaceTemplateVars(target.textFilter, options.scopedVars);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user