feat(alerting): add template validation for influxdb

closes #6230
This commit is contained in:
bergquist
2016-10-11 16:00:59 +02:00
parent 2e21613be7
commit 0d4b00df95
4 changed files with 27 additions and 1 deletions

View File

@@ -231,7 +231,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 (this.templateSrv.variableExists(foundTarget.target)) {
} else if (ds.targetContainsTemplate(foundTarget)) {
this.error = 'Template variables are not supported in alert queries';
} else {
this.error = '';