-
Notifications
You must be signed in to change notification settings - Fork 5.9k
feat(admin): add system status panel with database, storage, and update status. #3747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…te 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.
|
@ritiksahni is attempting to deploy a commit to the umami-software Team on Vercel. A member of the Team first needs to authorize it. |
Greptile OverviewGreptile SummaryThis PR adds a comprehensive system status monitoring panel to the admin section of the Umami analytics platform. The implementation creates a new Important Files Changed
Confidence score: 3/5
Sequence DiagramsequenceDiagram
participant User
participant AdminNav
participant StatusPage
participant API
participant Database
participant FileSystem
participant UpdatesAPI
User->>AdminNav: "Click System Status menu item"
AdminNav->>StatusPage: "Navigate to /admin/status"
StatusPage->>API: "GET /api/admin/status"
API->>API: "Check user permissions (canViewUsers)"
par Database Check
API->>Database: "Execute SELECT 1 query"
Database-->>API: "Connection status & type"
and Storage Check
API->>FileSystem: "Check storage usage (statfs/df)"
FileSystem-->>API: "Storage metrics"
and Updates Check
API->>UpdatesAPI: "GET latest version info"
UpdatesAPI-->>API: "Latest version data"
end
API-->>StatusPage: "Return system status data"
StatusPage->>StatusPage: "Render status cards with metrics"
StatusPage-->>User: "Display system status dashboard"
Note over StatusPage: "Auto-refresh every 60 seconds"
loop Every 60 seconds
StatusPage->>API: "GET /api/admin/status"
API-->>StatusPage: "Updated status data"
StatusPage-->>User: "Refresh display"
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, 3 comments
|
Great! This can be a very useful feature. Hope this gets accepted. |
Add System Status Panel to Admin Section
Overview
Adds a System Status page to the admin panel to monitor database connectivity, storage usage, and update availability.
Features
Database Connectivity Check
Storage Usage Monitoring
Update Notifications
Technical Details
GET /api/admin/status(admin-only)/admin/statuscanViewUserscheck)Implementation
src/app/api/admin/status/route.tssrc/app/(main)/admin/status/StatusPage.tsxsrc/app/(main)/admin/AdminNav.tsxsrc/components/messages.tsSecurity
Breaking Changes
None. Backward compatible and requires no database migrations.
Rationale
Administrators currently lack visibility into system health metrics. This provides proactive monitoring capabilities and helps prevent issues before they impact users.