Commit c3f1d1a6 by bergquist

fix(influxdb): fixes extra semi colon due to hidden series

closes #5005
parent ac674bd4
......@@ -3,6 +3,7 @@
* **Templating**: Fixed issue mixing row repeat and panel repeats, fixes [#4988](https://github.com/grafana/grafana/issues/4988)
* **Templating**: Fixed issue detecting dependencies in nested variables, fixes [#4987](https://github.com/grafana/grafana/issues/4987), fixes [#4986](https://github.com/grafana/grafana/issues/4986)
* **Graph**: Fixed broken PNG rendering in graph panel, fixes [#5025](https://github.com/grafana/grafana/issues/5025)
* **Influxdb**: Fixes crash when hiding middle serie, fixes [#5005](https://github.com/grafana/grafana/issues/5005)
# 3.0.1 Stable (2016-05-11)
......
......@@ -45,7 +45,7 @@ export default class InfluxDatasource {
var i, y;
var allQueries = _.map(options.targets, (target) => {
if (target.hide) { return []; }
if (target.hide) { return ""; }
queryTargets.push(target);
......@@ -54,8 +54,12 @@ export default class InfluxDatasource {
var query = queryModel.render(true);
query = query.replace(/\$interval/g, (target.interval || options.interval));
return query;
}).join(";");
}).reduce((acc, current) => {
if (current !== "") {
acc += ";" + current;
}
return acc;
});
// replace grafana variables
allQueries = allQueries.replace(/\$timeFilter/g, timeFilter);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment