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): simplify summary and inventory shell
rcourtmanaddb3520824d
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex a545a8362a..21503f1586 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -702,6 +702,11 @@ already establish the active workspace. `RecoveryProtectedInventorySection.tsx`should keep page/count/sort orientation inside a slim table-shell status rowand let the filter strip lead directly into the grid instead of reintroducing asecond large inventory header card above the same table.+That same shell rule should also avoid low-signal bookkeeping above the grid.+The protected-items status row should surface the active workspace, protected+item count, and issue cues, but page-number and sort-direction bookkeeping+belongs in the table chrome itself rather than competing with the primary scan+path before operators even reach the rows.That same workspace rule also means the protected-items versus recovery-eventsswitcher should live inside the active workspace header strip, not in its ownseparate band above the cards, so the page hands off from summary directly intodiff --git a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsxindex 7cd80aff19..43c10630a3 100644--- a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx+++ b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx@@ -210,24 +210,8 @@ export const RecoveryProtectedInventorySection: Component<</Show><div class="flex flex-wrap items-center gap-3 text-[11px] text-muted"><span class="font-medium text-base-content">- {sortedRollups().length} shown- </span>- <span>- {protectedPage()} / {protectedTotalPages()}- </span>- <span>- <span class="font-medium text-base-content">- {protectedSortCol() === 'lastBackup'- ? 'Latest point'- : protectedSortCol() === 'item'- ? 'Item'- : protectedSortCol() === 'type'- ? 'Item type'- : protectedSortCol() === 'platform'- ? 'Platform'- : 'Outcome'}- </span>{' '}- <span class="uppercase tracking-wide text-muted">{protectedSortDir()}</span>+ {sortedRollups().length}{' '}+ {sortedRollups().length === 1 ? 'protected item' : 'protected items'}</span></div></div>diff --git a/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx b/frontend-modern/src/components/Recovery/RecoverySummary.test.tsxindex 1e59a225bb..c329224ad5 100644--- a/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx+++ b/frontend-modern/src/components/Recovery/RecoverySummary.test.tsx@@ -57,7 +57,7 @@ describe('RecoverySummary', () => {expect(screen.getByText('Protected Footprint')).toBeInTheDocument();expect(screen.getByText('Freshness')).toBeInTheDocument();expect(screen.getByText('Recent History')).toBeInTheDocument();- expect(screen.getAllByText('Attention').length).toBeGreaterThan(0);+ expect(screen.getAllByText(/attention/i).length).toBeGreaterThan(0);expect(screen.getByText(/recovery points/i)).toBeInTheDocument();expect(screen.getByText(/item types/i)).toBeInTheDocument();expect(screen.getByText('Primary Item')).toBeInTheDocument();diff --git a/frontend-modern/src/components/Recovery/RecoverySummary.tsx b/frontend-modern/src/components/Recovery/RecoverySummary.tsxindex f826b525fc..c0740e3ec9 100644--- a/frontend-modern/src/components/Recovery/RecoverySummary.tsx+++ b/frontend-modern/src/components/Recovery/RecoverySummary.tsx@@ -66,11 +66,6 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {const visiblePostureSegments = createMemo(() =>postureSegments().filter((segment) => segment.count > 0).slice(0, 4),);- const recentWindowLabel = createMemo(() => {- const activitySummary = activity();- if (!activitySummary.startLabel || !activitySummary.endLabel) return null;- return `${activitySummary.startLabel} to ${activitySummary.endLabel}`;- });const handleTimeRangeChange = (range: string) =>props.onTimeRangeChange?.(range as RecoverySummaryTimeRange);@@ -165,19 +160,13 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {</div><div class="text-xs text-muted">stale items</div></div>- <div class="space-y-0.5 text-right text-[11px]">+ <div class="text-right text-[11px]"><div><span class="font-semibold text-rose-600 dark:text-rose-400">{summary().neverSucceeded}</span>{' '}<span class="text-muted">never succeeded</span></div>- <div>- <span class="font-semibold text-blue-600 dark:text-blue-400">- {postureSummary().running}- </span>{' '}- <span class="text-muted">running</span>- </div></div></div>@@ -194,19 +183,6 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {)}</For></div>-- <div class="border-t border-border-subtle pt-2 text-[11px]">- <div class="flex flex-wrap items-center gap-x-3 gap-y-1">- <span class="text-muted">Attention</span>- <span class="font-semibold text-base-content">{attentionCount()}</span>- <span class="text-muted">Fresh <24h</span>- <span class="font-semibold text-base-content">- {freshnessBuckets()- .filter((bucket) => bucket.key === 'under1h' || bucket.key === 'under24h')- .reduce((total, bucket) => total + bucket.count, 0)}- </span>- </div>- </div></div></SummaryMetricCard>@@ -282,18 +258,11 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {emptyMessage={props.seriesFailed?.() ? 'Trend data unavailable' : 'No recovery activity yet'}><div class="flex h-full flex-col gap-2.5">- <div class="flex items-start justify-between gap-3">- <div>- <div class="text-2xl font-semibold tabular-nums text-base-content">- {activity().totalEvents}- </div>- <div class="text-xs text-muted">recovery points</div>+ <div>+ <div class="text-2xl font-semibold tabular-nums text-base-content">+ {activity().totalEvents}</div>- <Show when={recentWindowLabel()}>- <div class="max-w-[9rem] text-right text-[11px] text-muted">- {recentWindowLabel()}- </div>- </Show>+ <div class="text-xs text-muted">recovery points</div></div><div class="flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px]">@@ -307,16 +276,14 @@ export const RecoverySummary: Component<RecoverySummaryProps> = (props) => {<span class="font-semibold text-base-content">{activity().busiestCount}</span></div>- <dl class="space-y-1 border-t border-border-subtle pt-2 text-[11px]">- <div class="flex items-center justify-between gap-3">- <dt class="text-muted">Peak Day</dt>- <dd class="font-medium text-base-content">{activity().busiestLabel ?? 'n/a'}</dd>- </div>- <div class="flex items-center justify-between gap-3">- <dt class="text-muted">Latest Activity</dt>- <dd class="font-medium text-base-content">{activity().latestLabel ?? 'n/a'}</dd>+ <div class="border-t border-border-subtle pt-2 text-[11px]">+ <div class="flex flex-wrap items-center gap-x-3 gap-y-1">+ <span class="text-muted">Peak Day</span>+ <span class="font-medium text-base-content">{activity().busiestLabel ?? 'n/a'}</span>+ <span class="text-muted">Latest</span>+ <span class="font-medium text-base-content">{activity().latestLabel ?? 'n/a'}</span></div>- </dl>+ </div></div></SummaryMetricCard></SummaryPanel>diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsxindex 6f66a340a6..a89608826c 100644--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx@@ -208,11 +208,7 @@ describe('Recovery', () => {expect(screen.queryByText('Protected inventory')).not.toBeInTheDocument();expect(screen.queryByText('Needs Attention')).not.toBeInTheDocument();expect(screen.getAllByText(/Page 1 \/ 1/i).length).toBeGreaterThan(0);- expect(- screen.getAllByText((_, element) =>- (element?.textContent || '').replace(/\s+/g, ' ').includes('Latest point'),- ).length,- ).toBeGreaterThan(0);+ expect(screen.getAllByText(/2 protected items/i).length).toBeGreaterThan(0);expect(screen.getByRole('tab', { name: /recovery events/i })).toHaveAttribute('aria-selected','false',