import { Link } from "react-router-dom"; import type { FleetHost } from "@/api/dashboard"; import { cn, formatBytes } from "@/lib/utils"; const DISK_PRESSURE = 85; const MEM_PRESSURE = 90; function Meter({ used, total, pressure }: { used: number; total: number; pressure: number }) { const pct = total > 0 ? Math.round((used / total) * 100) : 0; const hot = pct >= pressure; return (
{pct}% {formatBytes(used)} / {formatBytes(total)}
); } export function HostResourceTable({ hosts }: { hosts: FleetHost[] }) { return (

Hosts

{hosts.map((h) => ( {h.online ? ( <> ) : ( )} ))}
Host CPU Memory Disk Containers Stacks
{h.name}
{h.cpu_cores || "—"} {h.containers_running}/{h.containers_total} {h.stacks.running}/{h.stacks.total} {h.unhealthy > 0 && ( · {h.unhealthy} unhealthy )} {h.status} —{" "} check under Settings
); }