From 050d7d34df91dd29dcab4b2bc207b2e88fc239d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Fri, 17 Oct 2025 16:42:19 +0200 Subject: [PATCH] vm management --- static/main.js | 7 ++----- static/styles.css | 13 +++---------- templates/index.html | 2 +- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/static/main.js b/static/main.js index fddc404..c6204a7 100644 --- a/static/main.js +++ b/static/main.js @@ -748,12 +748,9 @@ async function renderVMAdmin() { }); } else { await vmAction(sid, action, needsTarget ? getTarget() : undefined); - const exit = (finalSt && finalSt.exitstatus) ? String(finalSt.exitstatus) : ''; - 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'))); + showToast('Success', `${action} executed for ${sid}`, 'success'); await doRefresh(); + setRowBusy(tr, false); } } catch (e) { showToast('Error', 'ERROR: ' + e.message, 'danger'); } btn.disabled = false; diff --git a/static/styles.css b/static/styles.css index 49d9041..7db1caf 100644 --- a/static/styles.css +++ b/static/styles.css @@ -81,14 +81,7 @@ footer.site-footer a:hover { 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 { width: min(480px, 96vw); max-width: min(480px, 96vw); @@ -101,7 +94,7 @@ footer.site-footer a:hover { white-space: normal; } -.position-fixed.top-0.end-0.p-3 { - right: 1rem; - top: 1rem; +.position-fixed.bottom-0.end-0.p-3 { + right: max(env(safe-area-inset-right), 1rem); + bottom: max(env(safe-area-inset-bottom), 1rem); } \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index fb22520..c1a212c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -305,7 +305,7 @@ -
+