mirror of
https://github.com/grafana/grafana.git
synced 2026-08-14 07:04:57 -05:00
fix(dashboard): minor fix to schema upgrade when schemaVersion is not correct, fixes #6650
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user