Repair live server operations console

This commit is contained in:
npc0-hue
2026-08-03 11:21:07 +08:00
parent 9f82e310b2
commit 1d5fb586d0
16 changed files with 594 additions and 134 deletions
@@ -0,0 +1,26 @@
## 1. Backend Metrics Projection
- [x] 1.1 Update per-server metrics listing to return the latest authorized persisted metric sample instead of deterministic placeholder values.
- [x] 1.2 Add/adjust service tests for latest-sample projection and no-sample placeholder behavior.
## 2. Frontend Refresh And Metrics Presentation
- [x] 2.1 Add bounded automatic refresh for server list metrics/jobs and server detail header/job projections.
- [x] 2.2 Update server cards and detail header to show metric freshness, placeholders, and CPU/memory/disk progress meters.
## 3. Live Logs And Management Terminal
- [x] 3.1 Add a live log drawer that lists server log streams and tails selected entries with cursor polling plus pause, clear, filter, and manual refresh controls.
- [x] 3.2 Add a management terminal drawer that dispatches SCUM commands through the existing Source RCON API and shows safe unsupported state for other plugins.
- [x] 3.3 Wire server list card actions to `编辑部署`, `实时日志`, and `管理终端` without reflowing cards or moving deployment editing into detail.
## 4. Server Detail Workspace
- [x] 4.1 Remove the server detail overview section/tab and deployment edit button while keeping operational sections available.
- [x] 4.2 Reuse the live log and management terminal components from detail where appropriate.
## 5. Verification
- [x] 5.1 Run focused backend/frontend tests covering metrics, page contracts, and command/log UI.
- [x] 5.2 Run `scripts/check-structure.sh`.
- [x] 5.3 Run `openspec validate repair-server-live-operations-console --strict`.