48 lines
2.4 KiB
Markdown
48 lines
2.4 KiB
Markdown
# Factory Overview dashboard preset (0.33.1)
|
|
|
|
`src/admin/web/dashboard-defaults.json` is the single factory configuration
|
|
for the Rust admin preference API and the authenticated JavaScript panel.
|
|
|
|
The preset contains:
|
|
|
|
- `dashboard_widgets`: complete card identifier order, including hidden cards;
|
|
- `dashboard_hidden_widgets`: identifiers hidden in the factory Overview;
|
|
- `dashboard_density`: `normal`, `compact` or `ultra`;
|
|
- `overview_samples`: `60`, `120`, `300` or `600` samples for first use in a browser.
|
|
|
|
Card IDs and labels are defined in `src/admin/web/dashboard-widgets.json`.
|
|
The preset may omit newly registered card IDs: the server/client will append
|
|
those cards and apply the registry's `default_hidden` flag. The preset must
|
|
not contain unknown or duplicate IDs, or hidden IDs absent from its order.
|
|
|
|
The bundled 0.33.1 preset reproduces the supplied operator layout: 78 ordered
|
|
cards, 51 hidden, compact density and 600 initial samples. The packaged
|
|
Web Server cards remain hidden by default.
|
|
|
|
## Deploying an edited preset
|
|
|
|
1. Edit `src/admin/web/dashboard-defaults.json` in the source tree.
|
|
2. Validate the JSON and identifiers
|
|
3. Rebuild RustProxy (`./dev.sh check` / the normal release build) and deploy
|
|
the newly built binary. The preset is **embedded**; editing the installed
|
|
source JSON alone does not update a running binary.
|
|
|
|
## Existing installation and reset behavior
|
|
|
|
- Admin accounts with stored preferences in SQLite retain their chosen
|
|
ordering, card visibility and density on upgrade. The preset never rewrites
|
|
these saved records. Accounts without saved preferences receive the new
|
|
factory defaults, even on upgraded installations.
|
|
- In Overview, **Arrange cards visually → Restore defaults** restores the
|
|
factory card order/visibility after the user confirms; it does not reset
|
|
unrelated appearance or sample-history settings.
|
|
- The history selector uses browser-local storage key
|
|
`rustproxy.overview.liveChartSamples`. An explicitly saved choice (including
|
|
60) wins over the factory sample count. A browser without a saved choice
|
|
starts with 600. The sample limit does not change polling frequency.
|
|
- While layout is unlocked, hide/show/reorder changes are temporary and stay
|
|
effective during backend/Stream status refresh. **Cancel changes** restores
|
|
the saved layout; **Save and lock** persists the current draft.
|
|
|
|
No SQLite schema migration or additional HTTP endpoint is required.
|