Commit 745a7b44 by Torkel Ödegaard

fix(influxdb): Fixed issue when using the eye to disable queries in the query…

fix(influxdb): Fixed issue when using the eye to disable queries in the query editor and when applying aliases, #2651
parent 74da5a61
......@@ -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
......
......@@ -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);
}
......
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