Przeglądaj źródła

always refresh varible options if refresh=true

Anthony Woods 10 lat temu
rodzic
commit
b6a4db3f8a

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