Commit 2752dbd1 by Torkel Ödegaard

feat(templating): minor fixes to recent refactorings

parent 6257ae09
...@@ -36,7 +36,9 @@ export class VariableSrv { ...@@ -36,7 +36,9 @@ export class VariableSrv {
var queryParams = this.$location.search(); var queryParams = this.$location.search();
return this.$q.all(this.variables.map(variable => { return this.$q.all(this.variables.map(variable => {
return this.processVariable(variable, queryParams); return this.processVariable(variable, queryParams);
})); })).then(() => {
this.templateSrv.updateTemplateData();
});
} }
onDashboardRefresh() { onDashboardRefresh() {
...@@ -155,8 +157,7 @@ export class VariableSrv { ...@@ -155,8 +157,7 @@ export class VariableSrv {
validateVariableSelectionState(variable) { validateVariableSelectionState(variable) {
if (!variable.current) { if (!variable.current) {
if (!variable.options.length) { return this.$q.when(); } variable.current = {};
return variable.setValue(variable.options[0]);
} }
if (_.isArray(variable.current.value)) { if (_.isArray(variable.current.value)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment