mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 20:24:18 -06:00
fix, assign by event.time
This commit is contained in:
parent
e868475c5b
commit
38457fabc1
@ -358,7 +358,7 @@ export class PrometheusDatasource implements DataSourceApi<PromQuery> {
|
||||
for (const value of series.values) {
|
||||
const valueIsTrue = value[1] === '1'; // e.g. ALERTS
|
||||
if (valueIsTrue || annotation.useValueForTime) {
|
||||
const event = {
|
||||
const event: any = {
|
||||
annotation: annotation,
|
||||
title: self.resultTransformer.renderTemplate(titleFormat, series.metric),
|
||||
tags: tags,
|
||||
@ -371,9 +371,9 @@ export class PrometheusDatasource implements DataSourceApi<PromQuery> {
|
||||
continue;
|
||||
}
|
||||
dupCheck[timestampValue] = true;
|
||||
event['time'] = timestampValue;
|
||||
event.time = timestampValue;
|
||||
} else {
|
||||
event['time'] = Math.floor(parseFloat(value[0])) * 1000;
|
||||
event.time = Math.floor(parseFloat(value[0])) * 1000;
|
||||
}
|
||||
|
||||
eventList.push(event);
|
||||
|
Loading…
Reference in New Issue
Block a user