Add real-time system stats (CPU/RAM/GPU/VRAM) and fix favicon

Favicon now matches the LokiMark topbar icon instead of an unrelated
arrow glyph. New /api/system/stats endpoint (psutil + nvidia-smi)
polled every 2s and shown in the topbar next to the Ollama status.
This commit is contained in:
Michael committed 2026-07-01 14:56:50 +02:00
1 parent b9bccac4ba
commit ecadf55743
8 files changed
+120 -7

No files matched your search

+20
View File
@@ -21,6 +21,26 @@ export async function getStatus(): Promise<OllamaStatus> {
return res.json();
}
export interface GpuStats {
name: string;
util_pct: number;
vram_used_mb: number;
vram_total_mb: number;
}
export interface SystemStats {
cpu_pct: number;
ram_used_go: number;
ram_total_go: number;
ram_pct: number;
gpu: GpuStats | null;
}
export async function getSystemStats(): Promise<SystemStats> {
const res = await fetch("/api/system/stats");
return res.json();
}
export async function getModels(): Promise<{
models: OllamaModel[];
default: string;