clusev/app/Console/Commands
boban 6227505528 feat(metrics): persistent resource-history graph on the Server-Details page
A CPU/RAM/Disk history graph over selectable ranges (1h/24h/7d/30d) on the server
detail page, backed by a persisted time series (the live 15s view stays cache-only).

- metric_samples table (server_id cascade, cpu/mem/disk %, load, sampled_at indexed).
- clusev:sample-metrics (scheduled every minute, mirrors clusev:wg-sample): persists
  one row per server from the cached live reading, prunes beyond --retention (30d).
- MetricHistory::series() buckets + averages samples for a window; empty buckets stay
  null so the chart shows gaps, not fabricated values.
- Servers/Show: range selector + a gap-aware SVG line chart (theme-token strokes,
  R3-compliant, mirrors the dashboard chart). historyRange is clamped via setRange()
  and the updatedHistoryRange() hook (it's a public, client-settable property).

Codex review: fixed a right-edge bucket off-by-one, clamped percentages on write, and
guarded the public range property against direct client values. Browser-verified: the
chart renders with data, range buttons, legend and gaps, zero console errors. 447
tests green, pint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 01:31:27 +02:00
..
CheckUpdate.php fix(versions): show what's-new (v-prefixed ref) + sidebar update badge (v0.9.51) 2026-06-22 00:19:27 +02:00
Install.php feat(install): fixed default admin e-mail admin@clusev.local 2026-06-19 16:54:03 +02:00
MockMetrics.php feat: reference-depth dashboard (sparkline KPIs + live dual chart + table) 2026-06-12 14:44:11 +02:00
PollMetrics.php fix(ssh): address adversarial review — host-key pinning, escaping, parsers 2026-06-12 21:55:27 +02:00
PruneAudit.php feat(audit): configurable retention + scheduled clusev:prune-audit 2026-06-14 23:40:17 +02:00
ResetAdmin.php fix(webauthn): counter zero only when stored is zero + CLI clears keys 2026-06-14 18:47:07 +02:00
SampleMetrics.php feat(metrics): persistent resource-history graph on the Server-Details page 2026-06-25 01:31:27 +02:00
SnapshotDomain.php feat(domain): change the panel domain from the dashboard (v0.4.0) 2026-06-14 01:38:16 +02:00
UnbanIp.php harden(auth): fold IPv4-mapped IPv6, dedupe unbanAll, limit bans render, forged-token test 2026-06-20 18:53:52 +02:00
WgSample.php feat(wg): clusev:wg-sample command (sample peers + prune) + schedule 2026-06-21 00:00:06 +02:00