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.

refactor(recovery): neutralize target detail vocabulary

rcourtman784a703705c0
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 2aa2f40fd5..4568639b68 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -379,8 +379,10 @@ the shared frontend label contract.
That same recovery drill-in surface now also keeps provider-specific metadata
inside a provider-neutral detail shell through
`frontend-modern/src/components/Recovery/RecoveryPointDetails.tsx`, so PBS
-repository and verification enrichments remain available without presenting the
-event drawer itself as if PBS were the native recovery model.
+datastore and verification enrichments remain available without presenting the
+event drawer itself as if PBS were the native recovery model. Operator-facing
+detail labels in that drawer should prefer neutral target wording such as
+`Target Ref`, `Target Resource`, and `Target Health`.
Those transport hooks are direct governed runtime surfaces, not just page
implementation detail: `frontend-modern/src/hooks/useRecoveryPoints.ts`,
`frontend-modern/src/hooks/useRecoveryPointsFacets.ts`,
diff --git a/frontend-modern/src/components/Recovery/RecoveryPointDetails.test.tsx b/frontend-modern/src/components/Recovery/RecoveryPointDetails.test.tsx
index d8e9465111..916b27b3d1 100644
--- a/frontend-modern/src/components/Recovery/RecoveryPointDetails.test.tsx
+++ b/frontend-modern/src/components/Recovery/RecoveryPointDetails.test.tsx
@@ -85,8 +85,8 @@ describe('RecoveryPointDetails', () => {
expect(screen.getByText('Platform Details')).toBeInTheDocument();
expect(screen.queryByText('PBS Details')).not.toBeInTheDocument();
- expect(screen.getByText('Platform-specific recovery metadata, verification state, and repository health.')).toBeInTheDocument();
- expect(screen.getByText('Repository Health')).toBeInTheDocument();
+ expect(screen.getByText('Platform-specific recovery metadata, verification state, and target health.')).toBeInTheDocument();
+ expect(screen.getByText('Target Health')).toBeInTheDocument();
expect(screen.getByText('Verification')).toBeInTheDocument();
expect(screen.getByText('Item Type')).toBeInTheDocument();
expect(screen.getByText('Cluster / Site')).toBeInTheDocument();
@@ -103,6 +103,7 @@ describe('RecoveryPointDetails', () => {
expect(screen.getByText('Remote Copy')).toBeInTheDocument();
expect(screen.getAllByText('Success').length).toBeGreaterThan(0);
expect(screen.getAllByText('Verified').length).toBeGreaterThan(0);
+ expect(screen.getByText('Target Ref')).toBeInTheDocument();
const platformCard = screen.getByText('Platform').parentElement?.parentElement;
expect(platformCard).not.toBeNull();
@@ -137,6 +138,7 @@ describe('RecoveryPointDetails', () => {
expect(screen.getByText('Dataset')).toBeInTheDocument();
expect(screen.getByText('tn-scale-01')).toBeInTheDocument();
expect(screen.getAllByText('Snapshot').length).toBeGreaterThan(0);
+ expect(screen.queryByText('Repository Ref')).not.toBeInTheDocument();
const platformCard = screen.getByText('Platform').parentElement?.parentElement;
expect(platformCard).not.toBeNull();
diff --git a/frontend-modern/src/components/Recovery/RecoveryPointDetails.tsx b/frontend-modern/src/components/Recovery/RecoveryPointDetails.tsx
index cadc504fe9..7368f77b32 100644
--- a/frontend-modern/src/components/Recovery/RecoveryPointDetails.tsx
+++ b/frontend-modern/src/components/Recovery/RecoveryPointDetails.tsx
@@ -175,9 +175,9 @@ export const RecoveryPointDetails: Component<RecoveryPointDetailsProps> = (props
if (p.verified != null) pairs.push({ k: 'Verified', v: p.verified ? 'Verified' : 'Not Verified' });
if (p.encrypted != null) pairs.push({ k: 'Encrypted', v: p.encrypted ? 'Encrypted' : 'Not Encrypted' });
if (p.subjectResourceId) pairs.push({ k: 'Item Resource', v: p.subjectResourceId });
- if (p.repositoryResourceId) pairs.push({ k: 'Repository Resource', v: p.repositoryResourceId });
+ if (p.repositoryResourceId) pairs.push({ k: 'Target Resource', v: p.repositoryResourceId });
if (p.subjectRef) pairs.push({ k: 'Item Ref', v: labelForRef(p.subjectRef) });
- if (p.repositoryRef) pairs.push({ k: 'Repository Ref', v: labelForRef(p.repositoryRef) });
+ if (p.repositoryRef) pairs.push({ k: 'Target Ref', v: labelForRef(p.repositoryRef) });
const commonDetailKeys = [
'instance',
@@ -280,7 +280,7 @@ export const RecoveryPointDetails: Component<RecoveryPointDetailsProps> = (props
Platform Details
</div>
<div class="mt-1 text-xs text-muted">
- Platform-specific recovery metadata, verification state, and repository health.
+ Platform-specific recovery metadata, verification state, and target health.
</div>
</div>
<Show when={providerBadge()}>
@@ -386,7 +386,7 @@ export const RecoveryPointDetails: Component<RecoveryPointDetailsProps> = (props
<div class="rounded border border-border px-3 py-2 text-xs">
<div class="flex items-center justify-between gap-2">
<div class="text-[10px] font-semibold uppercase tracking-wide text-muted">
- Repository Health
+ Target Health
</div>
<Show when={status.length > 0}>
<span class="inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium">
diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
index 8355aaae43..1020bc9a08 100644
--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx
@@ -53,6 +53,10 @@ const pointsByRollupId: Record<string, any[]> = {
cluster: 'lab-cluster',
node: 'pve-01',
namespace: 'finance',
+ repositoryRef: {
+ type: 'recovery-target',
+ name: 'fast-store',
+ },
display: {
itemType: 'vm',
subjectType: 'proxmox-vm',
@@ -355,6 +359,7 @@ describe('Recovery', () => {
expect(
within(detailsPanel as HTMLTableCellElement).getByText('Namespace / Group'),
).toBeInTheDocument();
+ expect(within(detailsPanel as HTMLTableCellElement).getByText('Target Ref')).toBeInTheDocument();
expect(within(detailsPanel as HTMLTableCellElement).getByText('Lab Cluster')).toBeInTheDocument();
expect(within(detailsPanel as HTMLTableCellElement).getAllByText('pve-01').length).toBeGreaterThan(0);
expect(within(detailsPanel as HTMLTableCellElement).getByText('Finance')).toBeInTheDocument();