Commit dc08093f by Mitsuhiro Tanda

minor fix

parent 3031c2e6
...@@ -585,7 +585,7 @@ export class PrometheusDatasource { ...@@ -585,7 +585,7 @@ export class PrometheusDatasource {
} }
getTimeRange(): { start: number; end: number } { getTimeRange(): { start: number; end: number } {
let range = this.timeSrv.timeRange(); const range = this.timeSrv.timeRange();
return { return {
start: this.getPrometheusTime(range.from, false), start: this.getPrometheusTime(range.from, false),
end: this.getPrometheusTime(range.to, true), end: this.getPrometheusTime(range.to, true),
......
...@@ -619,9 +619,9 @@ describe('PrometheusDatasource', () => { ...@@ -619,9 +619,9 @@ describe('PrometheusDatasource', () => {
beforeEach(async () => { beforeEach(async () => {
options.annotation.useValueForTime = false; options.annotation.useValueForTime = false;
backendSrv.datasourceRequest = jest.fn(() => Promise.resolve(response)); 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; results = data;
}); });
}); });
...@@ -639,9 +639,9 @@ describe('PrometheusDatasource', () => { ...@@ -639,9 +639,9 @@ describe('PrometheusDatasource', () => {
beforeEach(async () => { beforeEach(async () => {
options.annotation.useValueForTime = true; options.annotation.useValueForTime = true;
backendSrv.datasourceRequest = jest.fn(() => Promise.resolve(response)); 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; results = data;
}); });
}); });
......
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