Commit c3f1d1a6 by bergquist

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

closes #5005
parent ac674bd4
...@@ -3,6 +3,7 @@ ...@@ -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 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) * **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) * **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) # 3.0.1 Stable (2016-05-11)
......
...@@ -45,7 +45,7 @@ export default class InfluxDatasource { ...@@ -45,7 +45,7 @@ export default class InfluxDatasource {
var i, y; var i, y;
var allQueries = _.map(options.targets, (target) => { var allQueries = _.map(options.targets, (target) => {
if (target.hide) { return []; } if (target.hide) { return ""; }
queryTargets.push(target); queryTargets.push(target);
...@@ -54,8 +54,12 @@ export default class InfluxDatasource { ...@@ -54,8 +54,12 @@ export default class InfluxDatasource {
var query = queryModel.render(true); var query = queryModel.render(true);
query = query.replace(/\$interval/g, (target.interval || options.interval)); query = query.replace(/\$interval/g, (target.interval || options.interval));
return query; return query;
}).reduce((acc, current) => {
}).join(";"); if (current !== "") {
acc += ";" + current;
}
return acc;
});
// replace grafana variables // replace grafana variables
allQueries = allQueries.replace(/\$timeFilter/g, timeFilter); 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