Ver Fonte

fix(mixed data source): fixed issue with mixed data sources in same graph, fixes #4604

Torkel Ödegaard há 9 anos atrás
pai
commit
781fed1079
2 ficheiros alterados com 7 adições e 2 exclusões
  1. 1 0
      CHANGELOG.md
  2. 6 2
      public/app/features/panel/metrics_panel_ctrl.ts

+ 1 - 0
CHANGELOG.md

@@ -12,6 +12,7 @@
 * **Graph Panel**: Fixed issue with axis labels overlapping Y-axis, fixes [#4626](https://github.com/grafana/grafana/issues/4626)
 * **InfluxDB**: Fixed issue with templating query containing template variable, fixes [#4602](https://github.com/grafana/grafana/issues/4602)
 * **Graph Panel**: Fixed issue with hiding series and stacking, fixes [#4557](https://github.com/grafana/grafana/issues/4557)
+* **Mixed Datasources**: Fixed issue with mixing many datasources in same graph, fixes [#4604](https://github.com/grafana/grafana/issues/4604)
 
 # 3.0.0-beta2 (2016-04-04)
 

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

@@ -252,8 +252,12 @@ class MetricsPanelCtrl extends PanelCtrl {
   }
 
   addDataQuery(datasource) {
-    var target = {
-    };
+    var target: any = {};
+
+    if (datasource) {
+      target.datasource = datasource.name;
+    }
+
     this.panel.targets.push(target);
   }
 }