diff --git a/frontend/metrics.ts b/frontend/metrics.ts index 1f27215..4f4fbe9 100644 --- a/frontend/metrics.ts +++ b/frontend/metrics.ts @@ -205,8 +205,8 @@ function containerRowHtml(c: ContainerInfo, extraClass = '', host = ''): string function compactContainerRowHtml(c: ContainerInfo, host: string): string { const state = containerState(c.status); const age = containerAge(c); - const memUsed = (c.mem || '').split('/')[0].trim(); - const right = c.cpu ? `${c.cpu}${memUsed ? ` · ${memUsed}` : ''}` : ''; + // Show full "used / limit" (the limit is the container's RAM cap = its max), like the local panel. + const right = c.cpu ? `${c.cpu}${c.mem ? ` · ${c.mem}` : ''}` : ''; const rightHtml = right ? `${escapeHtml(right)}` : ''; const badge = age || c.status.split(/[\s(]/)[0]; const badgeHtml = badge ? `${escapeHtml(badge)}` : ''; diff --git a/public/metrics.js b/public/metrics.js index 92748c1..a793857 100644 --- a/public/metrics.js +++ b/public/metrics.js @@ -165,8 +165,8 @@ function containerRowHtml(c, extraClass = '', host = '') { function compactContainerRowHtml(c, host) { const state = containerState(c.status); const age = containerAge(c); - const memUsed = (c.mem || '').split('/')[0].trim(); - const right = c.cpu ? `${c.cpu}${memUsed ? ` · ${memUsed}` : ''}` : ''; + // Show full "used / limit" (the limit is the container's RAM cap = its max), like the local panel. + const right = c.cpu ? `${c.cpu}${c.mem ? ` · ${c.mem}` : ''}` : ''; const rightHtml = right ? `${escapeHtml(right)}` : ''; const badge = age || c.status.split(/[\s(]/)[0]; const badgeHtml = badge ? `${escapeHtml(badge)}` : '';