Sfoglia il codice sorgente

fix bug: can't get the aggregators from opentsdb server

godfreyhe 9 anni fa
parent
commit
8e7a127792
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      public/app/plugins/datasource/opentsdb/query_ctrl.ts

+ 2 - 1
public/app/plugins/datasource/opentsdb/query_ctrl.ts

@@ -38,8 +38,9 @@ export class OpenTsQueryCtrl extends QueryCtrl {
       this.target.downsampleFillPolicy = 'none';
       this.target.downsampleFillPolicy = 'none';
     }
     }
 
 
+    var self = this;
     this.datasource.getAggregators().then(function(aggs) {
     this.datasource.getAggregators().then(function(aggs) {
-      this.aggregators = aggs;
+      self.aggregators = aggs;
     });
     });
 
 
     // needs to be defined here as it is called from typeahead
     // needs to be defined here as it is called from typeahead