mirror of https://github.com/jetkvm/kvm.git
fix: enhance reboot state management with health check and redirect options (#994)
This commit is contained in:
parent
ba8a169ef2
commit
3652c4ceea
|
|
@ -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("/");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue