ON/OFF: WorldMonitor group toggle — controller supports multi-target groups (aggregate state, one switch for 4 containers), console card wired (admin), partial-state pill

This commit is contained in:
2026-10-08 21:41:54 +11:00
parent 0ce1b6e6ba
commit 24227c527a
5 changed files with 59 additions and 14 deletions

View File

@@ -126,8 +126,10 @@
var can = svcState[id] && svcState[id].can_toggle;
var transitional = st === "starting" || st === "stopping";
if (ram && svcState[id] && svcState[id].ram_mb) ram.textContent = "~" + svcState[id].ram_mb + "MB";
dot.className = "svc-dot svc-" + (st === "running" ? "on" : st === "stopped" ? "off" : st === "failed" ? "fail" : "trans");
if (lab) lab.textContent = st === "running" ? "Running" : st === "stopped" ? "Stopped" : st === "failed" ? (svcState[id].error || "Failed") : (st[0].toUpperCase() + st.slice(1));
var cls = st === "running" ? "on" : st === "stopped" ? "off" : (st === "failed" ? "fail" : st === "partial" ? "part" : "trans");
dot.className = "svc-dot svc-" + cls;
if (lab) lab.textContent = st === "running" ? "Running" : st === "stopped" ? "Stopped" : st === "failed" ? (svcState[id].error || "Failed") : st === "partial" ? "Partial" : (st[0].toUpperCase() + st.slice(1));
// partial behaves like running for the button (offered action: stop the rest)
// failed -> offer the logs deep link (dozzle)
var logs = strip.querySelector("[data-svc-logs]");
if (logs) {