From fc1d809dc153c3fae6eeac549384d5eeb24f7589 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Thu, 23 Mar 2023 13:26:27 +0100 Subject: [PATCH] Fix timestamps for SLA graph, closes #1595 --- src/datasource/responseHandler.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/datasource/responseHandler.ts b/src/datasource/responseHandler.ts index 8d475e53c..0682f610a 100644 --- a/src/datasource/responseHandler.ts +++ b/src/datasource/responseHandler.ts @@ -494,10 +494,7 @@ export function handleSLIResponse(response: any, itservices: any[], target: Zabb const timestamps = []; for (let i = 0; i < response?.periods?.length; i++) { const period = response.periods[i]; - if (i === 0) { - timestamps.push(period.period_from * 1000); - } - timestamps.push(period.period_to * 1000); + timestamps.push(period.period_from * 1000); } const timeFiled: Field = { @@ -521,9 +518,6 @@ export function handleSLIResponse(response: any, itservices: any[], target: Zabb if (!values[j]) { values[j] = []; } - if (i === 0) { - values[j].push(value); - } values[j].push(value); } }