Forráskód Böngészése

graphite: remove check so that query is sent even for possible non leaf nodes

Torkel Ödegaard 8 éve
szülő
commit
a02086814e

+ 1 - 1
docker/blocks/graphite/docker-compose.yaml

@@ -1,4 +1,4 @@
-  graphite:
+  graphite09:
     build: blocks/graphite
     ports:
       - "8080:80"

+ 0 - 8
public/app/plugins/datasource/graphite/graphite_query.ts

@@ -120,14 +120,6 @@ export default class GraphiteQuery {
     this.segments.push({value: "select metric"});
   }
 
-  hasSelectMetric() {
-    if (this.segments.length > 0) {
-      return this.segments[this.segments.length - 1].value === 'select metric';
-    } else {
-      return false;
-    }
-  }
-
   addFunction(newFunc) {
     this.functions.push(newFunc);
     this.moveAliasFuncLast();

+ 1 - 1
public/app/plugins/datasource/graphite/query_ctrl.ts

@@ -218,7 +218,7 @@ export class GraphiteQueryCtrl extends QueryCtrl {
     var oldTarget = this.queryModel.target.target;
     this.updateModelTarget();
 
-    if (this.queryModel.target !== oldTarget && !this.queryModel.hasSelectMetric()) {
+    if (this.queryModel.target !== oldTarget) {
       this.panelCtrl.refresh();
     }
   }