clusev/database/migrations
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
..
0001_01_01_000000_create_users_table.php feat: scaffold — Dockerized Laravel 13 + Livewire 3 + Tailwind 4 + Reverb 2026-06-12 00:31:50 +02:00
0001_01_01_000001_create_cache_table.php feat: scaffold — Dockerized Laravel 13 + Livewire 3 + Tailwind 4 + Reverb 2026-06-12 00:31:50 +02:00
0001_01_01_000002_create_jobs_table.php feat: scaffold — Dockerized Laravel 13 + Livewire 3 + Tailwind 4 + Reverb 2026-06-12 00:31:50 +02:00
2026_06_12_041823_create_servers_table.php feat: v1 data models + routes (Server/AuditEvent/SshCredential) 2026-06-12 06:25:47 +02:00
2026_06_12_041824_create_audit_events_table.php feat: v1 data models + routes (Server/AuditEvent/SshCredential) 2026-06-12 06:25:47 +02:00
2026_06_12_041824_create_ssh_credentials_table.php feat: v1 data models + routes (Server/AuditEvent/SshCredential) 2026-06-12 06:25:47 +02:00
2026_06_12_114836_add_security_columns_to_users_table.php feat: auth + 2FA (login wall + TOTP + forced onboarding) 2026-06-12 13:57:02 +02:00
2026_06_12_120000_add_ssh_host_key_to_servers.php fix(ssh): address adversarial review — host-key pinning, escaping, parsers 2026-06-12 21:55:27 +02:00
2026_06_13_010000_add_name_and_status_to_ssh_credentials.php feat(security): dashboard hardening, credential mgmt, system domain/TLS + channel, self-hardening 2026-06-13 02:25:23 +02:00
2026_06_13_010001_create_settings_table.php feat(security): dashboard hardening, credential mgmt, system domain/TLS + channel, self-hardening 2026-06-13 02:25:23 +02:00
2026_06_13_020000_drop_dashboard_domain_settings.php fix(tls/ui): fully automatic TLS (status-only) + uniform hardening buttons 2026-06-13 21:17:26 +02:00
2026_06_13_030000_add_locale_to_users.php feat(i18n): bilingual foundation (DE/EN) + localize auth/dashboard/servers/fleet/account 2026-06-13 22:36:16 +02:00
2026_06_14_000001_add_two_factor_recovery_codes_to_users_table.php feat(auth): store 2FA recovery codes (encrypted) on users 2026-06-14 16:48:21 +02:00
2026_06_14_000002_create_webauthn_credentials_table.php fix(webauthn): hash-indexed credential ids + reset keys on 2FA disable 2026-06-14 18:40:24 +02:00
2026_06_17_000001_add_two_factor_last_used_step_to_users_table.php fix(security): harden brute-force, rate-limiting and auth-DoS (audit follow-up) 2026-06-17 17:59:45 +02:00
2026_06_20_000001_create_banned_ips_table.php feat(auth): BannedIp model + migration 2026-06-20 17:26:28 +02:00
2026_06_20_000010_create_wg_traffic_samples_table.php feat(wg): wg_traffic_samples table + model 2026-06-20 23:59:11 +02:00
2026_06_25_000001_create_metric_samples_table.php feat(metrics): persistent resource-history graph on the Server-Details page 2026-06-25 01:31:27 +02:00