mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-07-27 12:18:59 +00:00
d7d8f9bfe8
* feat(dashboard): replace 24h charts with Configuration Status and Recent Activity The 24-hour CPU/Memory area charts summed per-container metrics normalized to each container's CPU quota, producing numbers that bore no honest relationship to host load. The live ResourceGauges strip already shows accurate host-level stats, making the historical charts both inaccurate and redundant. This commit replaces that row with two side-by-side cards: - **Configuration Status**: aggregates every toggleable feature on the active node (notification agents, alert rules, routing rules, auto-heal, auto-update, webhooks, scheduled tasks, MFA, SSO, vulnerability scanning, cloud backup, and alert thresholds) into a single at-a-glance card. Tier-locked rows display an upgrade indicator instead of a value. Each row is clickable and navigates to the relevant settings section. Data refreshes every 60 s and immediately on state-invalidate events. - **Recent Activity**: lists the ten most recent notification-history events for the active node (deployments, image updates, auto-heal actions, scan findings, cloud backup events, system notices) with category icons and relative timestamps. Refreshes every 30 s. New backend endpoints: - GET /api/dashboard/configuration - per-node feature status with locked/ requiredTier markers so the frontend renders upgrade chips without extra calls. The endpoint sits after authGate and before the remote proxy so remote-node requests are transparently forwarded. - GET /api/dashboard/recent-activity?limit=N - thin wrapper over DatabaseService.getNotificationHistory. - GET /api/fleet/configuration - fleet-wide fan-out using the same Promise.allSettled dead-node-tolerant pattern as /fleet/overview. Exposed as the new "Status" tab on the Fleet page (after Snapshots). Shared utilities: - visibilityInterval and formatCount extracted to frontend/src/lib/utils.ts so the three polling hooks and two components share a single copy. * docs(dashboard): fix stale alt text referencing removed historical charts
120 lines
6.2 KiB
Plaintext
120 lines
6.2 KiB
Plaintext
---
|
|
title: Dashboard
|
|
description: Real-time system stats, stack health, configuration overview, and recent activity for your active node.
|
|
---
|
|
|
|
The **Home** tab is the first thing you see after logging in. It provides a live overview of your node's health, resource usage, stack status, active configuration, and recent activity.
|
|
|
|
<Frame>
|
|
<img src="/images/dashboard/dashboard-overview.png" alt="Sencho dashboard showing status masthead, unified gauge strip, and stack health table" />
|
|
</Frame>
|
|
|
|
## Status masthead
|
|
|
|
The masthead at the top of the dashboard is the single place to read the node's current condition. It carries:
|
|
|
|
- A **state word** (Healthy, Degraded, or Critical) set in the editorial display face so the reader sees it first.
|
|
- A **pulsing dot** that mirrors the state color: green when nominal, amber when degraded, rose when critical.
|
|
- A **meta line** with the active node, the number of nodes in the fleet, and the time since the last successful sync.
|
|
- A **reasons line** that names exactly which signals moved the state away from Healthy (for example, "CPU 84% · 2 exited · 3 unread errors"). No hovering required.
|
|
- Three quick stat tiles on the right: containers running, aggregate CPU, and memory in use. Hover the **Running** tile to see the managed / external / exited breakdown.
|
|
- An alerts counter pinned to the far right.
|
|
|
|
Sencho derives the state from CPU, RAM, disk usage, exited containers, and unread error alerts:
|
|
|
|
| State | Meaning |
|
|
|-------|---------|
|
|
| **Healthy** | All systems nominal. No resources above warning thresholds, no unread errors. |
|
|
| **Degraded** | At least one resource is above 80%, there are exited containers, or there are unread error alerts. |
|
|
| **Critical** | At least one resource is above 90%, or there are exited containers combined with unread errors. |
|
|
|
|
## Unified gauge strip
|
|
|
|
A single rail of four tiles shows the numbers that change minute-to-minute:
|
|
|
|
| Tile | What it shows |
|
|
|------|---------------|
|
|
| **CPU (hero)** | Current usage with a 10-minute sparkline, average for the window, and the peak value with its time offset |
|
|
| **Memory** | RAM usage with a compact bar and the exact used/total split |
|
|
| **Disk** | Mount usage with a compact bar and the exact used/total split |
|
|
| **Network** | Total throughput per second with the received/transmitted split and a live rhythm spark |
|
|
|
|
The CPU tile's sparkline uses cyan as the data color and marks the peak in amber. Memory and disk bars turn amber at 80% and rose at 90%.
|
|
|
|
## Stack health
|
|
|
|
A mono table of every stack discovered in your `COMPOSE_DIR`, sorted by load so the stacks demanding attention sit at the top:
|
|
|
|
| Column | Description |
|
|
|--------|-------------|
|
|
| **State dot** | Green when healthy, amber when any container in the stack is pushing CPU above 80%, rose when one has exited or is above 90% |
|
|
| **Stack** | Stack name (derived from the directory name) |
|
|
| **Host** | Active node this stack belongs to |
|
|
| **Up** | How long the oldest running container has been up, in compact units (s/m/h/d) |
|
|
| **CPU** | Latest aggregate CPU for the stack's containers |
|
|
| **Memory** | Total memory allocated by the stack's containers |
|
|
| **CPU · 10m** | Per-stack sparkline of the last 10 minutes, tinted to match the row state |
|
|
|
|
Warning rows take on a subtle amber wash; critical rows take on a rose wash. Click any row to jump to that stack's editor. If you have more than 8 stacks, the list paginates automatically.
|
|
|
|
## Configuration Status
|
|
|
|
The Configuration Status card gives you an at-a-glance view of every toggleable automation and security feature on the active node, so nothing is silently off when you expect it to be on.
|
|
|
|
<Frame>
|
|
<img src="/images/dashboard/configuration-status.png" alt="Dashboard showing the Configuration Status card on the left and the Recent Activity feed on the right" />
|
|
</Frame>
|
|
|
|
The card is divided into four sections:
|
|
|
|
### Notifications & Alerts
|
|
|
|
| Row | What it shows |
|
|
|-----|---------------|
|
|
| **Notification agents** | Which delivery agents (Discord, Slack, custom webhook) are configured and enabled |
|
|
| **Alert rules** | Number of per-stack alert rules in effect |
|
|
| **Notification routing** | Number of enabled routing rules that direct specific categories to specific agents |
|
|
|
|
### Automation
|
|
|
|
| Row | What it shows |
|
|
|-----|---------------|
|
|
| **Auto-heal policies** | Enabled and total crash-recovery policies across all stacks |
|
|
| **Auto-update stacks** | Stacks enrolled in automated image-update checks |
|
|
| **Webhooks** | Outbound webhook triggers that fire on stack events |
|
|
| **Scheduled tasks** | Active scheduled operations (backups, restarts, scripts) |
|
|
|
|
### Security
|
|
|
|
| Row | What it shows |
|
|
|-----|---------------|
|
|
| **MFA** | Whether multi-factor authentication is set up for your account |
|
|
| **SSO** | Whether single sign-on is enabled and the active provider |
|
|
| **Vulnerability scanning** | Number of enabled scan policies |
|
|
|
|
### Backups & Thresholds
|
|
|
|
| Row | What it shows |
|
|
|-----|---------------|
|
|
| **Cloud Backup** | Active cloud backup provider (or Disabled) |
|
|
| **Alert thresholds** | Current CPU, RAM, and disk alert thresholds |
|
|
| **Crash detection** | Whether global crash detection is active |
|
|
|
|
**Click any row** to jump directly to the settings section that manages it.
|
|
|
|
Rows for features locked to a higher tier are shown in a muted state with an upgrade indicator. The data refreshes automatically every 60 seconds and updates immediately when any setting changes.
|
|
|
|
## Recent Activity
|
|
|
|
The Recent Activity feed, to the right of Configuration Status, shows the ten most recent events on the active node: deployments, image updates, auto-heal actions, vulnerability scan results, cloud backups, and system notices. Each entry shows a category icon, the event message, and a relative timestamp.
|
|
|
|
If no activity has been recorded yet, the feed shows an empty state.
|
|
|
|
## Recent alerts
|
|
|
|
The bottom section displays triggered alert notifications sorted by recency. Each entry shows the severity level (info, warning, or error), the alert message, and a relative timestamp.
|
|
|
|
Use the **Clear All Notifications** button to dismiss all alerts. If you have more than 8 alerts, the list paginates.
|
|
|
|
Alert thresholds are configured per stack in **Settings > Notifications**. See [Alerts & Notifications](/features/alerts-notifications) for setup details.
|