feat: add Settings (user management) and Notifications pages
Backend: - User management API: GET/POST/PUT/DELETE /api/users Supports two roles: developer, server-admin Each user has notifyOnError toggle for email alerts - Notification API: GET /api/notifications, mark read, unread count - Email service: sends alerts via SMTP (mail.bshtech.net/noreply@bshtech.net) to all users with notifyOnError=true on error/warning events - Health monitor: checks CPU, memory, disk, Docker containers every 60s Creates notifications + sends email on threshold breaches Detects container down, high CPU (>90%), memory (>90%), disk (>85%) Sends recovery notifications when issues resolve - File-based JSON storage for users and notifications (data/ directory) - Added nodemailer dependency Frontend: - Settings page: user list with role badges, email alert toggles, add/remove user forms. Roles: Developer (blue), Server Admin (amber) - Notifications page: real-time alert feed with type icons (error/warning/ info/recovery), read/unread state, email sent indicator, time ago display - Added Notifications to sidebar navigation - Wired both pages into App.tsx router Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
MemoryStick,
|
||||
HardDrive,
|
||||
Wifi,
|
||||
Bell,
|
||||
Settings,
|
||||
HelpCircle,
|
||||
Server,
|
||||
@@ -24,6 +25,7 @@ const mainNav: NavItem[] = [
|
||||
{ id: "memory", label: "Memory", icon: MemoryStick },
|
||||
{ id: "storage", label: "Storage", icon: HardDrive },
|
||||
{ id: "network", label: "Network", icon: Wifi },
|
||||
{ id: "notifications", label: "Notifications", icon: Bell },
|
||||
]
|
||||
|
||||
const bottomNav: NavItem[] = [
|
||||
|
||||
Reference in New Issue
Block a user