Commit graph

2 commits

Author SHA1 Message Date
Ritik Sahni
0c424649a3 fix: replace execSync with execFileSync for security and validate semver versions 2025-11-13 12:51:06 +05:30
Ritik Sahni
f20a3ec391 feat(admin): add system status panel with database, storage, and update checks
Add a comprehensive System Status page to the admin panel that provides
actionable insights for administrators to monitor their Umami instance health.

Features:
- Database connectivity check with connection status and database type
- Storage usage monitoring with total, used, and free space display
  - Visual progress bar with color-coded warnings (75% and 90% thresholds)
  - Human-readable byte formatting
  - Fallback support for different filesystem types
- Update notifications with version comparison using semver
  - Current version display
  - Latest version check via Umami API
  - Clear update availability indicators

Technical details:
- New API endpoint: /api/admin/status (admin-only access)
- New admin page: /admin/status
- Added to admin navigation menu with Activity icon
- Auto-refreshes every 60 seconds
- Proper error handling and graceful degradation
- Uses existing permission system (canViewUsers check)
- Follows existing UI patterns and component structure
- Added i18n labels: systemStatus, database, storage, updates

This addresses the need for administrators to have visibility into system
health and proactively identify potential issues before they impact users.
2025-11-13 12:38:10 +05:30