vm management
This commit is contained in:
@@ -777,7 +777,6 @@ async function renderVMAdmin() {
|
||||
|
||||
|
||||
async function pollTask(upid, node, onUpdate, onDone) {
|
||||
let lastSt = null;
|
||||
let lastSt = null;
|
||||
if (!upid || !node) return;
|
||||
const started = Date.now();
|
||||
@@ -788,7 +787,9 @@ async function pollTask(upid, node, onUpdate, onDone) {
|
||||
const r = await fetch('/api/task-status?upid=' + encodeURIComponent(upid) + '&node=' + encodeURIComponent(node));
|
||||
const d = await r.json();
|
||||
if (d && d.ok) {
|
||||
const st = d.status || {}; lastSt = st; lastSt = st; if (onUpdate) { try { onUpdate(st); } catch { } }
|
||||
const st = d.status || {};
|
||||
lastSt = st;
|
||||
if (onUpdate) { try { onUpdate(st); } catch { } }
|
||||
const s = (st.status || '').toLowerCase();
|
||||
if (s === 'stopped' || st.exitstatus) break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user