Skip to content

Commit 781fed1

Browse files
committed
fix(mixed data source): fixed issue with mixed data sources in same graph, fixes grafana#4604
1 parent ebb373e commit 781fed1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* **Graph Panel**: Fixed issue with axis labels overlapping Y-axis, fixes [#4626](https://github.com/grafana/grafana/issues/4626)
1313
* **InfluxDB**: Fixed issue with templating query containing template variable, fixes [#4602](https://github.com/grafana/grafana/issues/4602)
1414
* **Graph Panel**: Fixed issue with hiding series and stacking, fixes [#4557](https://github.com/grafana/grafana/issues/4557)
15+
* **Mixed Datasources**: Fixed issue with mixing many datasources in same graph, fixes [#4604](https://github.com/grafana/grafana/issues/4604)
1516

1617
# 3.0.0-beta2 (2016-04-04)
1718

public/app/features/panel/metrics_panel_ctrl.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,12 @@ class MetricsPanelCtrl extends PanelCtrl {
252252
}
253253

254254
addDataQuery(datasource) {
255-
var target = {
256-
};
255+
var target: any = {};
256+
257+
if (datasource) {
258+
target.datasource = datasource.name;
259+
}
260+
257261
this.panel.targets.push(target);
258262
}
259263
}

0 commit comments

Comments
 (0)