feat(admin): monitoring center
Sprint 26. New features/admin/monitoring/ module + net-new /:lang/backoffice/monitoring route + Dashboard Quick Action. - Health section reuses AdminDashboardFacade.healthChecks directly (real data, unchanged since Sprint 19) instead of duplicating the logic - unified AdminMonitoringEvent feed covering audit/security/login/ failed-login/api/error/warning, category filter + search, 40 seeded synthetic entries (no logging backend exists anywhere in this system) - mock queue depth/status cards, mock webhook delivery log - intentionally kept separate from Sprint 24's per-transaction audit and Sprint 25's per-user audit - different scopes, no consolidation attempted Also fixed a real type error: AdminDashboardQuickActionId's union was missing 'users' and 'monitoring' (added when wiring those Quick Actions), caught by ng build's template type-checking even though plain tsc --noEmit passed - a reminder that ng build is the authoritative check here. docs/ADMIN.md + docs/BACKEND.md (new item 15) updated. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -369,6 +369,28 @@ routes at all, this is a net-new admin section.
|
||||
- Wired into `AdminDashboardFacade`'s Quick Actions list (`dashboard.actionUsers`
|
||||
-> `/:lang/backoffice/users`).
|
||||
|
||||
## Sprint 26 - Monitoring (mock/local, health reuses real data)
|
||||
|
||||
`features/admin/monitoring/`, single page at `/:lang/backoffice/monitoring`
|
||||
(new Dashboard Quick Action).
|
||||
|
||||
- **Health**: reuses `AdminDashboardFacade.healthChecks` directly (the same
|
||||
real, non-mocked bootstrap-validation checks from Sprint 19's dashboard)
|
||||
instead of duplicating the logic - this is the one section on this page
|
||||
backed by real data.
|
||||
- **Audit / security / login / failed-login / API / error / warning
|
||||
events**: one unified `AdminMonitoringEvent` feed (`category` + `level`
|
||||
discriminators) with category filter + search, seeded with 40
|
||||
deterministic synthetic entries by `AdminMonitoringLocalGateway` - no
|
||||
logging backend exists anywhere in this system, so there is nothing real
|
||||
to read from.
|
||||
- **Queue monitoring**: 3 mock named queues with depth + status.
|
||||
- **Webhook monitoring**: mock delivery log (endpoint/event/status/time).
|
||||
- This is deliberately a separate, system-wide log from the two
|
||||
narrower-scoped audit trails added earlier: Sprint 24's per-transaction
|
||||
audit and Sprint 25's per-user audit. No consolidation attempted - they
|
||||
track different things.
|
||||
|
||||
## Known gaps / backend needs
|
||||
|
||||
- **Dashboard metrics endpoint.** Categories/Products counts are computed
|
||||
|
||||
@@ -160,6 +160,14 @@ Plus, if authenticated history/wishlist/compare/saved-searches sync is wanted: `
|
||||
|
||||
**Frontend files:** implement `AdminUsersApiGateway` against `AdminUsersGateway` (`services/admin-users-gateway.interface.ts`) and rebind via an injection token.
|
||||
|
||||
## 15. Monitoring (Sprint 26, mock/local except Health)
|
||||
|
||||
**Current behavior:** `features/admin/monitoring/` — Health section reads real data (`AdminDashboardFacade.healthChecks`, unchanged from Sprint 19). Everything else (audit/security/login/failed-login/API/error/warning event feed, queue depths, webhook deliveries) is synthetic, seeded once in `AdminMonitoringLocalGateway` — no logging, queue, or webhook infrastructure exists anywhere in this system.
|
||||
|
||||
**Needed:** real structured logging with a query API (by category/level/actor/time range), real queue introspection (whatever job runner ships), and real webhook delivery tracking once webhooks exist as a feature at all.
|
||||
|
||||
**Frontend files:** implement `AdminMonitoringApiGateway`-equivalent methods against a to-be-defined `AdminMonitoringGateway` interface (`AdminMonitoringLocalGateway` currently has no interface extracted — add one when a real implementation is built, mirroring the pattern used everywhere else in `admin/*`).
|
||||
|
||||
## Known reliability issues
|
||||
|
||||
### Production 502/504 Bad Gateway on refresh / back-navigation
|
||||
|
||||
@@ -59,8 +59,9 @@ Notify user: **from Sprint 20 (Categories) once product↔category link + admin
|
||||
- [x] `docs/ADMIN.md` (new Sprint 25 section), `docs/BACKEND.md` item 14 added
|
||||
- Commit: `feat(admin): users and permissions`
|
||||
|
||||
## Sprint 26 — Monitoring
|
||||
- [ ] Audit/security/login logs views (local), API/error/warning feed, queue/webhook placeholders, health page
|
||||
## Sprint 26 — Monitoring ✅ done
|
||||
- [x] Audit/security/login/failed-login logs (unified event feed, category filter), API/error/warning feed, queue/webhook mock views, health page (reuses real Sprint 19 healthChecks)
|
||||
- [x] `docs/ADMIN.md` (new Sprint 26 section), `docs/BACKEND.md` item 15 added
|
||||
- Commit: `feat(admin): monitoring center`
|
||||
|
||||
## Sprint 27 — Analytics
|
||||
|
||||
Reference in New Issue
Block a user