mirror of
https://github.com/grafana/grafana.git
synced 2025-09-28 21:43:48 +08:00
Merge branch 'tsconfig-no-implicit-this'
This commit is contained in:
@ -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) {
|
||||
|
@ -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(),
|
||||
};
|
||||
|
Reference in New Issue
Block a user