From 7c1be021acd6f266725a998008289f58f6e25fe1 Mon Sep 17 00:00:00 2001 From: Dan Cech Date: Wed, 27 Dec 2017 13:53:12 -0500 Subject: [PATCH] use typeahead value in graphite find requests --- public/app/plugins/datasource/graphite/query_ctrl.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/graphite/query_ctrl.ts b/public/app/plugins/datasource/graphite/query_ctrl.ts index b9ed9f3cb9c..d7bb924a4f6 100644 --- a/public/app/plugins/datasource/graphite/query_ctrl.ts +++ b/public/app/plugins/datasource/graphite/query_ctrl.ts @@ -106,7 +106,10 @@ export class GraphiteQueryCtrl extends QueryCtrl { } getAltSegments(index, prefix) { - var query = index === 0 ? '*' : this.queryModel.getSegmentPathUpTo(index) + '.*'; + var query = '*' + prefix + '*'; + if (index > 0) { + query = this.queryModel.getSegmentPathUpTo(index) + '.' + query; + } var options = { range: this.panelCtrl.range, requestId: 'get-alt-segments',