Files
dashboard/backend/src/routes/serviceMonitor.routes.ts
Matthias Hochmeister a5cd78f01f feat: bug fixes, layout improvements, and new features
Bug fixes:
- Remove non-existent `role` column from admin users SQL query (A1)
- Fix Nextcloud Talk chat API path v4 → v1 for messages/send/read (A2)
- Fix ServiceModeTab sync: useState → useEffect to reflect DB state (A3)
- Guard BookStack book_slug with book_id fallback to avoid broken URLs (A4)

Layout & UI:
- Chat panel: sticky full-height positioning, main content scrolls independently (B1)
- Vehicle booking datetime inputs: explicit text color for dark mode (B2)
- AnnouncementBanner moved into grid with full-width span (B3)

Features:
- Per-user widget visibility preferences stored in users.preferences JSONB (C1)
- Link collections: grouped external links in admin UI and dashboard widget (C2)
- Admin ping history: migration 026, checked_at timestamps, expandable history rows (C4)
- Service mode end date picker with scheduled deactivation display (C5)
- Vikunja startup config logging and configured:false warnings (C7)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 14:57:54 +01:00

22 lines
1.5 KiB
TypeScript

import { Router } from 'express';
import serviceMonitorController from '../controllers/serviceMonitor.controller';
import { authenticate } from '../middleware/auth.middleware';
import { requirePermission } from '../middleware/rbac.middleware';
const router = Router();
const auth = [authenticate, requirePermission('admin:access')] as const;
// Static routes first (before parameterized :id routes)
router.get('/services/ping', ...auth, serviceMonitorController.pingAll.bind(serviceMonitorController));
router.get('/services/status-summary', ...auth, serviceMonitorController.getStatusSummary.bind(serviceMonitorController));
router.get('/services/:serviceId/ping-history', ...auth, serviceMonitorController.getPingHistory.bind(serviceMonitorController));
router.get('/services', ...auth, serviceMonitorController.getAll.bind(serviceMonitorController));
router.post('/services', ...auth, serviceMonitorController.create.bind(serviceMonitorController));
router.put('/services/:id', ...auth, serviceMonitorController.update.bind(serviceMonitorController));
router.delete('/services/:id', ...auth, serviceMonitorController.delete.bind(serviceMonitorController));
router.get('/system/health', ...auth, serviceMonitorController.getSystemHealth.bind(serviceMonitorController));
router.get('/users', ...auth, serviceMonitorController.getUsers.bind(serviceMonitorController));
router.post('/notifications/broadcast', ...auth, serviceMonitorController.broadcastNotification.bind(serviceMonitorController));
export default router;