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.

feat(recovery): add unified recovery summary framing

rcourtman0c62fb131ab0
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 2e89137e8d..fcc447c82a 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -31,22 +31,24 @@ querying, and the operator-facing storage health presentation layer.
5. `frontend-modern/src/features/recovery/useRecoverySurfaceState.ts`
6. `frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx`
7. `frontend-modern/src/components/Recovery/RecoveryActivitySection.tsx`
-8. `frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx`
-9. `frontend-modern/src/components/Recovery/RecoveryHistoryTable.tsx`
-10. `frontend-modern/src/components/Recovery/useRecoveryHistorySectionState.ts`
-11. `frontend-modern/src/pages/Storage.tsx`
-12. `frontend-modern/src/components/Storage/Storage.tsx`
-13. `frontend-modern/src/features/storageBackups/storageModelCore.ts`
-14. `frontend-modern/src/hooks/useRecoveryPoints.ts`
-15. `frontend-modern/src/hooks/useRecoveryRollups.ts`
-16. `frontend-modern/src/pages/RecoveryRoute.tsx`
-17. `frontend-modern/src/pages/Dashboard.tsx`
-18. `frontend-modern/src/features/dashboardOverview/dashboardWidgets.ts`
-19. `frontend-modern/src/components/Recovery/DashboardRecoveryStatusPanel.tsx`
-20. `frontend-modern/src/components/Storage/DashboardStoragePanel.tsx`
-21. `frontend-modern/src/types/recovery.ts`
-22. `frontend-modern/src/utils/recoveryTablePresentation.ts`
-23. `frontend-modern/src/utils/textPresentation.ts`
+8. `frontend-modern/src/components/Recovery/RecoverySummary.tsx`
+9. `frontend-modern/src/components/Recovery/RecoveryHistorySection.tsx`
+10. `frontend-modern/src/components/Recovery/RecoveryHistoryTable.tsx`
+11. `frontend-modern/src/components/Recovery/useRecoveryHistorySectionState.ts`
+12. `frontend-modern/src/pages/Storage.tsx`
+13. `frontend-modern/src/components/Storage/Storage.tsx`
+14. `frontend-modern/src/features/storageBackups/storageModelCore.ts`
+15. `frontend-modern/src/hooks/useRecoveryPoints.ts`
+16. `frontend-modern/src/hooks/useRecoveryRollups.ts`
+17. `frontend-modern/src/pages/RecoveryRoute.tsx`
+18. `frontend-modern/src/pages/Dashboard.tsx`
+19. `frontend-modern/src/features/dashboardOverview/dashboardWidgets.ts`
+20. `frontend-modern/src/components/Recovery/DashboardRecoveryStatusPanel.tsx`
+21. `frontend-modern/src/components/Storage/DashboardStoragePanel.tsx`
+22. `frontend-modern/src/types/recovery.ts`
+23. `frontend-modern/src/utils/recoverySummaryPresentation.ts`
+24. `frontend-modern/src/utils/recoveryTablePresentation.ts`
+25. `frontend-modern/src/utils/textPresentation.ts`
## Shared Boundaries
@@ -294,6 +296,13 @@ not present healthy REST-backed data as down or stale.
Meanwhile,
`frontend-modern/src/components/Recovery/` and the recovery hooks define the
timeline, protected-item, and recovery-summary UX.
+That governed page frame now starts with the shared `RecoverySummary.tsx`
+overview card so operators land on a provider-neutral recovery posture model
+before they drill into either protected-item inventory or recovery events.
+The summary remains additive to the inventory-first workflow rather than a
+replacement for it: Proxmox-heavy operators still land on protected items by
+default, but the first visible framing now reflects the whole multi-platform
+recovery system instead of a single backup table metaphor.
The recovery table presentation helper now owns the canonical subject-type
label fallback for recovery rows and delegates its title-casing to the shared
`frontend-modern/src/utils/textPresentation.ts` helper rather than keeping a
diff --git a/frontend-modern/src/components/Recovery/Recovery.tsx b/frontend-modern/src/components/Recovery/Recovery.tsx
index 448125bae6..d5dddff4a0 100644
--- a/frontend-modern/src/components/Recovery/Recovery.tsx
+++ b/frontend-modern/src/components/Recovery/Recovery.tsx
@@ -4,6 +4,7 @@ import type { Component } from 'solid-js';
import { RecoveryActivitySection } from '@/components/Recovery/RecoveryActivitySection';
import { RecoveryHistorySection } from '@/components/Recovery/RecoveryHistorySection';
import { RecoveryProtectedInventorySection } from '@/components/Recovery/RecoveryProtectedInventorySection';
+import { RecoverySummary } from '@/components/Recovery/RecoverySummary';
import { Card } from '@/components/shared/Card';
import { EmptyState } from '@/components/shared/EmptyState';
import { Subtabs } from '@/components/shared/Subtabs';
@@ -37,6 +38,7 @@ import { createHiddenCanonicalTypeColumn } from '@/utils/typeColumnDefinition';
const MOBILE_RECOVERY_COLUMNS = new Set(['time', 'subject', 'outcome']);
type RecoveryWorkspaceView = 'inventory' | 'events';
+type RecoverySummaryRange = '7d' | '30d' | '90d' | '365d';
const Recovery: Component = () => {
const kioskMode = useKioskMode();
@@ -387,6 +389,13 @@ const Recovery: Component = () => {
const activeNamespaceLabel = createMemo(() =>
namespaceFilter() === 'all' ? '' : namespaceFilter(),
);
+ const summaryRange = createMemo<RecoverySummaryRange>(() => {
+ const range = chartRangeDays();
+ if (range === 7) return '7d';
+ if (range === 90) return '90d';
+ if (range === 365) return '365d';
+ return '30d';
+ });
const hasActiveArtifactFilters = createMemo(
() =>
@@ -451,6 +460,15 @@ const Recovery: Component = () => {
return (
<div data-testid="recovery-page" class="flex flex-col gap-4">
+ <RecoverySummary
+ rollups={rollups}
+ series={() => recoverySeries.series() || []}
+ seriesLoaded={() => !recoverySeries.response.loading}
+ seriesFailed={() => Boolean(recoverySeries.response.error)}
+ summary={overallRollupsSummary}
+ timeRange={summaryRange}
+ />
+
<RecoveryActivitySection
activitySummary={activitySummary}
activeClusterLabel={activeClusterLabel}
diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
index b13544b94c..784f456933 100644
--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
@@ -147,6 +147,8 @@ describe('Recovery', () => {
it('shows one primary recovery table at a time with unified recovery labels', async () => {
render(() => <Recovery />);
+ expect(await screen.findByTestId('recovery-summary')).toBeInTheDocument();
+ expect(screen.getByText('Recovery Posture')).toBeInTheDocument();
expect(await screen.findByText('Protected Items')).toBeInTheDocument();
await screen.findByText('VM 123');
expect(screen.queryByText('Recovery Events')).not.toBeInTheDocument();
diff --git a/frontend-modern/src/utils/recoverySummaryPresentation.ts b/frontend-modern/src/utils/recoverySummaryPresentation.ts
index 957f825a27..d98f17f936 100644
--- a/frontend-modern/src/utils/recoverySummaryPresentation.ts
+++ b/frontend-modern/src/utils/recoverySummaryPresentation.ts
@@ -7,7 +7,7 @@ import {
} from '@/utils/recoveryOutcomePresentation';
import { isRecoveryRollupStale } from '@/utils/recoveryTablePresentation';
-export const RECOVERY_SUMMARY_TIME_RANGES = ['7d', '30d', '90d'] as const;
+export const RECOVERY_SUMMARY_TIME_RANGES = ['7d', '30d', '90d', '365d'] as const;
export type RecoverySummaryTimeRange = (typeof RECOVERY_SUMMARY_TIME_RANGES)[number];
@@ -15,6 +15,7 @@ export const RECOVERY_SUMMARY_TIME_RANGE_LABELS: Record<RecoverySummaryTimeRange
'7d': '7d',
'30d': '30d',
'90d': '90d',
+ '365d': '365d',
};
export type RecoveryFreshnessBucketKey = 'under1h' | 'under24h' | 'under7d' | 'over7d';