Sfoglia il codice sorgente

Alert tab fails when datasource method targetContainsTemplate doesnt exist #14274

Johannes Schill 7 anni fa
parent
commit
fe9e4b51f1
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      public/app/features/alerting/AlertTabCtrl.ts

+ 1 - 1
public/app/features/alerting/AlertTabCtrl.ts

@@ -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 = '';