fix: enhance reboot state management with health check and redirect options (#994)

This commit is contained in:
Adam Shiervani 2025-11-20 18:25:21 +01:00 committed by GitHub
parent ba8a169ef2
commit 3652c4ceea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -697,7 +697,14 @@ export default function KvmIdRoute() {
if (resp.method === "willReboot") {
const postRebootAction = resp.params as unknown as PostRebootAction;
console.debug("Setting reboot state", postRebootAction);
setRebootState({ isRebooting: true, postRebootAction });
setRebootState({
isRebooting: true,
postRebootAction: {
healthCheck: postRebootAction?.healthCheck || `${window.location.origin}/device/status`,
redirectTo: postRebootAction?.redirectTo || window.location.href,
}
});
navigateTo("/");
}