Skip to content

Commit

Permalink
Fix timestamps for SLA graph, closes #1595
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderzobnin committed Mar 23, 2023
1 parent 713678a commit fc1d809
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/datasource/responseHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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);
}
}
Expand Down

0 comments on commit fc1d809

Please sign in to comment.