mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
simplify
This commit is contained in:
parent
e1a2b258af
commit
e868475c5b
@ -366,11 +366,12 @@ export class PrometheusDatasource implements DataSourceApi<PromQuery> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (annotation.useValueForTime) {
|
if (annotation.useValueForTime) {
|
||||||
if (dupCheck[value[1]]) {
|
const timestampValue = Math.floor(parseFloat(value[1]));
|
||||||
|
if (dupCheck[timestampValue]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
dupCheck[value[1]] = true;
|
dupCheck[timestampValue] = true;
|
||||||
event['time'] = Math.floor(parseFloat(value[1]));
|
event['time'] = timestampValue;
|
||||||
} else {
|
} else {
|
||||||
event['time'] = Math.floor(parseFloat(value[0])) * 1000;
|
event['time'] = Math.floor(parseFloat(value[0])) * 1000;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user