feat(runtime-logs): update documentation and UI for runtime log management

Обновлены разделы документации для управления файловыми логами, включая новые эндпоинты и параметры. Добавлены описания для вкладки «Файловые логи» в интерфейсе мониторинга и обновлены настройки tenant. Улучшен доступ к логам через API и интерфейс пользователя.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-06-12 21:04:29 +07:00
co-authored by Cursor
parent 0c5502b5bb
commit a0f78a3d21
8 changed files with 632 additions and 25 deletions
+28 -9
View File
@@ -8,7 +8,7 @@
|------|----------|
| **Task ID** | `settings-ui-and-runtime-logs` |
| **Complexity** | **Level 4** |
| **Status** | **BUILD Phase 5 complete**Phase 6 |
| **Status** | **BUILD complete**REFLECT |
| **Дата VAN** | 2026-06-12 |
| **Дата PLAN** | 2026-06-12 |
@@ -274,7 +274,8 @@ environment:
| 6.8 | 503 empty state | «Доступно только на evobgp-all с volume» |
**Checklist Phase 6:**
- [ ] `npm run check && npm run lint`
- [x] `npm run check && npm run lint`
- [x] `/monitoring?tab=runtime-logs` + nested files/audit
---
@@ -287,6 +288,23 @@ environment:
| 7.3 | `go test ./... -race -count=1` |
| 7.4 | E2E manual: list → tail → truncate → audit row |
**Checklist Phase 7:**
- [x] `docs/api.md` — секция RuntimeLogs
- [x] `docs/manual.md` — Web UI tenant-settings + runtime logs
- [x] `go test ./... -count=1` exit 0 (Windows: без `-race`, CGO disabled)
- [x] `npx @redocly/cli lint docs/openapi.yaml`
- [x] `npm run check && npm run lint`
- [x] `scripts/lint-go.ps1`
- [ ] E2E manual на prod/staging (см. ниже)
**E2E manual (оператор на evobgp-all с volume):**
1. `GET /v1/runtime-logs/files` → 200, список `*.log`
2. `GET /v1/runtime-logs/files/evobgp-all.log?lines=50` → content
3. UI: Monitoring → Файловые логи → preview
4. `DELETE ...?mode=truncate` (operator) → 200 + audit_id
5. `GET /v1/runtime-logs/cleanup-audit` → новая строка
6. `/tenant-settings` — BIRD + revision сохраняются через PATCH
---
## Dependency Graph
@@ -334,10 +352,10 @@ graph TD
- [x] `/settings` — только frontend (токен, тема)
- [x] `/tenant-settings` — все tenant KV (BIRD + revision + custom)
- [x] Operations без tab `system`; Network без полной BIRD-формы (summary + link)
- [ ] Runtime logs: list, tail, sync cleanup на evobgp-all
- [ ] Audit cleanup в БД + просмотр в UI
- [x] Runtime logs: list, tail, sync cleanup на evobgp-all (UI)
- [x] Audit cleanup в БД + просмотр в UI
- [x] `EVOBGP_RUNTIME_LOGS_DIR`, volume в compose
- [ ] redocly lint, go test -race, web check+lint
- [x] redocly lint, go test, web check+lint
---
@@ -351,7 +369,8 @@ graph TD
- [x] BUILD Phase 3 HTTP handlers
- [x] BUILD Phase 4 Deploy (compose)
- [x] BUILD Phase 5 Tenant settings UI
- [ ] BUILD Phase 67
- [x] BUILD Phase 6 Runtime logs UI
- [x] BUILD Phase 7 (docs + QA)
- [ ] REFLECT
- [ ] ARCHIVE
@@ -360,9 +379,9 @@ graph TD
## Key Files (reference)
**Settings today:**
- `web/src/routes/settings/+page.svelte` keep frontend-only
- `web/src/lib/components/operations/OperationsSystemSettingsTab.svelte`migrate out
- `web/src/lib/components/network/BirdSettingsForm.svelte` — migrate out
- `web/src/routes/settings/+page.svelte` — frontend-only
- `web/src/routes/tenant-settings/+page.svelte`tenant KV
- `web/src/lib/components/tenant-settings/*` — BIRD / revision / additional cards
- `internal/httpapi/routes_crud.go` — settings handlers (unchanged contract)
**Runtime logs today:**