fix(dashboard): minor fix to schema upgrade when schemaVersion is not correct, fixes #6650

This commit is contained in:
Torkel Ödegaard
2016-11-22 14:20:24 +01:00
parent 6882dcfb99
commit 34790e1fab
3 changed files with 11 additions and 11 deletions
-2
View File
@@ -493,8 +493,6 @@ export class DashboardModel {
templateVariable.hide = 2;
} else if (templateVariable.hideLabel) {
templateVariable.hide = 1;
} else {
templateVariable.hide = 0;
}
});
}
@@ -15,6 +15,7 @@ export class SubmenuCtrl {
private $location) {
this.annotations = this.dashboard.templating.list;
this.variables = this.variableSrv.variables;
console.log(this.variables);
}
annotationStateChanged() {
+10 -9
View File
@@ -25,8 +25,10 @@ var ARGS;
// Intialize a skeleton with nothing but a rows array and service object
dashboard = {
rows : [],
schemaVersion: 13,
};
// Set a title
dashboard.title = 'Scripted and templated dash';
@@ -39,23 +41,22 @@ dashboard.time = {
};
dashboard.templating = {
enable: true,
list: [
{
name: 'test',
query: 'apps.backend.*',
refresh: true,
options: [],
current: null,
type: 'custom'
refresh: 1,
type: 'query',
datasource: null,
hide: 2,
},
{
name: 'test2',
query: '*',
refresh: true,
options: [],
current: null,
type: 'custom'
refresh: 1,
type: 'query',
datasource: null,
hide: 2,
}
]
};