From a64e000f1aa5bd3d7a3f71e937439a49b66e90a2 Mon Sep 17 00:00:00 2001 From: Dan Cech Date: Mon, 17 Apr 2017 11:10:55 -0400 Subject: [PATCH] process this.target separately to fix issues with tests --- public/app/plugins/datasource/graphite/query_ctrl.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/app/plugins/datasource/graphite/query_ctrl.ts b/public/app/plugins/datasource/graphite/query_ctrl.ts index ce2baea0b76..7c89ac1a0a9 100644 --- a/public/app/plugins/datasource/graphite/query_ctrl.ts +++ b/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); } - // 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); + } } }