mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 08:18:10 -05:00
graphite: minor fix for PR #10142 the query was being sent for every segmen t you selected before you completed the metric path
This commit is contained in:
@@ -120,6 +120,10 @@ export default class GraphiteQuery {
|
||||
this.segments.push({value: "select metric"});
|
||||
}
|
||||
|
||||
hasSelectMetric() {
|
||||
return this.segments[this.segments.length - 1].value === 'select metric';
|
||||
}
|
||||
|
||||
addFunction(newFunc) {
|
||||
this.functions.push(newFunc);
|
||||
this.moveAliasFuncLast();
|
||||
|
||||
@@ -218,7 +218,7 @@ export class GraphiteQueryCtrl extends QueryCtrl {
|
||||
var oldTarget = this.queryModel.target.target;
|
||||
this.updateModelTarget();
|
||||
|
||||
if (this.queryModel.target !== oldTarget) {
|
||||
if (this.queryModel.target !== oldTarget && !this.queryModel.hasSelectMetric()) {
|
||||
this.panelCtrl.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user