diff --git a/public/app/features/dashboard/model.ts b/public/app/features/dashboard/model.ts index f0a32fd58fc..fa15acf823f 100644 --- a/public/app/features/dashboard/model.ts +++ b/public/app/features/dashboard/model.ts @@ -493,8 +493,6 @@ export class DashboardModel { templateVariable.hide = 2; } else if (templateVariable.hideLabel) { templateVariable.hide = 1; - } else { - templateVariable.hide = 0; } }); } diff --git a/public/app/features/dashboard/submenu/submenu.ts b/public/app/features/dashboard/submenu/submenu.ts index 2ecb298236c..5e011b7588d 100644 --- a/public/app/features/dashboard/submenu/submenu.ts +++ b/public/app/features/dashboard/submenu/submenu.ts @@ -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() { diff --git a/public/dashboards/scripted_templated.js b/public/dashboards/scripted_templated.js index 33830336a9f..a6431f15973 100644 --- a/public/dashboards/scripted_templated.js +++ b/public/dashboards/scripted_templated.js @@ -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, } ] };