diff --git a/Plugin/unraid/css/varaverk.css b/Plugin/unraid/css/varaverk.css index 34b4967..bb7fbe7 100644 --- a/Plugin/unraid/css/varaverk.css +++ b/Plugin/unraid/css/varaverk.css @@ -27,6 +27,15 @@ .vv-card:hover .vv-card-cog { color: #4a4a4a; } .vv-card-cog:hover { color: #aaa !important; background: #333; } +/* Card header icon wrapper */ +.vv-ico { display:inline-flex; align-items:center; opacity:0.38; flex-shrink:0; } + +/* Status accent — left border colour for state-driven cards */ +.vv-accent-ok { border-left-color: #2a5a2a !important; } +.vv-accent-warn { border-left-color: #5a4000 !important; } +.vv-accent-err { border-left-color: #5a1e1e !important; } +#vv-monitor .vv-card { transition: border-left-color 0.5s; } + /* Status banner — coloured strip at top of card body */ .vv-banner { border-radius: 4px; padding: 5px 10px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; diff --git a/Plugin/unraid/pages/monitor.php b/Plugin/unraid/pages/monitor.php index 4fd26b1..cca6b68 100644 --- a/Plugin/unraid/pages/monitor.php +++ b/Plugin/unraid/pages/monitor.php @@ -11,8 +11,8 @@

- - + + Power @@ -22,39 +22,76 @@

-

CPU

+

+ + + CPU + + +

Loading...
-

Memory

+

+ + + Memory + + +

Loading...
-

Network

+

+ + + Network + + +

Loading...
-

Scripts

+

+ + + Scripts + + +

Loading...
-

Fallback

+

+ + + Fallback + +

Loading...
-

Partner

+

+ + + Partner + +

Loading...

- Containers & VMs + + + Containers & VMs +

Loading...
@@ -62,38 +99,77 @@
-

GPU

+

+ + + GPU + + +

Loading...
-

Transcode

+

+ + + Transcode + +

Loading...
-

Streams

+

+ + + Streams + +

Loading...
-

Watchdog

+

+ + + Watchdog + +

Loading...
-

Parity

+

+ + + Parity + + +

Loading...
-

Pools

+

+ + + Pools + + +

Loading...
-

Array

+

+ + + Array + + +

Loading...
@@ -605,6 +681,16 @@ function vvPollMonitor() {
`; }); document.getElementById('vv-partner-body').innerHTML = ptHtml; + (function() { + const c = document.getElementById('vv-partner'); + if (!c) return; + const remotes = ptHosts.filter(h => !h.is_me); + c.classList.remove('vv-accent-ok','vv-accent-warn'); + if (remotes.length) { + if (remotes.some(h => h.online)) c.classList.add('vv-accent-ok'); + else c.classList.add('vv-accent-warn'); + } + })(); // ── Fallback ────────────────────────────────────────────────────────────── const fb = d.fallback ?? {}; @@ -645,6 +731,14 @@ function vvPollMonitor() { fbHtml += `
No containers active
`; } document.getElementById('vv-fallback-body').innerHTML = fbHtml; + (function() { + const c = document.getElementById('vv-fallback'); + if (!c) return; + c.classList.remove('vv-accent-ok','vv-accent-warn','vv-accent-err'); + if (state === 'NORMAL') c.classList.add('vv-accent-ok'); + else if (state === 'FAILOVER') c.classList.add('vv-accent-err'); + else if (state !== 'UNKNOWN') c.classList.add('vv-accent-warn'); + })(); // ── CPU ───────────────────────────────────────────────────────────────── const cpu = d.cpu ?? {}; @@ -960,6 +1054,13 @@ function vvPollMonitor() { } el.innerHTML = html; + const wdCard = document.getElementById('vv-watchdog-card'); + if (wdCard) { + wdCard.classList.remove('vv-accent-ok','vv-accent-warn','vv-accent-err'); + if (healthy) wdCard.classList.add('vv-accent-ok'); + else if (reboots > 0 || oom > 0 || daemonHit) wdCard.classList.add('vv-accent-err'); + else wdCard.classList.add('vv-accent-warn'); + } })(); @@ -999,6 +1100,13 @@ function vvPollMonitor() { } else { document.getElementById('vv-array-body').innerHTML = '

No array disks

'; } + (function() { + const c = document.getElementById('vv-array-card'); + if (!c) return; + c.classList.remove('vv-accent-ok','vv-accent-err'); + if (sys.array_state === 'STARTED') c.classList.add('vv-accent-ok'); + else if (sys.array_state && sys.array_state !== 'UNKNOWN') c.classList.add('vv-accent-err'); + })(); // ── GPU ───────────────────────────────────────────────────────────────── const gpu = d.gpu ?? {};