Fix timestamps for SLA graph, closes #1595

This commit is contained in:
Alexander Zobnin
2023-03-23 13:26:27 +01:00
parent 713678a32e
commit fc1d809dc1

View File

@@ -494,10 +494,7 @@ export function handleSLIResponse(response: any, itservices: any[], target: Zabb
const timestamps = []; const timestamps = [];
for (let i = 0; i < response?.periods?.length; i++) { for (let i = 0; i < response?.periods?.length; i++) {
const period = response.periods[i]; const period = response.periods[i];
if (i === 0) { timestamps.push(period.period_from * 1000);
timestamps.push(period.period_from * 1000);
}
timestamps.push(period.period_to * 1000);
} }
const timeFiled: Field = { const timeFiled: Field = {
@@ -521,9 +518,6 @@ export function handleSLIResponse(response: any, itservices: any[], target: Zabb
if (!values[j]) { if (!values[j]) {
values[j] = []; values[j] = [];
} }
if (i === 0) {
values[j].push(value);
}
values[j].push(value); values[j].push(value);
} }
} }