Explorar el Código

fix: Data source group by time interval did not take effect on initial query after dashboard load, fixes #7839

Torkel Ödegaard hace 8 años
padre
commit
32f89f65da
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1 2
      public/app/features/panel/metrics_panel_ctrl.ts

+ 1 - 2
public/app/features/panel/metrics_panel_ctrl.ts

@@ -90,8 +90,6 @@ class MetricsPanelCtrl extends PanelCtrl {
     delete this.error;
     delete this.error;
     this.loading = true;
     this.loading = true;
 
 
-    this.updateTimeRange();
-
     // load datasource service
     // load datasource service
     this.setTimeQueryStart();
     this.setTimeQueryStart();
     this.datasourceSrv.get(this.panel.datasource)
     this.datasourceSrv.get(this.panel.datasource)
@@ -196,6 +194,7 @@ class MetricsPanelCtrl extends PanelCtrl {
 
 
   issueQueries(datasource) {
   issueQueries(datasource) {
     this.datasource = datasource;
     this.datasource = datasource;
+    this.updateTimeRange();
 
 
     if (!this.panel.targets || this.panel.targets.length === 0) {
     if (!this.panel.targets || this.panel.targets.length === 0) {
       return this.$q.when([]);
       return this.$q.when([]);