Browse Source

fix(table): fixed issue with using mixed data source in table panel, fixes #5999

Torkel Ödegaard 9 years ago
parent
commit
7aab4a4a59
2 changed files with 4 additions and 1 deletions
  1. 3 0
      CHANGELOG.md
  2. 1 1
      public/app/features/panel/metrics_panel_ctrl.ts

+ 3 - 0
CHANGELOG.md

@@ -15,6 +15,9 @@
 ### Breaking changes
 ### Breaking changes
 * **SystemD**: Change systemd description, closes [#5971](https://github.com/grafana/grafana/pull/5971)
 * **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)
 # 3.1.2 (unreleased)
 * **Templating**: Fixed issue when combining row & panel repeats, fixes [#5790](https://github.com/grafana/grafana/issues/5790)
 * **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)
 * **Drag&Drop**: Fixed issue with drag and drop in latest Chrome(51+), fixes [#5767](https://github.com/grafana/grafana/issues/5767)

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

@@ -244,7 +244,7 @@ class MetricsPanelCtrl extends PanelCtrl {
     if (datasource.meta.mixed) {
     if (datasource.meta.mixed) {
       _.each(this.panel.targets, target => {
       _.each(this.panel.targets, target => {
         target.datasource = this.panel.datasource;
         target.datasource = this.panel.datasource;
-        if (target.datasource === null) {
+        if (!target.datasource) {
           target.datasource = config.defaultDatasource;
           target.datasource = config.defaultDatasource;
         }
         }
       });
       });