feat(hub/agent): alphabetical disk ordering and root disk renaming (#2006)

This commit is contained in:
Sven van Ginkel
2026-08-30 19:09:04 +02:00
committed by GitHub
parent fa9de55433
commit 87620f3251
7 changed files with 46 additions and 33 deletions

View File

@@ -484,9 +484,9 @@ function DiskCellWithMultiple(info: CellContext<SystemRecord, unknown>) {
const { info: sysInfo, status, id } = info.row.original
const extraFs = Object.entries(sysInfo.efs ?? {})
const rootDiskPct = sysInfo.dp
const rootDiskName = sysInfo.rdn
// sort extra disks by percentage descending
extraFs.sort((a, b) => b[1] - a[1])
extraFs.sort((a, b) => a[0].localeCompare(b[0]))
function getIndicatorColor(pct: number) {
const threshold = getMeterStateByThresholds(pct, colorWarn, colorCrit)
@@ -541,8 +541,8 @@ function DiskCellWithMultiple(info: CellContext<SystemRecord, unknown>) {
<TooltipContent side="right" className="max-w-xs pb-2">
<div className="grid gap-1">
<div className="grid gap-0.5">
<div className="text-[0.65rem] text-muted-foreground uppercase tracking-wide tabular-nums">
<Trans context="Root disk label">Root</Trans>
<div className="text-[0.65rem] max-w-40 text-muted-foreground uppercase tracking-wide truncate tabular-nums">
{rootDiskName ?? <Trans context="Root disk label">Root</Trans>}
</div>
<div className="flex gap-2 items-center tabular-nums text-xs">
<span className="min-w-7">{decimalString(rootDiskPct, rootDiskPct >= 10 ? 1 : 2)}%</span>