Add real-time system performance charts to dashboard

Backend: GET /api/v1/system/performance endpoint using psutil (CPU/RAM)
and nvidia-ml-py (GPU utilization, memory, temperature) with graceful
fallback. Frontend: Chart.js line charts with rolling 60-sample history
persisted to sessionStorage, flicker-free updates via persistent DOM
and diff-based dynamic section refresh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-18 21:02:55 +03:00
parent 66d1a77981
commit 4a1b4f7674
11 changed files with 390 additions and 46 deletions
@@ -3416,6 +3416,57 @@ input:-webkit-autofill:focus {
}
}
/* ===== PERFORMANCE CHARTS ===== */
.perf-charts-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 12px;
}
.perf-chart-card {
background: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: 6px;
padding: 10px 12px;
}
.perf-chart-wrap {
position: relative;
height: 60px;
}
.perf-chart-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 4px;
}
.perf-chart-label {
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.3px;
color: var(--text-secondary);
}
.perf-chart-value {
font-size: 0.85rem;
font-weight: 700;
}
.perf-chart-value.cpu { color: #2196F3; }
.perf-chart-value.ram { color: #4CAF50; }
.perf-chart-value.gpu { color: #FF9800; }
.perf-chart-unavailable {
text-align: center;
padding: 20px 0;
color: var(--text-secondary);
font-size: 0.8rem;
}
/* ===== PROFILES ===== */
.badge-profile-active {