mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DataLinks: Use datapoint timestamp correctly when interpolating variables (#18459)
This commit is contained in:
parent
7520166f17
commit
20d0c07359
@ -132,7 +132,7 @@ export class LinkSrv implements LinkService {
|
||||
if (dataPoint) {
|
||||
info.href = this.templateSrv.replace(
|
||||
info.href,
|
||||
this.getDataPointVars(dataPoint.seriesName, dateTime(dataPoint[0]))
|
||||
this.getDataPointVars(dataPoint.seriesName, dateTime(dataPoint.datapoint[0]))
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ jest.mock('angular', () => {
|
||||
|
||||
const dataPointMock = {
|
||||
seriesName: 'A-series',
|
||||
datapoint: [1000000000, 1],
|
||||
datapoint: [1000000001, 1],
|
||||
};
|
||||
|
||||
describe('linkSrv', () => {
|
||||
@ -119,7 +119,7 @@ describe('linkSrv', () => {
|
||||
{},
|
||||
dataPointMock
|
||||
).href
|
||||
).toEqual('/d/1?time=1000000000');
|
||||
).toEqual('/d/1?time=1000000001');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user