always refresh varible options if refresh=true

This commit is contained in:
Anthony Woods
2015-04-24 00:19:16 +08:00
parent e9a174d1c5
commit b6a4db3f8a

View File

@@ -28,6 +28,9 @@ function (angular, _, kbn) {
for (var i = 0; i < this.variables.length; i++) {
var variable = this.variables[i];
var urlValue = queryParams['var-' + variable.name];
if (variable.refresh) {
promises.push(this.updateOptions(variable));
}
if (urlValue !== void 0) {
var option = _.findWhere(variable.options, { text: urlValue });
option = option || { text: urlValue, value: urlValue };
@@ -37,9 +40,6 @@ function (angular, _, kbn) {
promises.push(promise);
}
else if (variable.refresh) {
promises.push(this.updateOptions(variable));
}
else if (variable.type === 'interval') {
this.updateAutoInterval(variable);
}