fix: mount drives after restore + poll-based redirect

Restore flow now calls MountDrivesFromLayout() after writing config,
which mounts drives by UUID and adds fstab entries. Previously drives
from the infra backup were never mounted, causing "Adattároló nem
elérhető" warnings.

Post-restore redirect now polls until the controller responds instead
of using a fixed 5-second timeout that was too short for container
restart.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 4.6 committed 2026-02-26 15:07:38 +01:00
1 parent c0cdd95e56
commit 80b756f0e4
3 files changed
+62 -13

No files matched your search

@@ -33,6 +33,19 @@
<script>
(function() {
function waitForRestart() {
fetch('/', {redirect: 'follow'})
.then(function(r) {
if (r.ok) {
window.location.href = '/';
} else {
setTimeout(waitForRestart, 2000);
}
})
.catch(function() {
setTimeout(waitForRestart, 2000);
});
}
function poll() {
fetch('/setup/restore/status')
.then(function(r) { return r.json(); })
@@ -59,15 +72,15 @@
}
if (data.done) {
document.getElementById('done-msg').style.display = 'block';
setTimeout(function() { window.location.href = '/'; }, 5000);
setTimeout(waitForRestart, 3000);
return;
}
setTimeout(poll, 1500);
})
.catch(function() {
// Connection lost — controller may be restarting
// Connection lost — controller is restarting
document.getElementById('done-msg').style.display = 'block';
setTimeout(function() { window.location.href = '/'; }, 5000);
setTimeout(waitForRestart, 3000);
});
}
poll();