diff --git a/containers/libreportal/frontend/js/components/admin/system-storage-page.js b/containers/libreportal/frontend/js/components/admin/system-storage-page.js index f3a4e88..c606c1f 100644 --- a/containers/libreportal/frontend/js/components/admin/system-storage-page.js +++ b/containers/libreportal/frontend/js/components/admin/system-storage-page.js @@ -202,22 +202,41 @@ class SystemStoragePage { const palette = SystemStoragePage.PALETTE; const colorFor = i => palette[i % palette.length]; - // ---- Headline: on-disk usage by app (the disk question that matters) ---- + // ---- Headline: ONE donut covering everything — a slice per app, then + // Docker's own categories (images, build cache). Colours run continuously + // across the whole list so app and Docker slices stay distinct, and the + // legend lists them all. This is the unified "where's my disk going" view. const appTotal = (as && as.total) || 0; - const appSegs = appRows.map((a, i) => ({ color: colorFor(i), data: { size: a.bytes || 0 } })); - const headline = appRows.length + const appSegs = appRows.map((a, i) => ({ label: a.app, color: colorFor(i), data: { size: a.bytes || 0 } })); + const dockerCats = d ? SystemStoragePage.segmentsFrom(d).map((s, j) => ({ ...s, color: colorFor(appSegs.length + j) })) : []; + const allSegs = [...appSegs, ...dockerCats]; + const grandTotal = allSegs.reduce((t, s) => t + ((s.data && s.data.size) || 0), 0); + const legend = ` +