From b6a4db3f8aa8e991f5d20ae37c7a06480439335a Mon Sep 17 00:00:00 2001 From: Anthony Woods Date: Fri, 24 Apr 2015 00:19:16 +0800 Subject: [PATCH] always refresh varible options if refresh=true --- public/app/features/templating/templateValuesSrv.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/app/features/templating/templateValuesSrv.js b/public/app/features/templating/templateValuesSrv.js index e933c16796f..3df2c831b6f 100644 --- a/public/app/features/templating/templateValuesSrv.js +++ b/public/app/features/templating/templateValuesSrv.js @@ -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); }