Browse Source

remove on metric type change

Erik Sundell 7 years ago
parent
commit
7cc42d7c13
1 changed files with 3 additions and 7 deletions
  1. 3 7
      public/app/plugins/datasource/stackdriver/query_filter_ctrl.ts

+ 3 - 7
public/app/plugins/datasource/stackdriver/query_filter_ctrl.ts

@@ -60,7 +60,9 @@ export class StackdriverFilterCtrl {
 
   handleMetricTypeChange(value) {
     this.target.metricType = value;
-    this.onMetricTypeChange();
+    this.setMetricType();
+    this.$scope.refresh();
+    this.getLabels();
   }
 
   initSegments(hideGroupBys: boolean) {
@@ -191,12 +193,6 @@ export class StackdriverFilterCtrl {
     }
   }
 
-  async onMetricTypeChange() {
-    this.setMetricType();
-    this.$scope.refresh();
-    this.getLabels();
-  }
-
   setMetricType() {
     const { valueType, metricKind, unit } = this.metricDescriptors.find(
       m => m.type === this.templateSrv.replace(this.target.metricType)