Skip to content

Commit 8a5d453

Browse files
author
root
committed
improve docker tab
1 parent c70e377 commit 8a5d453

37 files changed

Lines changed: 4864 additions & 3891 deletions

backend/docs/openapi/api.yaml

Lines changed: 1800 additions & 1787 deletions
Large diffs are not rendered by default.

backend/docs/openapi/ext-api.yaml

Lines changed: 1711 additions & 1698 deletions
Large diffs are not rendered by default.

backend/docs/openapi/group-matrix.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ groups:
7171
description: Docker operations including compose, image, container, network and volume management.
7272
apiType: Ext
7373
extSurface:
74-
- /api/ext/docker/*
74+
- /api/servers/{serverId}/docker/*
75+
- GET /api/servers/docker-targets
7576
nativeSurface: []
7677
sources:
7778
extRouteFiles:
@@ -363,7 +364,7 @@ groups:
363364
description: Server registry CRUD and remote operations APIs for connectivity, power, ports, monitor-agent deployment, and systemd management.
364365
apiType: Mixed
365366
extSurface:
366-
- GET /api/ext/docker/servers
367+
- GET /api/servers/docker-targets
367368
- GET /api/servers/connection
368369
- GET /api/servers/local/docker-bridge
369370
- GET /api/servers/{serverId}/ops/connectivity

backend/domain/routes/docker.go

Lines changed: 80 additions & 84 deletions
Large diffs are not rendered by default.

backend/domain/routes/docker_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func doDocker(t *testing.T, te *testEnv, method, url, body, token string) *httpt
7171
t.Fatal(err)
7272
}
7373

74-
g := r.Group("/api/ext")
74+
g := r.Group("/api/servers")
7575
g.Bind(apis.RequireAuth())
7676
registerDockerRoutes(g)
7777

@@ -118,12 +118,12 @@ func TestDockerRoutesRequireSuperuser(t *testing.T) {
118118

119119
userToken := createRegularUserToken(t, te)
120120

121-
rec := doDocker(t, te, http.MethodGet, "/api/ext/docker/servers", "", userToken)
121+
rec := doDocker(t, te, http.MethodGet, "/api/servers/docker-targets", "", userToken)
122122
if rec.Code != http.StatusForbidden {
123123
t.Fatalf("expected 403 for non-superuser, got %d: %s", rec.Code, rec.Body.String())
124124
}
125125

126-
rec = doDocker(t, te, http.MethodGet, "/api/ext/docker/servers", "", te.token)
126+
rec = doDocker(t, te, http.MethodGet, "/api/servers/docker-targets", "", te.token)
127127
if rec.Code != http.StatusOK {
128128
t.Fatalf("expected 200 for superuser, got %d: %s", rec.Code, rec.Body.String())
129129
}

backend/domain/routes/routes.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Package routes registers all custom API routes for AppOS.
22
//
33
// Route groups:
4-
// - /api/ext/docker — Docker operations (compose, images, containers, networks, volumes)
54
// - /api/ext/proxy — reverse proxy domain/SSL management
65
// - /api/ext/system — system metrics, file browser
76
// - /api/ext/backup — backup/restore operations
@@ -17,7 +16,7 @@
1716
// - /api/topics — Topic share management (authenticated + public share token)
1817
// - /api/ext/iac — IaC file management (Epic 14, superuser-only)
1918
// - /api/tunnel — tunnel setup and operations APIs (Epic 16)
20-
// - /api/servers — Server catalog: ops, ports, systemd (Epic 20)
19+
// - /api/servers — Server catalog plus server-scoped Docker/ops/software routes (Epic 4, Epic 20)
2120
// - /api/software — AppOS-local software inventory APIs
2221
// - /api/terminal — Interactive terminal sessions: SSH, Docker, SFTP, local (Epic 20)
2322
package routes
@@ -86,7 +85,6 @@ func Register(se *core.ServeEvent) {
8685
terminalGroup.Bind(wsTokenAuth())
8786
terminalGroup.Bind(apis.RequireSuperuserAuth())
8887

89-
registerDockerRoutes(g)
9088
registerProxyRoutes(g)
9189
registerSystemRoutes(g)
9290
registerBackupRoutes(g)
@@ -104,6 +102,7 @@ func Register(se *core.ServeEvent) {
104102
registerExposureRoutes(deployments)
105103
registerIaCRoutes(g)
106104
registerServerRoutes(servers)
105+
registerDockerRoutes(servers)
107106
registerSoftwareRoutes(servers)
108107
registerLocalSoftwareRoutes(softwareGroup)
109108
registerTerminalRoutes(terminalGroup)

specs/implementation-artifacts/epic20-servers.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ Establish the `servers` collection and its full CRUD surface. This is a pure dat
454454
| 20.4 | SFTP Enhancements | file properties, symlink, copy/move progress, upload limits |
455455
| 20.5 | Server Ops | connectivity check (with error category), power, ports, systemd backend route family |
456456
| 20.8 | Server Detail Systemd Tab | server-detail `Systemd` tab UX, paginated service inventory, search, featured services |
457+
| 20.11 | Server Detail Docker Tabs | server-detail `Docker` tab shell, inherited server context, inner tab IA, `/docker` transition direction |
457458

458459
| Story | Status |
459460
|-------|--------|
@@ -463,6 +464,7 @@ Establish the `servers` collection and its full CRUD surface. This is a pure dat
463464
| 20.4 | ✅ Complete |
464465
| 20.5 | 🟡 In Review |
465466
| 20.8 | Draft |
467+
| 20.11 | Draft |
466468

467469
---
468470

specs/implementation-artifacts/epic28-monitoring.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ This epic adopts a Netdata-plus-control-plane-pull model:
1818

1919
The goal is not to build a full observability platform. The goal is to provide a small, reliable operator signal surface that answers: what is unhealthy, why, and since when.
2020

21+
For Docker specifically, Epic 28 is a consumer of Docker runtime objects, not the owner of Docker inventory or Docker actions.
22+
Epic 4 remains the control-plane surface for listing, inspecting, logging, and operating Docker resources.
23+
Epic 28 should only add runtime evidence and status judgment on top of those objects.
24+
2125
---
2226

2327
## Scope Boundaries
@@ -32,6 +36,12 @@ The goal is not to build a full observability platform. The goal is to provide a
3236
| AppOS self metrics and monitor pipeline health | Large historical analytics or BI-style reporting |
3337
| Minimal overview and detail-page observability surfaces | Highly customized dashboards |
3438

39+
Docker boundary for MVP:
40+
41+
- in scope: container runtime telemetry, telemetry freshness, and monitor-backed status summaries
42+
- out of scope: replacing Docker inventory APIs for containers, images, networks, volumes, or compose
43+
- out of scope: moving Docker actions such as start, stop, restart, remove, pull, prune, or compose up/down into monitor
44+
3545
---
3646

3747
## Monitoring Model
@@ -349,6 +359,8 @@ Exact route placement can still shift during implementation, but the separation
349359
- `story28.3-active-checks.md`
350360
- `story28.4-operator-surfaces.md`
351361
- `story28.5-platform-status-frontend.md`
362+
- `story28.6-container-stats-ui.md`
363+
- `story28.7-docker-monitor-handoff.md`
352364

353365
---
354366

@@ -376,6 +388,8 @@ Implement this epic in the following order:
376388
3. `28.3 Active Checks for Resource and App Availability`
377389
4. `28.4 Minimal Operator Surfaces`
378390
5. `28.5 Platform Status Frontend Page`
391+
6. `28.6 Container Stats UI in Server Detail`
392+
7. `28.7 Docker and Monitor Surface Handoff`
379393

380394
Reasoning:
381395

@@ -384,6 +398,8 @@ Reasoning:
384398
- 28.3 adds AppOS-owned judgment so monitoring does not depend only on self-report.
385399
- 28.4 should consume stable read contracts instead of inventing UI-specific logic.
386400
- 28.5 converges the operator-facing platform status experience into one simple page after the monitor contracts are stable.
401+
- 28.6 brings monitor-backed container evidence into existing Docker-facing server detail without changing Docker control-plane ownership.
402+
- 28.7 standardizes the handoff between Docker and Monitor surfaces after both sides already have stable destinations.
387403

388404
## First Delivery Slice
389405

0 commit comments

Comments
 (0)