"use client" import { Vdev } from "@/lib/api" function stateColor(state: string) { switch (state?.toUpperCase()) { case "ONLINE": return "text-green-500" case "DEGRADED": return "text-yellow-500" case "FAULTED": case "OFFLINE": case "UNAVAIL": return "text-red-500" default: return "text-muted-foreground" } } function stateIcon(state: string) { switch (state?.toUpperCase()) { case "ONLINE": return "●" case "DEGRADED": return "◑" default: return "○" } } interface VdevRowProps { vdev: Vdev depth?: number } function VdevRow({ vdev, depth = 0 }: VdevRowProps) { const hasErrors = vdev.read !== 0 || vdev.write !== 0 || vdev.cksum !== 0 return ( <>
No VDEV information available.
) } return (| Name | State | Read | Write | CkSum |
|---|