From fe5e0bd841f4f11120b97ffcd3930f2b1e8e6fac Mon Sep 17 00:00:00 2001 From: iris Date: Wed, 17 Jun 2026 18:48:20 +0200 Subject: [PATCH] dashboard(core): add disk column to the LOAD container-resources table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Surfaces the per-container on-disk footprint the c0re sampler now reports as `disk_bytes` on /api/container-resources (state dir + container writable rootfs, shared nix store excluded; sampled out-of-band every few minutes). Renders bytes→human via the existing cloadFmtBytes helper, with an em-dash until the first sample lands (disk_bytes is null then). Pairs with the hive-c0re sampler half. --- frontend/packages/dashboard/src/core.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/packages/dashboard/src/core.js b/frontend/packages/dashboard/src/core.js index b1e98ecf..e54ec604 100644 --- a/frontend/packages/dashboard/src/core.js +++ b/frontend/packages/dashboard/src/core.js @@ -387,7 +387,7 @@ function renderContainerLoad(rows) { const table = document.createElement('table'); table.className = 'hive-stats-table'; table.innerHTML = 'agentcpumemory' - + 'peaklimit'; + + 'peaklimitdisk'; const tb = document.createElement('tbody'); for (const r of rows) { const tr = document.createElement('tr'); @@ -409,6 +409,13 @@ function renderContainerLoad(rows) { const lim = document.createElement('td'); lim.className = 'num'; lim.textContent = r.mem_max_bytes ? cloadFmtBytes(Number(r.mem_max_bytes)) : '∞'; tr.append(lim); + // Disk: on-disk footprint (state dir + container writable rootfs, shared + // nix store excluded). Sampled out-of-band every few minutes server-side, + // so it's null until the first sample lands — show an em-dash then. + const disk = document.createElement('td'); disk.className = 'num'; + disk.title = 'state dir + container writable rootfs (shared nix store excluded); sampled every few minutes'; + disk.textContent = (r.disk_bytes != null) ? cloadFmtBytes(Number(r.disk_bytes)) : '—'; + tr.append(disk); tb.append(tr); } table.append(tb);