Dashboard Screen

Server overview with real-time metrics, service health, and quick-access actions.


Layout

+----------------------------------------------------------+
|  Dashboard                                    [ Reboot ]  |
+----------------------------------------------------------+
|  ┌──────┐  ┌──────┐  ┌──────┐  ┌──────┐                 |
|  │ CPU  │  │ RAM  │  │ Disk │  │ Net  │   (stat cards)   |
|  │ 45%  │  │ 29%  │  │ 21%  │  │ ↑↓   │                 |
|  └──────┘  └──────┘  └──────┘  └──────┘                 |
+----------------------------------------------------------+
|  ┌─────────────────────────┐  ┌────────────────────────┐ |
|  │    CPU & Memory Chart    │  │   Disk Usage Chart     │ |
|  │    (24h line chart)     │  │   (doughnut chart)     │ |
|  └─────────────────────────┘  └────────────────────────┘ |
+----------------------------------------------------------+
|  ┌─────────────────────────┐  ┌────────────────────────┐ |
|  │   Network I/O Chart     │  │   Service Health       | |
|  │   (24h line chart)     │  │   nginx: ✓ active      | |
|  └─────────────────────────┘  │   postgres: ✓ active   | |
|                               │   vsftpd: ✗ inactive   | |
|                               └────────────────────────┘ |
+----------------------------------------------------------+

Summary Bar

StatSourceUpdate
CPU %/api/system/stats10s polling
RAM %/api/system/stats10s polling
Disk %/api/system/stats10s polling
Network I/O/api/system/stats10s polling

Charts

ChartTypeData SourcePeriod
CPU & MemoryLine (dual axis)/api/metrics/history?period=24h24h
Disk UsageDoughnut/api/system/statsCurrent
Network I/OLine (dual axis)/api/metrics/history?period=24h24h

Charts use .update() method for live updates without re-creating.


Service Health Grid

Shows status of key services: nginx, php-fpm, postgresql, vsftpd, clamav-daemon, firewalld.

Each service shows a green (active) or red (inactive) badge with status text.


Actions

ButtonActionConfirmation
RebootPOST /api/system/rebootYes (modal)

Modals

Reboot Confirmation

+------------------------------------------+
|  ⚠️  Confirm Reboot                      |
|                                          |
|  Are you sure you want to reboot the     |
|  server? This will disconnect all users. |
|                                          |
|  [ Cancel ]              [ Reboot ]      |
+------------------------------------------+

Event Delegation

All buttons use data-dash-action attributes:

Attribute ValueAction
data-dash-action="reboot"Open reboot confirmation modal
data-dash-action="confirm-reboot"Execute reboot
data-dash-action="cancel-reboot"Close modal

CSS Classes

ClassPurpose
.dash-stats-grid4-column stat card grid
.dash-stat-cardIndividual stat card
.dash-stat-valueLarge number display
.dash-stat-labelStat label text
.dash-chart-cardChart container card
.dash-service-gridService health grid
.dash-service-itemIndividual service badge
.dash-reboot-btnReboot button
.dash-connection-statusWebSocket status indicator

Auto-Refresh

  • System stats: 10-second polling interval
  • Charts: Updated via .update() method (no re-creation)
  • Service health: Updated on each stats refresh

State Management

StateDescription
LoadingSpinner overlay
LoadedStats + charts visible
ErrorError message, retry button
Rebooting"Server is rebooting..." overlay

API Calls

MethodEndpointPurpose
GET/api/system/statsCPU/RAM/Disk/Network
GET/api/metrics/history?period=24hChart data
GET/api/system/service-healthService status
GET/api/system/quick-statsBadge counts
POST/api/system/rebootReboot server
GET/api/system/reboot-statusReboot state

Part of NexusPanel Documentation

← Back to Documentation