Volumes page: on-demand volume sizes (0.18.0)

Docker's volume list has no size, so add a "Compute sizes" button that runs
`docker system df` (via client.df()) and shows per-volume size in a new Size
column. The df walk is expensive (seconds), so results are cached ~60s and
loaded on demand instead of on every poll.

- volume_service.volume_sizes(force) with a 60s TTL cache; GET /api/volumes/sizes
  + agent /agent/volumes/sizes + proxy /api/agents/{id}/volumes/sizes.
- Frontend: volumesApi.sizes(force, agentId); Volumes page gained a Size column
  and a Compute sizes button (per host) that triggers the lookup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
menzelj
2026-06-08 13:07:07 +00:00
co-authored by Claude Opus 4.8
parent 8f6e354b3f
commit 56450efd82
9 changed files with 96 additions and 5 deletions
+3
View File
@@ -155,6 +155,9 @@ as intuitive as Dockge, as capable as Portainer for Compose workflows.
- Admin actions: delete a volume (with an in-use warning + force option) and
**Prune unused**; an *Only unused* filter. New agent endpoints
`/agent/volumes` (list/delete/prune), proxied at `/api/agents/{id}/volumes/*`.
- **Volume sizes** are loaded on demand via a *Compute sizes* button (runs
`docker system df`, which walks volume contents and can take a few seconds);
results are cached ~60s. Endpoint `GET /api/volumes/sizes` (+ per-agent).
- The Volume **Wizard** in the stack editor (bind/named/NFS/SMB/tmpfs YAML
generation) is unchanged — the new page is for managing/cleaning up volumes.