Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix(proxmox): stop forcing 1240px width on the nodes table below wide

rcourtmana584a8238cf6
diff --git a/frontend-modern/src/features/proxmox/__tests__/proxmoxHostTableModel.test.ts b/frontend-modern/src/features/proxmox/__tests__/proxmoxHostTableModel.test.ts
index 5fad8a7ef7..a3337fc2c4 100644
--- a/frontend-modern/src/features/proxmox/__tests__/proxmoxHostTableModel.test.ts
+++ b/frontend-modern/src/features/proxmox/__tests__/proxmoxHostTableModel.test.ts
@@ -47,10 +47,16 @@ describe('proxmoxHostTableModel', () => {
'cts',
'cluster',
]);
- expect(getProxmoxHostTableMinWidthClass('compact')).toBe('min-w-[1240px]');
- expect(getProxmoxHostTableMinWidthClass('wide')).toBe('min-w-[1240px]');
expect(getProxmoxHostColumnWidthStyle('cluster', 'compact', compactIds)).toEqual({
width: '10.989%',
});
});
+
+ it('fits the container on compact and reserves the fixed floor only on wide', () => {
+ // The compact band (900-1440px) covers most laptops. Forcing a 1240px floor
+ // there pushed the rightmost column behind a horizontal scroll, so compact
+ // now fits its container; only wide keeps the fixed-width floor.
+ expect(getProxmoxHostTableMinWidthClass('compact')).toBe('min-w-full');
+ expect(getProxmoxHostTableMinWidthClass('wide')).toBe('min-w-[1240px]');
+ });
});
diff --git a/frontend-modern/src/features/proxmox/proxmoxHostTableModel.ts b/frontend-modern/src/features/proxmox/proxmoxHostTableModel.ts
index da999e8163..30db364d1f 100644
--- a/frontend-modern/src/features/proxmox/proxmoxHostTableModel.ts
+++ b/frontend-modern/src/features/proxmox/proxmoxHostTableModel.ts
@@ -124,7 +124,13 @@ export const getProxmoxHostColumnWidthStyle = (
return { width: formatPercentage(width) };
};
+// Only the `wide` layout (>= 1440px viewport) reserves a fixed 1240px floor so
+// the metric bars hit their canonical 140px width. The `compact` band spans
+// 900-1440px, which covers most laptops; forcing 1240px there pushed the
+// rightmost column (Cluster) behind a horizontal scroll that is easy to miss.
+// Because the table is `table-fixed` with percentage column widths, `min-w-full`
+// fits the container exactly and the bars scale down gracefully instead.
export const getProxmoxHostTableMinWidthClass = (
layoutMode: WorkloadTableLayoutMode,
): 'min-w-full' | 'min-w-[1240px]' =>
- layoutMode === 'mobile' || layoutMode === 'tablet' ? 'min-w-full' : 'min-w-[1240px]';
+ layoutMode === 'wide' ? 'min-w-[1240px]' : 'min-w-full';