From 7aab4a4a590cbdbe29434c5a1df258ffc976e326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 10 Sep 2016 09:56:03 +0200 Subject: [PATCH] fix(table): fixed issue with using mixed data source in table panel, fixes #5999 --- CHANGELOG.md | 3 +++ public/app/features/panel/metrics_panel_ctrl.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 055aa9316fe..d66b8075625 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ ### Breaking changes * **SystemD**: Change systemd description, closes [#5971](https://github.com/grafana/grafana/pull/5971) +### Bugfixes +* **Table Panel**: Fixed problem when switching to Mixed datasource in metrics tab, fixes [#5999](https://github.com/grafana/grafana/pull/5999) + # 3.1.2 (unreleased) * **Templating**: Fixed issue when combining row & panel repeats, fixes [#5790](https://github.com/grafana/grafana/issues/5790) * **Drag&Drop**: Fixed issue with drag and drop in latest Chrome(51+), fixes [#5767](https://github.com/grafana/grafana/issues/5767) diff --git a/public/app/features/panel/metrics_panel_ctrl.ts b/public/app/features/panel/metrics_panel_ctrl.ts index 269559bc22a..4721035900c 100644 --- a/public/app/features/panel/metrics_panel_ctrl.ts +++ b/public/app/features/panel/metrics_panel_ctrl.ts @@ -244,7 +244,7 @@ class MetricsPanelCtrl extends PanelCtrl { if (datasource.meta.mixed) { _.each(this.panel.targets, target => { target.datasource = this.panel.datasource; - if (target.datasource === null) { + if (!target.datasource) { target.datasource = config.defaultDatasource; } });