Browse Source

use typeahead value in graphite find requests

Dan Cech 8 years ago
parent
commit
7c1be021ac
1 changed files with 4 additions and 1 deletions
  1. 4 1
      public/app/plugins/datasource/graphite/query_ctrl.ts

+ 4 - 1
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',