Enhance API and UI for incident management and live updates
Publish telemt-api gateway Docker image / test (push) Successful in 24s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 1m58s

- Added a new endpoint `/api/agg/incidents` to provide a normalized snapshot of incidents for fleet triage, including severity and recommended actions.
- Implemented live event streaming via `/api/live/events` for real-time updates on fleet status and incidents, enhancing observability.
- Updated the Web UI to include dedicated sections for incidents and live updates, improving user navigation and access to critical information.
- Enhanced API documentation to reflect new endpoints and their functionalities, ensuring clarity for developers and users.
This commit is contained in:
Denozordec
2026-03-30 19:17:29 +07:00
parent af11a49c81
commit 8c8ccce6ee
18 changed files with 1655 additions and 28 deletions
+19
View File
@@ -2,6 +2,14 @@
SvelteKit + shadcn-svelte. В **production** статика собирается и **встраивается в образ шлюза** ([Dockerfile](../Dockerfile) в корне репозитория): панель и API на **одном порту** (например `http://127.0.0.1:8080/` — UI, `/api/…` — шлюз).
## Основные разделы панели
- `/` — обзор флота (KPI, активные IP, сводка по нодам)
- `/users`, `/users/[username]` — пользователи и детали
- `/ips` — unique IP + GeoIP карта
- `/incidents` — triage-интерфейс инцидентов (`ack/resolved/owner/note` в localStorage)
- `/live` — live snapshot (SSE, авто-reconnect)
## Переменная `PUBLIC_TELEMT_GATEWAY_URL`
| Значение | Когда |
@@ -42,6 +50,17 @@ npm run gen:api
Источник: [../docs/AGGREGATE_OPENAPI.yaml](../docs/AGGREGATE_OPENAPI.yaml).
## URL-driven controls (операторский режим)
На ключевых страницах используются query-параметры:
- `aliases=node-a,node-b` — фильтр по нодам
- `refresh=0|10..300` — auto-refresh (0 выключает polling)
- `include_links=0|1` — для `/users`
- `geo=0|1` — для `/ips`
Live-страница `/live` работает через SSE endpoint шлюза: `/api/live/events`.
## Ограничения
- Секреты upstream к Telemt задаются на шлюзе (`authorization_env`), не в браузере.