minor fix

This commit is contained in:
Mitsuhiro Tanda
2018-09-13 20:15:33 +09:00
parent 3031c2e6fc
commit dc08093f6c
2 changed files with 5 additions and 5 deletions
@@ -585,7 +585,7 @@ export class PrometheusDatasource {
}
getTimeRange(): { start: number; end: number } {
let range = this.timeSrv.timeRange();
const range = this.timeSrv.timeRange();
return {
start: this.getPrometheusTime(range.from, false),
end: this.getPrometheusTime(range.to, true),
@@ -619,9 +619,9 @@ describe('PrometheusDatasource', () => {
beforeEach(async () => {
options.annotation.useValueForTime = false;
backendSrv.datasourceRequest = jest.fn(() => Promise.resolve(response));
ctx.ds = new PrometheusDatasource(instanceSettings, q, <any>backendSrv, templateSrv, timeSrv);
ctx.ds = new PrometheusDatasource(instanceSettings, q, backendSrv as any, templateSrv, timeSrv);
await ctx.ds.annotationQuery(options).then(function (data) {
await ctx.ds.annotationQuery(options).then(data => {
results = data;
});
});
@@ -639,9 +639,9 @@ describe('PrometheusDatasource', () => {
beforeEach(async () => {
options.annotation.useValueForTime = true;
backendSrv.datasourceRequest = jest.fn(() => Promise.resolve(response));
ctx.ds = new PrometheusDatasource(instanceSettings, q, <any>backendSrv, templateSrv, timeSrv);
ctx.ds = new PrometheusDatasource(instanceSettings, q, backendSrv as any, templateSrv, timeSrv);
await ctx.ds.annotationQuery(options).then(function (data) {
await ctx.ds.annotationQuery(options).then(data => {
results = data;
});
});