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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Apply pinned formatting to protection refresh presentation
pulse-triage[bot]5f415f65ea3a
diff --git a/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx b/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsxindex e79acdebce..45d899e7af 100644--- a/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx+++ b/frontend-modern/src/features/truenas/TrueNASProtectionTable.tsx@@ -431,8 +431,8 @@ export const TrueNASProtectionTable: Component<{<InlineNotice role="alert" tone="warning" aria-label="Protection refresh failed"><p class="font-medium">Could not refresh TrueNAS protection.</p><p>- Showing previously loaded events. Outcomes and counts may be out of date;- newer activity may be missing.+ Showing previously loaded events. Outcomes and counts may be out of date; newer+ activity may be missing.</p><Show when={props.onRefresh}><Buttondiff --git a/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.refresh.test.tsx b/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.refresh.test.tsxindex 80794ae836..376c1abc24 100644--- a/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.refresh.test.tsx+++ b/frontend-modern/src/features/truenas/__tests__/TrueNASProtectionTable.refresh.test.tsx@@ -140,14 +140,22 @@ describe('TrueNAS protection refresh evidence', () => {apiFetchJSON.mockRejectedValueOnce(new Error('transport unavailable'));await recovery().refetch({ background: true });apiFetchJSON.mockRejectedValueOnce(new Error('still unavailable'));- await fireEvent.click(within(notice()).getByRole('button', { name: 'Refresh TrueNAS protection' }));+ await fireEvent.click(+ within(notice()).getByRole('button', { name: 'Refresh TrueNAS protection' }),+ );await vi.waitFor(() =>- expect(within(notice()).getByRole('button', { name: 'Refresh TrueNAS protection' })).toBeEnabled(),+ expect(+ within(notice()).getByRole('button', { name: 'Refresh TrueNAS protection' }),+ ).toBeEnabled(),);expect(row('apps')).not.toBeNull();apiFetchJSON.mockResolvedValueOnce({ data: [] });- await fireEvent.click(within(notice()).getByRole('button', { name: 'Refresh TrueNAS protection' }));- await vi.waitFor(() => expect(screen.getByText('No TrueNAS protection activity')).toBeInTheDocument());+ await fireEvent.click(+ within(notice()).getByRole('button', { name: 'Refresh TrueNAS protection' }),+ );+ await vi.waitFor(() =>+ expect(screen.getByText('No TrueNAS protection activity')).toBeInTheDocument(),+ );expect(screen.queryByRole('alert')).not.toBeInTheDocument();expect(row('apps')).toBeNull();});@@ -159,25 +167,32 @@ describe('TrueNAS protection refresh evidence', () => {expect(screen.getByText('Loading TrueNAS protection')).toBeInTheDocument();expect(screen.queryByText('No TrueNAS protection activity')).not.toBeInTheDocument();initial.reject(new Error('private-provider-detail'));- await vi.waitFor(() => expect(screen.getByText('Could not load TrueNAS protection')).toBeInTheDocument());+ await vi.waitFor(() =>+ expect(screen.getByText('Could not load TrueNAS protection')).toBeInTheDocument(),+ );expect(screen.queryByRole('alert')).not.toBeInTheDocument();expect(document.body).not.toHaveTextContent('previously loaded');expect(document.body).not.toHaveTextContent('private-provider-detail');apiFetchJSON.mockResolvedValueOnce({ data: [] });await fireEvent.click(screen.getByRole('button', { name: 'Refresh', exact: true }));- await vi.waitFor(() => expect(screen.getByText('No TrueNAS protection activity')).toBeInTheDocument());+ await vi.waitFor(() =>+ expect(screen.getByText('No TrueNAS protection activity')).toBeInTheDocument(),+ );expect(document.querySelector('[data-truenas-protection-row]')).toBeNull();});- it.each([401, 403])('withdraws retained events after HTTP %s instead of offering stale private rows', async (status) => {- apiFetchJSON.mockResolvedValueOnce({ data: [point('apps')] });- const recovery = mountProtection();- await expectLoaded();- apiFetchJSON.mockRejectedValueOnce(Object.assign(new Error('access denied'), { status }));- await recovery().refetch({ background: true });- expect(row('apps')).toBeNull();- expect(screen.getByText('Could not load TrueNAS protection')).toBeInTheDocument();- expect(document.body).not.toHaveTextContent('previously loaded');- expect(screen.queryByRole('alert')).not.toBeInTheDocument();- });+ it.each([401, 403])(+ 'withdraws retained events after HTTP %s instead of offering stale private rows',+ async (status) => {+ apiFetchJSON.mockResolvedValueOnce({ data: [point('apps')] });+ const recovery = mountProtection();+ await expectLoaded();+ apiFetchJSON.mockRejectedValueOnce(Object.assign(new Error('access denied'), { status }));+ await recovery().refetch({ background: true });+ expect(row('apps')).toBeNull();+ expect(screen.getByText('Could not load TrueNAS protection')).toBeInTheDocument();+ expect(document.body).not.toHaveTextContent('previously loaded');+ expect(screen.queryByRole('alert')).not.toBeInTheDocument();+ },+ );});