import { createSignal, For, Show, type JSX } from "solid-js" import type { MonitorClient } from "./client.js" import { bytes, gpuPercent, percent, uptime } from "./format.js" import type { HistoryPoint } from "./types.js" type Metric = "cpu" | "ram" | "gpu" | "disk" const paths = { cpu: "M8 3v3m4-3v3m4-3v3M8 18v3m4-3v3m4-3v3M3 8h3m-3 4h3m-3 4h3m12-8h3m-3 4h3m-3 4h3M7 6h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Zm2 3h6v6H9Z", ram: "M4 7h16v10H4ZM7 17v3m4-3v3m4-3v3m4-3v3M8 10v4m4-4v4m4-4v4M2 10h2m-2 4h2m16-4h2m-2 4h2", gpu: "M3 6h17v12H3ZM20 10h2m-2 4h2M6 18v3m4-3v3m4-3v3M7 10h4v4H7Zm8 0h2m-2 4h2", disk: "M5 5h14l3 10v5H2v-5Zm-3 10h20M6 18h.01M9 18h.01", } export function MetricIcon(props: { type: Metric }) { return } function Bar(props: { value: number | null; label: string; kind?: Metric }) { return
} function Sparkline(props: { points: HistoryPoint[]; metric: "cpu" | "ram" | "gpu" }) { const points = () => props.points.filter(point => point[props.metric] !== null) const coordinates = () => { const end = props.points.at(-1)?.at ?? 0 return points().map(point => `${Math.max(0, 300 - (end - point.at) / 600)},${36 - (point[props.metric] ?? 0) * .32}`).join(" ") } return{client.error()}.
{snapshot().cpu.name}
{bytes(snapshot().ram.used)} of {bytes(snapshot().ram.total)}
{disk.name} · {bytes(disk.total)} capacity
{snapshot().disks.error ?? "No fixed drives detected"}
{snapshot().gpu.adapter?.name ?? "Intel graphics"}
{snapshot().gpu.error}
Disk readings may be stale: {snapshot().disks.error}
GPU utilization is the busiest engine on the Intel adapter, with process counters combined per engine. Other GPUs are excluded. GPU checks are limited to once every 5 seconds.
Integrated graphics borrows system RAM: {bytes(snapshot().gpu.adapter?.sharedUsed)} currently used, with a driver-reported limit of {bytes(snapshot().gpu.adapter?.sharedLimit)}. This is already part of memory usage, not extra dedicated VRAM.
Sampling runs only while this dashboard is visible. Closing it or hiding this window stops automatic checks. Use /system to reopen it or /system_status for a one-time text report. History lives only in this window. Sizes use binary units (GiB).