Преглед изворни кода

always refresh varible options if refresh=true

Anthony Woods пре 10 година
родитељ
комит
b6a4db3f8a
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      public/app/features/templating/templateValuesSrv.js

+ 3 - 3
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);
         }