mirror of https://github.com/jetkvm/kvm.git
fix: enhance reboot state management with health check and redirect options
This commit is contained in:
parent
ba8a169ef2
commit
6b55cf3b7e
|
|
@ -697,7 +697,14 @@ export default function KvmIdRoute() {
|
||||||
if (resp.method === "willReboot") {
|
if (resp.method === "willReboot") {
|
||||||
const postRebootAction = resp.params as unknown as PostRebootAction;
|
const postRebootAction = resp.params as unknown as PostRebootAction;
|
||||||
console.debug("Setting reboot state", 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("/");
|
navigateTo("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue