docs: update documentatie voor app_volumes en tabs tree view

- CLAUDE.md: app_volumes.py in module-tabel, frontend tabs lijst, py_compile en smoke tests
- ARCHITECTURE.md: app_volumes.py in feature routers, py_compile en smoke tests
- API_GOLDEN.md: volumes endpoints gedocumenteerd (GET/POST/DELETE/prune/exists)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-23 18:26:08 +01:00
parent 2dfe53895b
commit fba9b59445
3 changed files with 75 additions and 3 deletions
+3 -1
View File
@@ -44,6 +44,7 @@ Single deployable backend service, split into modules (routers) by domain.
- `control/app_networks.py` — networks tab endpoints - `control/app_networks.py` — networks tab endpoints
- `control/app_files.py` — files/workloads endpoints (tree/read/save/etc.) - `control/app_files.py` — files/workloads endpoints (tree/read/save/etc.)
- `control/app_images.py` — images endpoints - `control/app_images.py` — images endpoints
- `control/app_volumes.py` — volumes endpoints (list/create/delete/prune/exists)
4. **Shared Infrastructure Layer** 4. **Shared Infrastructure Layer**
- `control/common.py` - `control/common.py`
@@ -73,10 +74,11 @@ After any change affecting backend routing or shared helpers, run:
```bash ```bash
python3 -m py_compile control/app.py control/common.py control/app_system.py \ python3 -m py_compile control/app.py control/common.py control/app_system.py \
control/app_containers.py control/app_pods.py control/app_networks.py \ control/app_containers.py control/app_pods.py control/app_networks.py \
control/app_files.py control/app_images.py control/app_files.py control/app_images.py control/app_volumes.py
curl -fsS http://127.0.0.1:8081/api/health | jq curl -fsS http://127.0.0.1:8081/api/health | jq
curl -fsS http://127.0.0.1:8081/api/pods-dashboard >/dev/null && echo OK curl -fsS http://127.0.0.1:8081/api/pods-dashboard >/dev/null && echo OK
curl -fsS http://127.0.0.1:8081/api/containers-dashboard >/dev/null && echo OK curl -fsS http://127.0.0.1:8081/api/containers-dashboard >/dev/null && echo OK
curl -fsS http://127.0.0.1:8081/api/files/tree >/dev/null && echo OK curl -fsS http://127.0.0.1:8081/api/files/tree >/dev/null && echo OK
curl -fsS http://127.0.0.1:8081/api/volumes >/dev/null && echo OK
curl -fsS http://127.0.0.1:8081/api/networks/meta | jq curl -fsS http://127.0.0.1:8081/api/networks/meta | jq
+4 -2
View File
@@ -19,6 +19,7 @@ podman-mvp is a Portainer-like web dashboard for managing rootless user-session
| `app_pods.py` | Pods router: dashboard, pod actions | | `app_pods.py` | Pods router: dashboard, pod actions |
| `app_networks.py` | Networks router | | `app_networks.py` | Networks router |
| `app_images.py` | Images router | | `app_images.py` | Images router |
| `app_volumes.py` | Volumes router: list, create, delete, prune, exists |
| `app_files.py` | Files/workloads router: tree, read, save | | `app_files.py` | Files/workloads router: tree, read, save |
Backend communicates with Podman through the Unix socket at `/run/user/1000/podman/podman.sock` using `requests_unixsocket`. Podman API base: `http+unix://%2Frun%2Frun%2Fuser%2F1000%2Fpodman%2Fpodman.sock/v5.4.2`. Backend communicates with Podman through the Unix socket at `/run/user/1000/podman/podman.sock` using `requests_unixsocket`. Podman API base: `http+unix://%2Frun%2Frun%2Fuser%2F1000%2Fpodman%2Fpodman.sock/v5.4.2`.
@@ -26,7 +27,7 @@ Backend communicates with Podman through the Unix socket at `/run/user/1000/podm
### Frontend — Static Apache (`webui/`) ### Frontend — Static Apache (`webui/`)
- `webui/html/index.html` — single-page app shell - `webui/html/index.html` — single-page app shell
- `webui/html/assets/js/tabs/` — per-tab JavaScript modules (containers, networks, images, files) - `webui/html/assets/js/tabs/` — per-tab JavaScript modules (containers, networks, images, volumes, files)
- `webui/conf/httpd.conf` — Apache config, proxies `/api/``http://127.0.0.1:8000/api/` - `webui/conf/httpd.conf` — Apache config, proxies `/api/``http://127.0.0.1:8000/api/`
## Build & Deploy ## Build & Deploy
@@ -60,13 +61,14 @@ podman run -d --pod mvp-pod --name mvp-webui \
# Syntax check all backend modules # Syntax check all backend modules
python3 -m py_compile control/app.py control/common.py control/app_system.py \ python3 -m py_compile control/app.py control/common.py control/app_system.py \
control/app_containers.py control/app_pods.py control/app_networks.py \ control/app_containers.py control/app_pods.py control/app_networks.py \
control/app_files.py control/app_images.py control/app_files.py control/app_images.py control/app_volumes.py
# Smoke test key endpoints (all via proxy on :8081) # Smoke test key endpoints (all via proxy on :8081)
curl -fsS http://127.0.0.1:8081/api/health | jq curl -fsS http://127.0.0.1:8081/api/health | jq
curl -fsS http://127.0.0.1:8081/api/containers-dashboard >/dev/null && echo OK curl -fsS http://127.0.0.1:8081/api/containers-dashboard >/dev/null && echo OK
curl -fsS http://127.0.0.1:8081/api/pods-dashboard >/dev/null && echo OK curl -fsS http://127.0.0.1:8081/api/pods-dashboard >/dev/null && echo OK
curl -fsS http://127.0.0.1:8081/api/files/tree >/dev/null && echo OK curl -fsS http://127.0.0.1:8081/api/files/tree >/dev/null && echo OK
curl -fsS http://127.0.0.1:8081/api/volumes >/dev/null && echo OK
curl -fsS http://127.0.0.1:8081/api/networks/meta | jq curl -fsS http://127.0.0.1:8081/api/networks/meta | jq
``` ```
+68
View File
@@ -149,6 +149,74 @@ Golden example:
} }
==================================================
GET /api/volumes
==================================================
Curl:
curl -s http://127.0.0.1:8081/api/volumes
Response type:
Array of Podman volume objects (raw Podman passthrough).
Golden keys per item:
- Name
- Driver
- Mountpoint
- CreatedAt
- Labels
Golden example:
[
{
"Name": "my-volume",
"Driver": "local",
"Mountpoint": "/home/kodi/.local/share/containers/storage/volumes/my-volume/_data",
"CreatedAt": "2026-03-01T12:00:00Z",
"Labels": {}
}
]
==================================================
POST /api/volumes
==================================================
Request body (JSON):
- name (string, required)
- driver (string, optional, default "local")
- labels (object, optional)
- driverOpts (object, optional)
Response: created volume object (raw Podman passthrough).
==================================================
DELETE /api/volumes/{name}
==================================================
Response on success (204 from Podman):
{"ok": true}
Error responses forwarded from Podman (e.g. 409 if in use).
==================================================
POST /api/volumes/prune
==================================================
Response: array of pruned volume names (raw Podman passthrough).
==================================================
GET /api/volumes/{name}/exists
==================================================
Response:
{"exists": true} — volume bestaat (Podman 204)
{"exists": false} — volume niet gevonden (Podman 404)
================================================== ==================================================
GET /api/openapi.json GET /api/openapi.json
================================================== ==================================================