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,11 +494,8 @@ 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);
}
const timeFiled: Field = {
name: TIME_SERIES_TIME_FIELD_NAME,
@@ -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);
}
}