Files
RustProxy/docs/DASHBOARD.md
T
2026-11-16 09:59:26 +01:00

141 lines
17 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Administration dashboard and preferences
The authenticated panel is the primary way to manage RustProxy. Pages cover **Overview**, **Vhosts**, **Web Server**, **Certificates**, **Docker vhosts**, **Streams**, **Traffic**, **Cache**, **Logs**, **Settings** and **Documentation**. Availability of individual cards depends on enabled features and the account's display preferences.
## Stylesheet updates
The panel and login page load one versioned stylesheet embedded in the Rust
binary. Source styles are split into eight modules and assembled during the
build. Rebuild the binary to apply CSS changes; copying individual CSS files to
an installed server does not update the panel. The authenticated documentation
page has its own stylesheet.
## Overview cards and layouts
The Overview contains live counters, charts and optional backend, cache, PHP, Docker and Stream cards. Under **Settings → Appearance → Dashboard layout** or the Overview editor, configure visibility, order, card width, density and the number of history samples. A hidden card stops consuming its optional browser-side visualization work but does not turn off its underlying proxy feature.
Optional quick-health tiles (since 0.35.2, hidden by default; enable them in the layout editor or **Settings → Appearance → Dashboard layout**):
| Tile | Shows |
|---|---|
| **Healthy backends** | Monitored backend members passing health checks as `up / total`, with the names of failing members. |
| **Error share** | Percentage of HTTP requests that ended with an error during the last sampling interval. |
| **Rejected by limits / s** | Requests and connections refused by `--max-connections` / `--max-inflight`; sustained values mean the limits are too low for the load. |
| **Nearest certificate expiry** | Days until the earliest installed certificate expires; the bar is full at 90 days or more. |
Enabled tiles are added at the end of the Overview, so the standard block layout does not change.
Optional Docker cards (since 0.37.0, hidden by default): **Docker agents**, **Docker apps**, **Docker app requests**, **Docker hosts network**, **Docker hosts load** and **Containers**. They summarize agent connectivity, published Docker vhost health and traffic, and the host diagnostics reported by Docker/Podman agents 0.37.0+. The hidden-cards lists show each Docker card type once; with several agents choose the agent next to it before adding, and add the same type again (up to four copies) for other agents. A visible copy shows the selected agent in its title; see [Docker discovery](DOCKER_DISCOVERY.md#overview-cards).
In the **Backends** table with **Table density: Ultra compact**, the backend name line under each vhost is hidden to save space; hover the vhost name (dotted underline) to see the vhost and backend names in a tooltip.
The Overview history sample count is saved in the browser immediately when the selection changes; no separate confirmation button is required.
The sidebar application-status indicator runs a lightweight self-check from the live status already used by the dashboard. Green means healthy, amber means attention is needed, and red means a problem was detected; click it to see API, listener, backend and logging details.
The unlocked Overview layout exposes a single **Save and lock** action (plus Cancel), removing the redundant lock-and-save button.
### Arranging blocks
After **Unlock layout**, every block shows a compact toolbar: the **⠿** handle, width **− / +**, and **×** to hide it (wider blocks also show **← / →**).
- **Drag:** grab the ⠿ handle (mouse, pen or touch). The block lifts and follows the pointer, and a dashed frame of the same width shows exactly where it will land; neighbouring blocks glide aside instead of jumping. Release to drop, or press **Esc** to return the block to its previous place. Dragging near the top or bottom edge of the window scrolls the page.
- **Keyboard:** focus the ⠿ handle and use the arrow keys to move the block one position.
- **Arrange manually:** blocks get fixed grid positions. Drag a block anywhere — a dashed frame shows the cell it will snap to — and the other blocks stay where they are (a block already in that place moves down). Making a block narrower or shorter leaves the space empty instead of pulling the next block in; making it bigger pushes overlapping blocks down. *Fit to screen* and *Fill gaps* are off in this mode. The positions are saved with **Save and lock** (`dashboard_widget_positions` in the administrator preferences) and the mode is switched on again automatically the next time you unlock a manually arranged layout; untick it to return to the ordered layout.
- **Fill gaps:** a saved custom layout keeps blocks in exactly the order you arranged them, so a wide block that does not fit at the end of a row leaves a visible gap instead of other blocks silently moving into it. Use **Fill gaps** to pack blocks into empty space once; nothing is stored until **Save and lock**.
**Dashboard Presets** supports up to **16 named layouts per administrator**. Save, load, rename, overwrite and delete presets; a factory layout can be restored. Presets preserve the dashboard arrangement, not the live traffic values. Interface theme, scale and other display settings are also account-scoped and do not alter proxy routing or rewrite shared configuration.
### Built-in presets
**Dashboard presets** also offers twelve ready-made layouts (since 0.38.1). They are part of the application, cannot be changed or deleted and do not count towards the 16 saved presets. Loading one shows only its cards in a fixed order and width, hides all other cards, switches back to automatic arrangement and sets the card density and the history length. To keep your adjustments, load a preset, change it, then save it under your own name.
Laid out for a Full HD screen (1920×1080, 12-column grid, every row filled):
| Preset | Cards | History |
|---|---|---|
| Operations (NOC) | requests, active exchanges, bandwidth, errors, process memory, latency; traffic and connection charts; backend health, errors, probe RTT, unhealthy history; backend table | 5 min |
| Traffic and protocols | requests, requests/s, bandwidth, protocol mix, HTTP/2 and HTTP/3 share; protocol rates and traffic chart; HTTP/2, HTTP/3, TLS, WebSocket; connections | 5 min |
| Cache and compression | cache, outcomes, hit and miss rate, HOT memory, COLD storage; cache activity and diagnostics; compression and transformations; COLD queue, bandwidth, latency | 5 min |
| Backends and load balancing | health, healthy backends, capacity, queue, retries, rotations; requests, latency, errors, traffic, 5xx, timeouts; availability and latency charts; backend table | 5 min |
| Resources and process | process CPU, RSS, file descriptors, connections, memory, exchanges; CPU and memory charts; system load and memory breakdown; process and network diagnostics | 10 min |
| Errors and security | errors, error rate and share, rejected requests, TLS errors, certificate expiry; backend 5xx, errors, timeouts; traffic and latency charts | 5 min |
| Docker | agents, applications, host load, containers; Docker requests and host network; requests, errors, backend health, latency; backend table | 5 min |
| Web Server and PHP | status, kind, capacity, methods, error rate, PHP requests; requests, latency, traffic, failures, top services, status trend | 5 min |
| TCP/UDP streams | stream overview, sessions, stream backend health, stream traffic; active exchanges, bandwidth; connection charts | 5 min |
| Wall display | four large counters, a full-width traffic chart, backend health, latency, cache hit rate; normal density for reading from a distance | 10 min |
For phones (on screens up to about 700 px the small counters sit two per row and charts and tables take the full width):
| Preset | Cards | History |
|---|---|---|
| Phone: status | requests, errors, active exchanges, bandwidth, latency, cache hit rate; backend health; traffic chart | 1 min |
| Phone: on call | errors, request error rate, unhealthy backends, certificate expiry; backend errors; compact backend list | 1 min |
A preset only shows cards that have data on this installation; for example the Docker and Web Server presets stay mostly empty without Docker agents or Web services.
### SVG interface icons
Under **Settings → Appearance → Interface**, enable **Show SVG interface icons** to add semantic line icons to the main navigation, action buttons, tabs and dialogs. The preference is stored per administrator as `interface_icons: true|false` in `/api/preferences` and is **off by default** for both new and upgraded accounts.
The icons are inline SVGs bundled with RustProxy; no web font, CDN or external icon library is loaded. They use `currentColor`, so the active theme, danger/primary states and disabled-state colors remain authoritative. Text labels and existing ARIA labels remain the source of accessible meaning; the SVGs are `aria-hidden`. Dynamic controls are reclassified when their state changes, so actions such as sort direction, save/loading, show/hide and refresh keep a matching icon. Turning the option off removes the injected icons and restores the original text-only presentation without restarting the panel.
Controls whose label is already a single symbol (`×`, `−`, `+`, `←`, `→`, `↑`, `↓`) keep that glyph and do not receive a second SVG. Verbs take precedence over the surrounding feature: a **Close** button in the health or history dialog shows a close icon, **Previous/Next** use chevrons, and **Unlock layout** uses an open padlock.
### Logo animation
Under **Settings → Appearance → Interface**, enable **Animate logo** to let the sidebar `r/p` logo play a short, subtle effect (rotating slash, letter flip, wave, glow, sheen, glitch or wobble) at random intervals of roughly 10–25 seconds and when the pointer moves over it. The preference is stored per administrator as `logo_animation: true|false` in `/api/preferences` and is **off by default**. Animations pause while the browser tab is hidden and are suppressed entirely when the operating system or browser requests reduced motion.
### Interface scale and dialogs
**Settings → Appearance → Interface scale** shrinks or enlarges the whole panel. Dialogs (vhost and redirect editors, logs, configuration history, About, help) keep their on-screen size at every scale and only their content is scaled, so a smaller scale shows more content instead of a smaller window. Layout sizes based on the browser window are corrected for the scale as well.
### Corner style
The **Corner style** setting (Original, Square, Subtle, Rounded, Extra) also applies to newer controls such as key and token lists, chips, status badges, container meters, listener cards, the rule status bar and cache-rule cards.
### Stable dialog position
Under **Settings → Appearance → Interface**, **Keep dialogs at a stable top position** is **on by default**. It anchors primary panel dialogs near the top of the viewport, so switching between editor tabs whose contents have different heights does not make the dialog jump vertically. The account preference is `stable_dialog_position: true|false` in `/api/preferences`; turning it off restores the browser's vertically centered dialog behavior. The setting changes only panel presentation and does not affect proxy configuration or editor data.
### Switches for on/off settings
Under **Settings → Appearance → Interface**, **Show on/off settings as switches** is **on by default**. Settings that turn a feature or a whole section on or off (for example a vhost's **Enabled**, HSTS, rate limit, cache, Prometheus or alerts) are drawn as switches. Every standalone on/off setting, including options inside a section, is a switch. Choices from a set (TLS versions, compression algorithms, alert types, metric groups), row and column selection, cache-rule modifiers and risk confirmations stay checkboxes. Turning the preference off draws every control as an ordinary checkbox. The account preference is `switch_controls: true|false` in `/api/preferences`; it changes only panel presentation.
## Editing configuration safely
1. Open the relevant workspace and inspect existing state before editing.
2. Change a logically related group of settings and review the editor's effective-preview/status where available.
3. Save against the expected current configuration revision. A stale edit should be reloaded instead of silently overwriting a newer change.
4. Confirm whether the saved setting is active immediately or requires a process restart (notably listener binds and administration HTTPS).
5. Check the live page and request logs after sending test traffic.
Unfinished editors may be minimized into a draft dock; this is a UI convenience and **not** a durable change or backup until saved.
## History and restore
**Configuration history** stores retained validated snapshots. Restoring a snapshot creates a new configuration revision. It does not restore every filesystem file, external certificate, Secret Store key or accumulated cache/log history. For disaster recovery, use a full encrypted backup; see [Backup](BACKUP.md).
## Optional X/Y scales
Under **Settings → Appearance → Charts**, turn on **Show X/Y scales on charts**. It is **off by default**, stored per administrator through `chart_axes: true|false` in `/api/preferences`, and can be reset with **Reset section** or **Reset appearance**. No routing or persistent metric collection changes are required. The optional labels cover sampled SVG line charts in Overview (including backend, cache, Web Server, Stream and optional extra panels), Vhosts, Docker Vhosts, Streams, Web Server live metrics, Cache and Transform activity. Donuts, progress meters and categorical breakdowns have no X/Y sample axes.
- **Y:** `0` through the exact range used to plot the series, using suitable units such as `%`, `ms`, `B`, `B/s` or `/s`. Existing auto-ranging, fixed 0–100% scales and adaptive Vhost/Docker percentile scales are **not recalculated or replaced**. If an isolated Vhost peak is clipped, its actual maximum remains in the legend and the scale annotation identifies the clipped range. On HTTP and WebSocket protocol mini charts where each line is independently normalized, separate Y ranges for H1/H2/H3 are shown rather than an incorrect shared axis.
- **X:** numbers **1 ... N** identify samples in the displayed history, not elapsed seconds or minutes. Sampling can pause and Vhost/Docker/Stream lifetime histories can compact older readings into buckets. The X axis never pretends that sample spacing is uniform time.
- Labels are HTML overlays/footers rather than SVG text so they remain legible with `preserveAspectRatio="none"`. The original SVG path geometry, visible data, styling and refresh rates are unchanged. Switching axes off unwraps the existing SVGs; charts return to their previous appearance without restarting the panel.
If axis labels look crowded in a small card or on mobile, disable the setting; the default presentation is unchanged.
## Interpreting charts
- The **Cache hit ratio** donut shows cumulative `HIT / (HIT + MISS)`: BYPASS and requests outside cache are deliberately excluded from its denominator.
- The **Cache outcomes** compact horizontal 100% bar is **hidden by default**; enable it in **Settings → Appearance → Dashboard layout** or the Overview layout editor. It summarizes **cumulative request counters since the current service process started**, not recent polling intervals. The upper-right number shows the total HTTP requests since service start (full description in its tooltip and accessible label); the legend shows counts and percentages for HIT, MISS, BYPASS and OTHER. The percentages use all HTTP requests as the denominator. BYPASS includes requests where the cache path was considered but disabled/skipped (including globally disabled cache); OTHER covers requests without a cache decision, e.g. early rejected or redirect paths. These are request counts, not bytes; service restarts reset them. Values appear immediately with the first HTTP request; refreshing or pausing the browser does not reset totals. If independently counted cache outcomes exceed the request counter (e.g. while snapshots are inconsistent or a request incurs multiple cache events), the summary shows unavailable rather than fabricating OTHER or a normalized 100% breakdown. The separate recent cache trend chart remains unchanged.
- Live views are process/sampling-based and can show no-data when an integration has not reported yet.
- Per-backend protocol badges can distinguish configured HTTP mode from the protocol actually observed in connection traffic.
- Response-header timing excludes the full streamed body duration. HTTP server/client percentages refer to the specified layer.
- A data sampling gap, a reset after restart and a true zero are not always equivalent.
See [Monitoring](MONITORING.md) for metric details and [Configuration](CONFIGURATION.md) for persistent service settings.