feat: add Dashboard tab with live GPU overview

Add a new Dashboard tab as the default/first tab (Dashboard - Curve -
Performance - Fans) showing a full GPU overview.

Backend:
- New hal/dashboard.py: one-shot static GPU info via NVML (VBIOS, CUDA
  cores, compute capability, bus width, BAR1/CPU-accessible VRAM,
  Resizable BAR, PCIe max, max clocks, power limits, temp thresholds,
  persistence mode, fan count, serial, board part number, UUID).
  ROP count and VRAM type are best-effort from a per-model table since
  NVML does not expose them.
- New /api/dashboard endpoint.
- MonitoringSample gains live throttle_reasons (+label), PCIe link
  width/generation (downclocks when idle, so read per poll), and VRAM
  temp (from the MEMORY thermal sensor, if exposed).

Frontend:
- New Dashboard component: critical top row (throttling, voltage,
  GPU/VRAM temps), full live-monitor grid with sparklines, and a static
  GPU-information grid. Unavailable fields are omitted.
- useDashboard hook + DashboardInfo type + api.client dashboard().

Also: restrict CORS to localhost origins (end-anchored), make
_int_key_deltas fail closed on bad keys, and clean up lint blockers in
server.py/monitoring.py.
This commit is contained in:
ARIA committed 2026-09-02 16:56:47 +02:00
1 parent 3c55263250
commit da507d55bb
11 files changed
+907 -72

No files matched your search

+42 -2
View File
@@ -8,7 +8,7 @@ export interface VFPoint {
delta_mhz: number;
effective_freq_khz: number;
effective_freq_mhz: number;
domain: 'gpu' | 'memory';
domain: "gpu" | "memory";
}
export interface CurveState {
@@ -34,6 +34,46 @@ export interface MonitoringSample {
gpu_util_pct: number | null;
mem_util_pct: number | null;
mem_clock_mhz: number | null;
throttle_reasons: number | null;
throttle_reasons_label: string | null;
pcie_link_width: number | null;
pcie_link_generation: number | null;
mem_temp_c: number | null;
}
export interface DashboardInfo {
name: string | null;
index: number;
driver_version: string | null;
vbios_version: string | null;
serial: string | null;
board_part_number: string | null;
uuid: string | null;
cuda_cores: number | null;
cuda_compute_capability: string | null;
rop_count: number | null;
vram_total_bytes: number | null;
vram_type: string | null;
memory_bus_width: number | null;
bar1_total_bytes: number | null;
bar1_used_bytes: number | null;
resizable_bar: boolean | null;
pcie_link_width: number | null;
pcie_link_generation: number | null;
pcie_max_link_width: number | null;
pcie_max_link_generation: number | null;
max_graphics_clock_mhz: number | null;
max_memory_clock_mhz: number | null;
max_video_clock_mhz: number | null;
power_limit_w: number | null;
power_min_limit_w: number | null;
power_max_limit_w: number | null;
persistence_mode: boolean | null;
num_fans: number | null;
supported_throttle_reasons: number | null;
temp_slowdown_c: number | null;
temp_shutdown_c: number | null;
temp_gpu_max_c: number | null;
}
export interface GpuInfo {
@@ -73,7 +113,7 @@ export interface FanPoint {
export interface FanState {
fan_pct: number | null;
fan_mode: 'auto' | 'curve' | null;
fan_mode: "auto" | "curve" | null;
min_fan_pct: number | null;
max_fan_pct: number | null;
curve: FanPoint[] | null;