Add ZFS vdev exposure in API and frontend

This commit is contained in:
2026-03-07 04:14:14 +00:00
parent 10de5563b2
commit 3ef7061aa5
5 changed files with 65 additions and 9 deletions

View File

@@ -264,7 +264,7 @@ function TableView({ enclosure, onSelect, selectedSerial, t }) {
<table style={{ width: "100%", borderCollapse: "separate", borderSpacing: "0 4px", fontSize: 13 }}>
<thead>
<tr style={{ textAlign: "left", color: t.textSecondary, fontSize: 11, textTransform: "uppercase", letterSpacing: 0.8 }}>
{["Slot", "Device", "Model", "Serial", "WWN", "FW", "Capacity", "Pool", "Temp", "Hours", "Health"].map((h) => (
{["Slot", "Device", "Model", "Serial", "WWN", "FW", "Capacity", "Pool", "Vdev", "Temp", "Hours", "Health"].map((h) => (
<th key={h} style={{ padding: "6px 10px", fontWeight: 600, borderBottom: `2px solid ${t.divider}` }}>{h}</th>
))}
</tr>
@@ -304,6 +304,16 @@ function TableView({ enclosure, onSelect, selectedSerial, t }) {
<span style={{ fontSize: 11, color: t.textMuted, fontStyle: "italic" }}>{"\u2014"}</span>
)}
</td>
<td style={{ padding: "8px 10px" }}>
{d.zfs_vdev ? (
<span style={{
fontSize: 11, fontWeight: 500, color: t.textSecondary,
fontFamily: "'JetBrains Mono', monospace",
}}>{d.zfs_vdev}</span>
) : (
<span style={{ fontSize: 11, color: t.textMuted, fontStyle: "italic" }}>{"\u2014"}</span>
)}
</td>
<td style={{ padding: "8px 10px", fontWeight: 600, color: d.temperature_c >= 40 ? t.health.warning.text : t.text }}>{d.temperature_c != null ? `${d.temperature_c}\u00B0C` : "\u2014"}</td>
<td style={{ padding: "8px 10px", color: t.text }}>{formatHours(d.power_on_hours)}</td>
<td style={{ padding: "8px 10px", borderRadius: "0 6px 6px 0" }}><StatusPill status={healthStatus} t={t} /></td>
@@ -413,6 +423,14 @@ function DriveDetail({ slot, onClose, t }) {
}}>
{d.zfs_pool}
</span>
{d.zfs_vdev && (
<span style={{
fontSize: 12, fontWeight: 600, color: t.health.healthy.text, opacity: 0.85,
fontFamily: "'JetBrains Mono', monospace",
}}>
/ {d.zfs_vdev}
</span>
)}
<span style={{
fontSize: 10, fontWeight: 600, color: t.health.healthy.text, opacity: 0.7,
background: t.health.healthy.border + "33", padding: "2px 6px", borderRadius: 4,