Merge branch 'tsconfig-no-implicit-this'

This commit is contained in:
Torkel Ödegaard
2018-08-30 11:46:13 +02:00
27 changed files with 90 additions and 113 deletions

View File

@ -203,7 +203,7 @@ export class ElasticDatasource {
this.timeSrv.setTime({ from: 'now-1m', to: 'now' }, true);
// validate that the index exist and has date field
return this.getFields({ type: 'date' }).then(
function(dateFields) {
dateFields => {
const timeField = _.find(dateFields, { text: this.timeField });
if (!timeField) {
return {
@ -212,7 +212,7 @@ export class ElasticDatasource {
};
}
return { status: 'success', message: 'Index OK. Time field name OK.' };
}.bind(this),
},
function(err) {
console.log(err);
if (err.data && err.data.error) {

View File

@ -5,7 +5,7 @@ import { ElasticDatasource } from '../datasource';
import * as dateMath from 'app/core/utils/datemath';
describe('ElasticDatasource', function() {
describe('ElasticDatasource', function(this: any) {
const backendSrv = {
datasourceRequest: jest.fn(),
};