mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
support metric trees of varying depth, never send '.select metric' to graphite
This commit is contained in:
parent
8dcfa18761
commit
525ae4fdf5
@ -152,7 +152,7 @@ export default class GraphiteQuery {
|
||||
updateModelTarget(targets) {
|
||||
// render query
|
||||
if (!this.target.textEditor) {
|
||||
var metricPath = this.getSegmentPathUpTo(this.segments.length);
|
||||
var metricPath = this.getSegmentPathUpTo(this.segments.length).replace(/\.select metric$/, '');
|
||||
this.target.target = _.reduce(this.functions, wrapFunction, metricPath);
|
||||
}
|
||||
|
||||
|
@ -219,10 +219,7 @@ export class GraphiteQueryCtrl extends QueryCtrl {
|
||||
this.updateModelTarget();
|
||||
|
||||
if (this.queryModel.target !== oldTarget) {
|
||||
var lastSegment = this.segments.length > 0 ? this.segments[this.segments.length - 1] : {};
|
||||
if (lastSegment.value !== 'select metric') {
|
||||
this.panelCtrl.refresh();
|
||||
}
|
||||
this.panelCtrl.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user