feat(monitoring): complete monitoring pipeline and fix presentation flag persistence
add superadmin monitoring dashboard with protected route, menu entry, and monitoring data client add monitoring overview API endpoint and improve log serialization/aggregation for dashboard use extend listener health/log handling with robust status/event/timestamp normalization and screenshot payload extraction improve screenshot persistence and retrieval (timestamp-aware uploads, latest screenshot endpoint fallback) fix page_progress and auto_progress persistence/serialization across create, update, and detached occurrence flows align technical and project docs to reflect implemented monitoring and no-version-bump backend changes add documentation sync log entry and include minor compose env indentation cleanup
This commit is contained in:
@@ -75,10 +75,18 @@ Backend technical work (post-release notes; no version bump):
|
||||
- API endpoints (`server/routes/client_logs.py`):
|
||||
- `GET /api/client-logs/<uuid>/logs` – Retrieve client logs with filters (level, limit, since); authenticated (admin_or_higher)
|
||||
- `GET /api/client-logs/summary` – Get log counts by level per client for last 24h; authenticated (admin_or_higher)
|
||||
- `GET /api/client-logs/monitoring-overview` – Aggregated monitoring overview for dashboard clients/statuses; authenticated (admin_or_higher)
|
||||
- `GET /api/client-logs/recent-errors` – System-wide error monitoring; authenticated (admin_or_higher)
|
||||
- `GET /api/client-logs/test` – Infrastructure validation endpoint (no auth required)
|
||||
- Blueprint registered in `server/wsgi.py` as `client_logs_bp`
|
||||
- Dev environment fix: Updated `docker-compose.override.yml` listener service to use `working_dir: /workspace` and direct command path for live code reload
|
||||
- 🖥️ **Monitoring Dashboard Integration (2026-03-24)**:
|
||||
- Frontend monitoring dashboard (`dashboard/src/monitoring.tsx`) is active and wired to monitoring APIs
|
||||
- Superadmin-only route/menu integration completed in `dashboard/src/App.tsx`
|
||||
- Added dashboard monitoring API client (`dashboard/src/apiClientMonitoring.ts`) for overview and recent errors
|
||||
- 🐛 **Presentation Flags Persistence Fix (2026-03-24)**:
|
||||
- Fixed persistence for presentation flags `page_progress` and `auto_progress` across create/update and detached-occurrence flows
|
||||
- API serialization now reliably returns stored values for presentation behavior fields
|
||||
- 📡 **MQTT Protocol Extensions**:
|
||||
- New log topics: `infoscreen/{uuid}/logs/{error|warn|info}` with JSON payload (timestamp, message, context)
|
||||
- New health topic: `infoscreen/{uuid}/health` with metrics (expected_state, actual_state, health_metrics)
|
||||
@@ -95,8 +103,7 @@ Backend technical work (post-release notes; no version bump):
|
||||
|
||||
Notes for integrators:
|
||||
- Tiered logging strategy: ERROR/WARN always centralized (QoS 1), INFO dev-only (QoS 0), DEBUG local-only
|
||||
- Client-side implementation pending (Phase 3: watchdog service)
|
||||
- Dashboard UI pending (Phase 4: log viewer and health indicators)
|
||||
- Monitoring dashboard is implemented and consumes `/api/client-logs/monitoring-overview`, `/api/client-logs/recent-errors`, and `/api/client-logs/<uuid>/logs`
|
||||
- Foreign key constraint prevents logging for non-existent clients (data integrity enforced)
|
||||
- Migration is idempotent and can be safely rerun after interruption
|
||||
- Use `GET /api/client-logs/test` for quick infrastructure validation without authentication
|
||||
|
||||
Reference in New Issue
Block a user