Add Analytics section and improve Connectors pages

- Add Analytics pages: Map (Leaflet), Reports, and Server metrics
- Add Analytics section to sidebar (Admin only)
- Improve SHMetersPage and XMetersPage with real API data
- Add analytics API service for connector stats and server metrics
- Register system routes in backend

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Exteban08
2026-02-03 21:07:00 +00:00
parent 6487e9105e
commit 9f1ab4115e
13 changed files with 1864 additions and 50 deletions

View File

@@ -17,6 +17,7 @@ import csvUploadRoutes from './csv-upload.routes';
import auditRoutes from './audit.routes';
import notificationRoutes from './notification.routes';
import testRoutes from './test.routes';
import systemRoutes from './system.routes';
// Create main router
const router = Router();
@@ -188,4 +189,13 @@ router.use('/notifications', notificationRoutes);
*/
router.use('/test', testRoutes);
/**
* System routes (ADMIN only):
* - GET /system/metrics - Get server metrics (CPU, memory, requests)
* - GET /system/health - Detailed health check
* - GET /system/meters-locations - Get meters with coordinates for map
* - GET /system/report-stats - Get statistics for reports dashboard
*/
router.use('/system', systemRoutes);
export default router;