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
refactor(recovery): separate workspace controls from data cards
rcourtmande80efa59daa
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex e700ce61cb..c4ad21f5e2 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -749,8 +749,9 @@ uppercase headers or oversized filter chrome.That same workspace-shell rule should also avoid a dedicated recovery-onlystatus strip above the control bar. Protected-items and recovery-events shouldsurface their tabs, counts, and issue cues through the shared page-controls-search row so the page hands from summary directly into one canonical control-surface, the same way other Pulse monitoring pages do.+search row inside one standalone shared control card, so the page hands from+summary into the same controls-card then table-card rhythm used by the stronger+Pulse monitoring pages.That same strip should not repeat the broad stale or never-succeeded posturecounts once the summary already owns those signals. The protected-items controlrow should stay focused on workspace navigation, drill-in context, and active@@ -760,9 +761,10 @@ recovery embeds its workspace tabs inside the page-controls row, the switchershould use the shared `Subtabs.tsx` control-surface variant instead of stackingrecovery-only shell, list, and button classes on top of the primitive.That same workspace rule also means the protected-items versus recovery-events-switcher should live inside the active workspace header strip, not in its own-separate band above the cards, so the page hands off from summary directly into-the active control surface the way infrastructure and workloads do.+switcher should live inside the shared controls card rather than a recovery-only+band or a table-card header strip, so the page hands off from summary into one+canonical active control surface before the data card the way infrastructure+and workloads do.That same handoff should keep recovery on the standard Pulse summary density.`RecoverySummary.tsx` should use the shared default `SummaryPanel` /`SummaryMetricCard` rhythm that infrastructure and workloads use, instead ofdiff --git a/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx b/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsxindex 5a894d7525..7ad96f6e5a 100644--- a/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx+++ b/frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx@@ -129,9 +129,9 @@ export const RecoveryHistorySection: Component<RecoveryHistorySectionProps> = (p});return (- <Card padding="none" tone="card" class="overflow-hidden border-border-subtle bg-surface">+ <div class="flex flex-col gap-3"><Show when={!props.kioskMode}>- <div class="border-b border-border-subtle/80 bg-surface px-4 py-2.5">+ <Card padding="sm" tone="card" class="border-border-subtle bg-surface"><PageControlsrole="group"aria-label="Recovery events controls"@@ -426,24 +426,26 @@ export const RecoveryHistorySection: Component<RecoveryHistorySectionProps> = (p</For></LabeledFilterSelect></PageControls>- </div>+ </Card></Show>- <RecoveryHistoryTable- clearSelectedPoint={clearSelectedPoint}- currentPage={props.currentPage}- groupedByDay={props.groupedByDay}- hasActiveArtifactFilters={props.hasActiveArtifactFilters}- mobileVisibleArtifactColumns={props.mobileVisibleArtifactColumns}- recoveryPoints={props.recoveryPoints}- resetAllArtifactFilters={props.resetAllArtifactFilters}- resourcesById={props.resourcesById}- selectedPoint={selectedPoint}- setCurrentPage={props.setCurrentPage}- tableColumnCount={props.tableColumnCount}- tableMinWidth={props.tableMinWidth}- toggleSelectedPoint={toggleSelectedPoint}- totalPages={props.totalPages}- />- </Card>+ <Card padding="none" tone="card" class="overflow-hidden border-border-subtle bg-surface">+ <RecoveryHistoryTable+ clearSelectedPoint={clearSelectedPoint}+ currentPage={props.currentPage}+ groupedByDay={props.groupedByDay}+ hasActiveArtifactFilters={props.hasActiveArtifactFilters}+ mobileVisibleArtifactColumns={props.mobileVisibleArtifactColumns}+ recoveryPoints={props.recoveryPoints}+ resetAllArtifactFilters={props.resetAllArtifactFilters}+ resourcesById={props.resourcesById}+ selectedPoint={selectedPoint}+ setCurrentPage={props.setCurrentPage}+ tableColumnCount={props.tableColumnCount}+ tableMinWidth={props.tableMinWidth}+ toggleSelectedPoint={toggleSelectedPoint}+ totalPages={props.totalPages}+ />+ </Card>+ </div>);};diff --git a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsxindex 428b17eb4b..469963acbd 100644--- a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx+++ b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx@@ -197,13 +197,9 @@ export const RecoveryProtectedInventorySection: Component<});return (- <Card- padding="none"- tone="card"- class="overflow-hidden border-border-subtle bg-surface"- >+ <div class="flex flex-col gap-3"><Show when={!props.kioskMode}>- <div class="border-b border-border-subtle/80 bg-surface px-4 py-2">+ <Card padding="sm" tone="card" class="border-border-subtle bg-surface"><PageControlsrole="group"aria-label="Protected items controls"@@ -313,38 +309,43 @@ export const RecoveryProtectedInventorySection: Component<Stale only</button></PageControls>- </div>+ </Card></Show>- <Show when={props.loading() && props.filteredRollups().length === 0}>- <div class="px-6 py-6 text-sm text-muted">- {getRecoveryProtectedItemsLoadingState().text}- </div>- </Show>+ <Card+ padding="none"+ tone="card"+ class="overflow-hidden border-border-subtle bg-surface"+ >+ <Show when={props.loading() && props.filteredRollups().length === 0}>+ <div class="px-6 py-6 text-sm text-muted">+ {getRecoveryProtectedItemsLoadingState().text}+ </div>+ </Show>- <Show when={!props.loading() && props.error()}>- <div class="p-6">- <EmptyState- title={getRecoveryProtectedItemsFailureState().title}- description={String((props.error() as Error)?.message || props.error())}- />- </div>- </Show>+ <Show when={!props.loading() && props.error()}>+ <div class="p-6">+ <EmptyState+ title={getRecoveryProtectedItemsFailureState().title}+ description={String((props.error() as Error)?.message || props.error())}+ />+ </div>+ </Show>- <Show- when={!props.loading() && !props.error() && props.filteredRollups().length === 0}- >- <div class="p-6">- <EmptyState {...getRecoveryProtectedItemsEmptyState()} />- </div>- </Show>+ <Show+ when={!props.loading() && !props.error() && props.filteredRollups().length === 0}+ >+ <div class="p-6">+ <EmptyState {...getRecoveryProtectedItemsEmptyState()} />+ </div>+ </Show>- <Show when={props.filteredRollups().length > 0}>- <div class="overflow-x-auto bg-surface">- <Table- class="w-full border-collapse whitespace-nowrap"- style={{ 'table-layout': 'fixed', 'min-width': props.isMobile ? '100%' : '640px' }}- >+ <Show when={props.filteredRollups().length > 0}>+ <div class="overflow-x-auto bg-surface">+ <Table+ class="w-full border-collapse whitespace-nowrap"+ style={{ 'table-layout': 'fixed', 'min-width': props.isMobile ? '100%' : '640px' }}+ ><TableHeader><TableRow class="border-b border-border bg-surface-alt/95 text-muted">{(@@ -535,42 +536,45 @@ export const RecoveryProtectedInventorySection: Component<}}</For></TableBody>- </Table>- </div>- <div class="flex items-center justify-between gap-2 border-t border-border bg-surface px-4 py-3 text-xs text-muted">- <div>- <Show- when={sortedRollups().length > 0}- fallback={<span>Showing 0 of 0 protected items</span>}- >+ </Table>+ </div>+ <div class="flex items-center justify-between gap-2 border-t border-border bg-surface px-4 py-3 text-xs text-muted">+ <div>+ <Show+ when={sortedRollups().length > 0}+ fallback={<span>Showing 0 of 0 protected items</span>}+ >+ <span>+ Showing {pageStart()} - {pageEnd()} of {sortedRollups().length} protected items+ </span>+ </Show>+ </div>+ <div class="flex items-center gap-2">+ <button+ type="button"+ disabled={protectedPage() <= 1}+ onClick={() => setProtectedPage(Math.max(1, protectedPage() - 1))}+ class="rounded-md border border-border bg-surface px-2 py-1 text-xs font-medium text-base-content disabled:opacity-50"+ >+ Prev+ </button><span>- Showing {pageStart()} - {pageEnd()} of {sortedRollups().length} protected items+ Page {protectedPage()} / {protectedTotalPages()}</span>- </Show>+ <button+ type="button"+ disabled={protectedPage() >= protectedTotalPages()}+ onClick={() =>+ setProtectedPage(Math.min(protectedTotalPages(), protectedPage() + 1))+ }+ class="rounded-md border border-border bg-surface px-2 py-1 text-xs font-medium text-base-content disabled:opacity-50"+ >+ Next+ </button>+ </div></div>- <div class="flex items-center gap-2">- <button- type="button"- disabled={protectedPage() <= 1}- onClick={() => setProtectedPage(Math.max(1, protectedPage() - 1))}- class="rounded-md border border-border bg-surface px-2 py-1 text-xs font-medium text-base-content disabled:opacity-50"- >- Prev- </button>- <span>- Page {protectedPage()} / {protectedTotalPages()}- </span>- <button- type="button"- disabled={protectedPage() >= protectedTotalPages()}- onClick={() => setProtectedPage(Math.min(protectedTotalPages(), protectedPage() + 1))}- class="rounded-md border border-border bg-surface px-2 py-1 text-xs font-medium text-base-content disabled:opacity-50"- >- Next- </button>- </div>- </div>- </Show>- </Card>+ </Show>+ </Card>+ </div>);};diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsxindex 272f50fbc9..3f1331e6ca 100644--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx@@ -245,6 +245,9 @@ describe('Recovery', () => {expect(screen.getAllByRole('table')).toHaveLength(1);});const inventoryTable = screen.getAllByRole('table')[0];+ expect(+ inventoryControls.compareDocumentPosition(inventoryTable) & Node.DOCUMENT_POSITION_FOLLOWING,+ ).not.toBe(0);expect(within(inventoryTable).getByText('Item')).toBeInTheDocument();expect(within(inventoryTable).getByText('Item Type')).toBeInTheDocument();expect(within(inventoryTable).getByText('Platform')).toBeInTheDocument();@@ -277,6 +280,9 @@ describe('Recovery', () => {});const historyTable = screen.getAllByRole('table')[0];const historyControls = screen.getByRole('group', { name: /recovery events controls/i });+ expect(+ historyControls.compareDocumentPosition(historyTable) & Node.DOCUMENT_POSITION_FOLLOWING,+ ).not.toBe(0);expect(within(historyControls).getByPlaceholderText('Search recovery history...'),).toBeInTheDocument();