vm management
This commit is contained in:
@@ -748,12 +748,9 @@ async function renderVMAdmin() {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
await vmAction(sid, action, needsTarget ? getTarget() : undefined);
|
await vmAction(sid, action, needsTarget ? getTarget() : undefined);
|
||||||
const exit = (finalSt && finalSt.exitstatus) ? String(finalSt.exitstatus) : '';
|
showToast('Success', `${action} executed for ${sid}`, 'success');
|
||||||
const ok = exit.toUpperCase() === 'OK';
|
|
||||||
const badgeCell = tr.children[4];
|
|
||||||
if (badgeCell) badgeCell.innerHTML = ok ? badge('running', 'ok') : badge('migrate error', 'err');
|
|
||||||
log.textContent += (log.textContent ? '\n' : '') + (ok ? 'Migration finished successfully.' : ('Migration failed: ' + (exit || 'unknown error')));
|
|
||||||
await doRefresh();
|
await doRefresh();
|
||||||
|
setRowBusy(tr, false);
|
||||||
}
|
}
|
||||||
} catch (e) { showToast('Error', 'ERROR: ' + e.message, 'danger'); }
|
} catch (e) { showToast('Error', 'ERROR: ' + e.message, 'danger'); }
|
||||||
btn.disabled = false;
|
btn.disabled = false;
|
||||||
|
@@ -81,14 +81,7 @@ footer.site-footer a:hover {
|
|||||||
max-width: 92vw;
|
max-width: 92vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
.position-fixed.top-0.end-0.p-3 {
|
|
||||||
right: max(env(safe-area-inset-right), 1rem);
|
|
||||||
top: max(env(safe-area-inset-top), 1rem);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Toast container & toasts: keep inside viewport */
|
|
||||||
#toast-container {
|
#toast-container {
|
||||||
width: min(480px, 96vw);
|
width: min(480px, 96vw);
|
||||||
max-width: min(480px, 96vw);
|
max-width: min(480px, 96vw);
|
||||||
@@ -101,7 +94,7 @@ footer.site-footer a:hover {
|
|||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.position-fixed.top-0.end-0.p-3 {
|
.position-fixed.bottom-0.end-0.p-3 {
|
||||||
right: 1rem;
|
right: max(env(safe-area-inset-right), 1rem);
|
||||||
top: 1rem;
|
bottom: max(env(safe-area-inset-bottom), 1rem);
|
||||||
}
|
}
|
@@ -305,7 +305,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Toasts -->
|
<!-- Toasts -->
|
||||||
<div aria-live="polite" aria-atomic="true" class="position-fixed top-0 end-0 p-3" style="z-index: 1080">
|
<div aria-live="polite" aria-atomic="true" class="position-fixed bottom-0 end-0 p-3" style="z-index: 1080">
|
||||||
<div id="toast-container" class="toast-container"></div>
|
<div id="toast-container" class="toast-container"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user