Commit 38457fab by Mitsuhiro Tanda

fix, assign by event.time

parent e868475c
......@@ -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);
......
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