Commit fe9e4b51 by Johannes Schill

Alert tab fails when datasource method targetContainsTemplate doesnt exist #14274

parent 9cbdd073
......@@ -262,7 +262,7 @@ export class AlertTabCtrl {
this.datasourceSrv.get(datasourceName).then(ds => {
if (!ds.meta.alerting) {
this.error = 'The datasource does not support alerting queries';
} else if (ds.targetContainsTemplate(foundTarget)) {
} else if (ds.targetContainsTemplate && ds.targetContainsTemplate(foundTarget)) {
this.error = 'Template variables are not supported in alert queries';
} else {
this.error = '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment