Commit ba1e1532 by Mitsuhiro Tanda

change option name more clearly

parent f11b4cb4
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
</div> </div>
<div class="gf-form"> <div class="gf-form">
<span class="gf-form-label width-7">Refresh</span> <span class="gf-form-label width-7">Refresh</span>
<select class="input-large tight-form-input" ng-model="current.refresh" ng-options="f for f in ['Never', 'On Dashboard Load', 'On Time Change']"></select> <select class="input-large tight-form-input" ng-model="current.refresh" ng-options="f for f in ['Never', 'On Dashboard Load', 'On Time Change and Dashboard Load']"></select>
<tip>When to update the values of this template, will slow down dashboard load / time change</tip> <tip>When to update the values of this template, will slow down dashboard load / time change</tip>
</div> </div>
</div> </div>
......
...@@ -24,7 +24,7 @@ function (angular, _, kbn) { ...@@ -24,7 +24,7 @@ function (angular, _, kbn) {
var promises = []; var promises = [];
for (var i = 0; i < self.variables.length; i++) { for (var i = 0; i < self.variables.length; i++) {
var variable = self.variables[i]; var variable = self.variables[i];
if (variable.refresh === 'On Time Change') { if (variable.refresh === 'On Time Change and Dashboard Load') {
promises.push(self.updateOptions(variable)); promises.push(self.updateOptions(variable));
} }
} }
...@@ -71,7 +71,7 @@ function (angular, _, kbn) { ...@@ -71,7 +71,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') { else if (variable.refresh === 'On Dashboard Load' || variable.refresh === 'On Time Change and Dashboard Load') {
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);
......
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