feat(testdata): progress on test data stuff

This commit is contained in:
Torkel Ödegaard
2016-09-27 18:36:00 +02:00
parent 3ecd96e682
commit 22e8885690
7 changed files with 297 additions and 5 deletions

View File

@@ -227,8 +227,8 @@ export class AlertTabCtrl {
var datasourceName = foundTarget.datasource || this.panel.datasource;
this.datasourceSrv.get(datasourceName).then(ds => {
if (ds.meta.id !== 'graphite' && ds.meta.id !== 'prometheus') {
this.error = 'You datsource does not support alerting queries';
if (!ds.meta.alerting) {
this.error = 'The datasource does not support alerting queries';
} else if (this.templateSrv.variableExists(foundTarget.target)) {
this.error = 'Template variables are not supported in alert queries';
} else {

View File

@@ -30,6 +30,7 @@ export class DashboardModel {
snapshot: any;
schemaVersion: number;
version: number;
revision: number;
links: any;
gnetId: any;
meta: any;
@@ -42,6 +43,7 @@ export class DashboardModel {
this.events = new Emitter();
this.id = data.id || null;
this.revision = data.revision;
this.title = data.title || 'No Title';
this.autoUpdate = data.autoUpdate;
this.description = data.description;