diff --git a/CHANGELOG.md b/CHANGELOG.md index bfff6ea811a..f0a3ff0104d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ it allows you to add queries of differnet data source types & instances to the s - [Issue #2564](https://github.com/grafana/grafana/issues/2564). Templating: Another atempt at fixing #2534 (Init multi value template var used in repeat panel from url) - [Issue #2620](https://github.com/grafana/grafana/issues/2620). Graph: multi series tooltip did no highlight correct point when stacking was enabled and series were of different resolution - [Issue #2636](https://github.com/grafana/grafana/issues/2636). InfluxDB: Do no show template vars in dropdown for tag keys and group by keys +- [Issue #2651](https://github.com/grafana/grafana/issues/2651). InfluxDB: Fixed issue when using the eye to disable queries in the query editor and when applying aliases **Breaking Changes** - Notice to makers/users of custom data sources, there is a minor breaking change in 2.2 that diff --git a/public/app/plugins/datasource/influxdb/datasource.js b/public/app/plugins/datasource/influxdb/datasource.js index fb9bb0f8e46..4657bc2b93f 100644 --- a/public/app/plugins/datasource/influxdb/datasource.js +++ b/public/app/plugins/datasource/influxdb/datasource.js @@ -33,11 +33,14 @@ function (angular, _, kbn, InfluxSeries, InfluxQueryBuilder) { InfluxDatasource.prototype.query = function(options) { var timeFilter = getTimeFilter(options); + var queryTargets = []; var i, y; var allQueries = _.map(options.targets, function(target) { if (target.hide) { return []; } + queryTargets.push(target); + // build query var queryBuilder = new InfluxQueryBuilder(target); var query = queryBuilder.build(); @@ -61,7 +64,7 @@ function (angular, _, kbn, InfluxSeries, InfluxQueryBuilder) { var result = data.results[i]; if (!result || !result.series) { continue; } - var alias = (options.targets[i] || {}).alias; + var alias = (queryTargets[i] || {}).alias; if (alias) { alias = templateSrv.replace(alias, options.scopedVars); }