Fix miscalculation on healthcheck tasks#1366
Conversation
❌ 20 Jest Test Failure(s)📄
|
Signed-off-by: Adam Navarro Megías <adam.navarro@wazuh.com>
Signed-off-by: Adam Navarro Megías <145340543+Adman23@users.noreply.github.com>
❌ 20 Jest Test Failure(s)📄
|
Signed-off-by: Adam Navarro Megías <adam.navarro@wazuh.com>
Signed-off-by: Adam Navarro Megías <145340543+Adman23@users.noreply.github.com>
Description
This PR fixes the calculation of the duration of the tasks during the healthcheck process. It was a unit mismatch, so the solution was to change seconds by milliseconds to align with the format function.
durationis now used in milliseconds and shown properly in the UI. In the request it will be on milliseconds.Issues Resolved
#1358
Evidence
evidence2.mp4
Tests
--baseparameter with the repo on the branch.yarn start --no-base-pathand then reload until you can see the healtcheck window with the server:api-run_as info.startedAt,finishedAtandduration) are the same as the request.Dashboard management > Healthcheckand verify that thedurationthat renders on the detail flyout for the tasks has the same format.Additional
Add it to
wazuh-dashboard-plugins/plugins/main/server/health-check/server-api.tsline 190, that way it takes a couple of seconds more and the difference is more clear.Check List