From 32f89f65da285e4008b00e1a02fa1f7afa93f023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 16 Mar 2017 09:54:33 +0100 Subject: [PATCH] fix: Data source group by time interval did not take effect on initial query after dashboard load, fixes #7839 --- public/app/features/panel/metrics_panel_ctrl.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/app/features/panel/metrics_panel_ctrl.ts b/public/app/features/panel/metrics_panel_ctrl.ts index 7ed360aab1a..ec4dae85a5a 100644 --- a/public/app/features/panel/metrics_panel_ctrl.ts +++ b/public/app/features/panel/metrics_panel_ctrl.ts @@ -90,8 +90,6 @@ class MetricsPanelCtrl extends PanelCtrl { delete this.error; this.loading = true; - this.updateTimeRange(); - // load datasource service this.setTimeQueryStart(); this.datasourceSrv.get(this.panel.datasource) @@ -196,6 +194,7 @@ class MetricsPanelCtrl extends PanelCtrl { issueQueries(datasource) { this.datasource = datasource; + this.updateTimeRange(); if (!this.panel.targets || this.panel.targets.length === 0) { return this.$q.when([]);