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.

Clarify Docker update check failures

rcourtmandca06d6a5567
diff --git a/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx b/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
index 3676275f55..cc5e6dcffb 100644
--- a/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
+++ b/frontend-modern/src/components/Workloads/__tests__/GuestRow.test.tsx
@@ -868,6 +868,7 @@ describe('GUEST_COLUMNS', () => {
const typeColumn = GUEST_COLUMNS.find((column) => column.id === 'type');
const netIoColumn = GUEST_COLUMNS.find((column) => column.id === 'netIo');
const diskIoColumn = GUEST_COLUMNS.find((column) => column.id === 'diskIo');
+ const updateColumn = GUEST_COLUMNS.find((column) => column.id === 'update');
expect(nameColumn?.width).toBe('200px');
expect(nameColumn?.minWidth).toBe('180px');
@@ -877,6 +878,7 @@ describe('GUEST_COLUMNS', () => {
expect(netIoColumn?.minWidth).toBe('170px');
expect(diskIoColumn?.width).toBe('170px');
expect(diskIoColumn?.minWidth).toBe('170px');
+ expect(updateColumn?.width).toBe('86px');
});
it('derives mobile overrides from the canonical guest column model', () => {
@@ -945,6 +947,24 @@ describe('GUEST_COLUMNS', () => {
});
});
+ it('gives Docker update status enough compact width for check-result labels', () => {
+ const compactDockerRuntimeColumnIds = [
+ 'name',
+ 'cpu',
+ 'memory',
+ 'uptime',
+ 'image',
+ 'context',
+ 'update',
+ ];
+
+ expect(
+ getGuestColumnWidthStyle('update', false, 'compact', compactDockerRuntimeColumnIds),
+ ).toEqual({
+ width: '8.9109%',
+ });
+ });
+
it('maps workload table layout modes to viewport width stages', () => {
expect(getWorkloadTableLayoutMode(767)).toBe('mobile');
expect(getWorkloadTableLayoutMode(768)).toBe('tablet');
diff --git a/frontend-modern/src/components/Workloads/guestRowModel.tsx b/frontend-modern/src/components/Workloads/guestRowModel.tsx
index 2baaba18cd..fdf0870c48 100644
--- a/frontend-modern/src/components/Workloads/guestRowModel.tsx
+++ b/frontend-modern/src/components/Workloads/guestRowModel.tsx
@@ -322,7 +322,7 @@ export const GUEST_COLUMNS: ColumnDef[] = [
toggleable: true,
sortKey: 'diskIo',
},
- { id: 'update', label: 'Update', width: '60px', toggleable: true },
+ { id: 'update', label: 'Update', width: '86px', toggleable: true },
];
const GUEST_COLUMN_BY_ID = new Map(GUEST_COLUMNS.map((column) => [column.id, column] as const));
@@ -375,7 +375,7 @@ const GUEST_COLUMN_RESPONSIVE_WEIGHTS: Record<
image: 18,
namespace: 11,
context: 13,
- update: 6,
+ update: 9,
},
};
diff --git a/frontend-modern/src/components/shared/ContainerUpdateBadge.tsx b/frontend-modern/src/components/shared/ContainerUpdateBadge.tsx
index 6488f9e790..9d0d2b06ee 100644
--- a/frontend-modern/src/components/shared/ContainerUpdateBadge.tsx
+++ b/frontend-modern/src/components/shared/ContainerUpdateBadge.tsx
@@ -111,7 +111,7 @@ export const ContainerUpdateBadge: Component<ContainerUpdateBadgeProps> = (props
onMouseLeave={() => hideTooltip()}
>
<ErrorIndicatorIcon class="w-3 h-3" />
- <span>{props.compact ? 'Failed' : 'Check failed'}</span>
+ <span>Check failed</span>
</span>
</Match>
<Match when={props.showCurrent && hasContainerUpdateCurrent(props.updateStatus)}>
diff --git a/frontend-modern/src/components/shared/__tests__/ContainerUpdateBadge.test.tsx b/frontend-modern/src/components/shared/__tests__/ContainerUpdateBadge.test.tsx
index 827f6bc5c3..fbbe0f29ed 100644
--- a/frontend-modern/src/components/shared/__tests__/ContainerUpdateBadge.test.tsx
+++ b/frontend-modern/src/components/shared/__tests__/ContainerUpdateBadge.test.tsx
@@ -119,7 +119,7 @@ describe('ContainerUpdateBadge', () => {
/>
));
- expect(screen.getByText('Failed')).toBeInTheDocument();
+ expect(screen.getByText('Check failed')).toBeInTheDocument();
expect(screen.queryByRole('button')).not.toBeInTheDocument();
});
});