vm management

This commit is contained in:
Mateusz Gruszczyński
2025-10-17 16:42:19 +02:00
parent f3075ca5de
commit 050d7d34df
3 changed files with 6 additions and 16 deletions

View File

@@ -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;