Rebalance Proxmox hosts top-table column widths

Disk shared half the weight of CPU and memory while rendering the same
kind of usage bar, so the disk meter was squeezed and the over-allocated
version/uptime/temp/cluster columns wasted space the node column needed
for longer cluster-style names. Equalize CPU/memory/disk to the workloads
table convention (140px each), give node headroom, and trim the
short-content columns to what their labels and values actually need
across desktop, tablet, and mobile layout modes.

(Recommits the change intended for bd18c0f5e, whose message accidentally
landed against an unrelated Kubernetes diff due to a parallel-agent
commit race; that earlier commit was left intact rather than rewritten.)
This commit is contained in:
rcourtman
2026-05-20 09:39:13 +01:00
parent 1ce47e21a0
commit 46f2f459c1
@@ -40,17 +40,23 @@ const HOST_COLUMN_MIN_LAYOUT: Record<ProxmoxHostTableColumnId, WorkloadTableLayo
cluster: 'compact',
};
// CPU, memory, and disk render the same kind of usage bar, so they share
// weights (matches the workloads table below, where the three metric
// columns are all 140px). Node gets a little extra headroom for longer
// cluster-style names like "Disaster Recovery A"; the short-content
// columns (version pill, uptime, temp gauge, vms/cts badges, cluster
// pill) take only what they need.
const HOST_COLUMN_DESKTOP_WIDTHS: Record<ProxmoxHostTableColumnId, number> = {
node: 15,
version: 8,
uptime: 7,
node: 17,
version: 6,
uptime: 6,
cpu: 13,
memory: 13,
disk: 7,
temp: 7,
vms: 5,
cts: 5,
cluster: 12,
disk: 13,
temp: 5,
vms: 4,
cts: 4,
cluster: 10,
};
const HOST_COLUMN_RESPONSIVE_WEIGHTS: Record<
@@ -58,17 +64,17 @@ const HOST_COLUMN_RESPONSIVE_WEIGHTS: Record<
Partial<Record<ProxmoxHostTableColumnId, number>>
> = {
mobile: {
node: 44,
cpu: 23,
memory: 23,
disk: 10,
node: 40,
cpu: 20,
memory: 20,
disk: 20,
},
tablet: {
node: 30,
cpu: 19,
memory: 19,
disk: 11,
temp: 8,
node: 28,
cpu: 18,
memory: 18,
disk: 18,
temp: 6,
vms: 6,
cts: 6,
},