diff --git a/Plugin/unraid/pages/monitor.php b/Plugin/unraid/pages/monitor.php index d5d6cbe..86cc851 100644 --- a/Plugin/unraid/pages/monitor.php +++ b/Plugin/unraid/pages/monitor.php @@ -156,7 +156,7 @@

- Pools + Pools

@@ -1207,6 +1207,34 @@ function vvPollMonitor() { // ── Pools ───────────────────────────────────────────────────────────────── vvDiskIo = d.disk_io ?? {}; vvLastStorageDisks = d.storage ?? []; + (() => { + const disks = vvLastStorageDisks; + const titleEl = document.getElementById('vv-pools-title'); + if (titleEl && disks.length) { + const okDisks = disks.filter(d => d.status === 'DISK_OK' || !d.status).length; + const totalGb = disks.reduce((s, d) => s + (d.size_gb ?? 0), 0); + const usedGb = disks.reduce((s, d) => s + (d.used_gb ?? 0), 0); + const pct = totalGb > 0 ? Math.round(usedGb / totalGb * 100) : 0; + const pctColor = pct >= (vvThresholds.util_crit ?? 90) ? '#f44336' : pct >= (vvThresholds.util_warn ?? 70) ? '#ff9800' : '#4caf50'; + const temps = disks.map(d => d.temp).filter(t => t != null); + const maxTemp = temps.length ? Math.max(...temps) : null; + const maxTempColor = maxTemp == null ? '#444' + : maxTemp >= (vvThresholds.ssd_crit ?? 70) ? '#f44336' + : maxTemp >= (vvThresholds.ssd_warn ?? 60) ? '#ff9800' : '#4caf50'; + const [pIor, pIow] = vvIoSum(disks.map(d => d.device)); + const ioParts = []; + if (pIor >= 0.05) ioParts.push(`↓${vvFmtRate(pIor)}`); + if (pIow >= 0.05) ioParts.push(`↑${vvFmtRate(pIow)}`); + const ioHtml = ioParts.length ? `· ${ioParts.join(' ')}` : ''; + titleEl.innerHTML = `Pools + + ${okDisks}/${disks.length} ok + · ${pct}% used + ${maxTemp != null ? `· max ${maxTemp}°` : ''} + ${ioHtml} + `; + } + })(); document.getElementById('vv-storage-body').innerHTML = vvRenderPools(vvLastStorageDisks); // ── Array disks — summary header + min 3 columns ─────────────────────────