This commit is contained in:
Mitsuhiro Tanda 2019-03-21 15:48:22 +09:00
parent e1a2b258af
commit e868475c5b

View File

@ -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;
} }