feat(dashboard): add real system metrics endpoint and fix UI dark-theme issues
Some checks failed
CI / Check (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Formatting (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Release Build (push) Has been cancelled

- Add /api/system/metrics endpoint reading real data from /proc (CPU, memory, disk, network, load avg, uptime, connections)
- Replace hardcoded fake monitoring metrics with live API data
- Replace random chart data with real latency/error-rate/client-request charts from DB logs
- Fix light-mode colors leaking into dark theme (monitoring stream bg, settings tokens, warning card)
- Add 'models' to page title map, fix System Health card structure
- Move inline styles to CSS classes (monitoring-layout, monitoring-stream, token-item, warning-card)
- Prevent duplicate style injection in monitoring page
This commit is contained in:
2026-03-02 10:52:15 -05:00
parent 8613f30c7b
commit d386820d16
6 changed files with 315 additions and 135 deletions

View File

@@ -1120,3 +1120,41 @@ body {
::-webkit-scrollbar-thumb:hover {
background: var(--bg4);
}
/* Monitoring Layout */
.monitoring-layout {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 1.5rem;
}
.monitoring-stream {
height: 400px;
overflow-y: auto;
background-color: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
margin-top: 1rem;
padding: 1rem;
}
.monitoring-charts {
margin-top: 1.5rem;
}
/* Settings: Token Items */
.token-item {
display: flex;
gap: 0.5rem;
align-items: center;
background: var(--bg0);
padding: 0.5rem;
border-radius: 6px;
border: 1px solid var(--bg2);
}
/* Settings: Warning Card */
.warning-card {
border: 1px dashed var(--warning);
background: rgba(215, 153, 33, 0.08);
}