Explorar el Código

use typeahead value in graphite find requests

Dan Cech hace 8 años
padre
commit
7c1be021ac
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  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) {
   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 = {
     var options = {
       range: this.panelCtrl.range,
       range: this.panelCtrl.range,
       requestId: 'get-alt-segments',
       requestId: 'get-alt-segments',