Commit 499bad5f by Torkel Ödegaard

Merge pull request #4320 from mtanda/templating_fix_on_time_range_change

fix to use variable.refresh flag
parents 6670e6cd df2a23d1
...@@ -74,7 +74,7 @@ function (angular, _, kbn) { ...@@ -74,7 +74,7 @@ function (angular, _, kbn) {
if (urlValue !== void 0) { if (urlValue !== void 0) {
return self.setVariableFromUrl(variable, urlValue).then(lock.resolve); return self.setVariableFromUrl(variable, urlValue).then(lock.resolve);
} }
else if (variable.refresh === 'On Dashboard Load' || variable.refresh === 'On Time Change and Dashboard Load') { else if (variable.refresh === 1 || variable.refresh === 2) {
return self.updateOptions(variable).then(function() { return self.updateOptions(variable).then(function() {
if (_.isEmpty(variable.current) && variable.options.length) { if (_.isEmpty(variable.current) && variable.options.length) {
console.log("setting current for %s", variable.name); console.log("setting current for %s", variable.name);
......
...@@ -258,6 +258,6 @@ ...@@ -258,6 +258,6 @@
"annotations": { "annotations": {
"enable": false "enable": false
}, },
"refresh": "Never", "refresh": 0,
"version": 6 "version": 6
} }
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