mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 15:45:43 -06: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:
parent
bb52f3670e
commit
871b98c06b
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user