Fix data alignment for db connection queries

This commit is contained in:
Alexander Zobnin
2021-08-06 12:31:05 +03:00
parent d1f639f568
commit 736f05d398
5 changed files with 36 additions and 17 deletions

View File

@@ -179,10 +179,13 @@ export function dataResponseToTimeSeries(response: DataFrameJSON[], items) {
const itemid = field.name;
const item = _.find(items, { 'itemid': itemid });
let interval = utils.parseItemInterval(item.delay);
// Convert interval to nanoseconds in order to unmarshall it on the backend to time.Duration
let interval = utils.parseItemInterval(item.delay) * 1000000;
if (interval === 0) {
interval = null;
}
const timeSeriesData = {
ts: s,
meta: {