changed var to const (#13061)

This commit is contained in:
Patrick O'Carroll
2018-08-29 14:26:50 +02:00
committed by Torkel Ödegaard
parent 9423e3e124
commit 5e0d0c5816
50 changed files with 298 additions and 299 deletions

View File

@@ -6,15 +6,15 @@ class MixedDatasource {
constructor(private $q, private datasourceSrv) {}
query(options) {
var sets = _.groupBy(options.targets, 'datasource');
var promises = _.map(sets, targets => {
var dsName = targets[0].datasource;
const sets = _.groupBy(options.targets, 'datasource');
const promises = _.map(sets, targets => {
const dsName = targets[0].datasource;
if (dsName === '-- Mixed --') {
return this.$q([]);
}
return this.datasourceSrv.get(dsName).then(function(ds) {
var opt = angular.copy(options);
const opt = angular.copy(options);
opt.targets = targets;
return ds.query(opt);
});