Parcourir la source

process this.target separately to fix issues with tests

Dan Cech il y a 8 ans
Parent
commit
a64e000f1a
1 fichiers modifiés avec 7 ajouts et 3 suppressions
  1. 7 3
      public/app/plugins/datasource/graphite/query_ctrl.ts

+ 7 - 3
public/app/plugins/datasource/graphite/query_ctrl.ts

@@ -220,9 +220,13 @@ export class GraphiteQueryCtrl extends QueryCtrl {
       this.target.target = _.reduce(this.functions, this.wrapFunction, metricPath);
       this.target.target = _.reduce(this.functions, this.wrapFunction, metricPath);
     }
     }
 
 
-    // loop through queries and update targetFull as needed
-    for (const target of this.panelCtrl.panel.targets) {
-      this.resolveTarget(target);
+    this.resolveTarget(this.target);
+
+    // loop through other queries and update targetFull as needed
+    for (const target of this.panelCtrl.panel.targets || []) {
+      if (target.refId !== this.target.refId) {
+        this.resolveTarget(target);
+      }
     }
     }
   }
   }