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): surface item type in inventory
rcourtmandfc2a67aeac1
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex eac04fc11d..d56fda2e7c 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -344,6 +344,12 @@ fields instead of one ambiguous "primary" label. The summary may still surfaceplatform breadth and cross-platform protected items, but the recovery pagemust read item-first so the unified recovery model is not visually anchored toone platform family.+That same item-first rule also applies to the protected inventory table:+`RecoveryProtectedInventorySection.tsx` must surface protected item type as a+first-class column in the main inventory grid rather than leaving platform as+the only structural classifier beside the item label. Platform badges remain+important supporting operator context, especially for Proxmox-heavy fleets,+but the table frame itself must make protected item class explicit.The recovery table presentation helper now owns the canonical subject-typelabel fallback for recovery rows and delegates its title-casing to the shared`frontend-modern/src/utils/textPresentation.ts` helper rather than keeping adiff --git a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsxindex d365de2c94..05509af37c 100644--- a/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx+++ b/frontend-modern/src/components/Recovery/RecoveryProtectedInventorySection.tsx@@ -45,7 +45,7 @@ import { getSourcePlatformLabel, normalizeSourcePlatformQueryValue } from '@/utiimport { titleCaseDelimitedLabel } from '@/utils/textPresentation';type VerificationFilter = 'all' | 'verified' | 'unverified' | 'unknown';-type ProtectedSortCol = 'subject' | 'source' | 'lastBackup' | 'outcome';+type ProtectedSortCol = 'subject' | 'type' | 'source' | 'lastBackup' | 'outcome';type SortDir = 'asc' | 'desc';interface RecoveryRollupSummary {@@ -122,6 +122,15 @@ export const RecoveryProtectedInventorySection: Component<const rightLabel = getRecoveryRollupSubjectLabel(right, resourceIndex).toLowerCase();return multiplier * leftLabel.localeCompare(rightLabel);}+ case 'type': {+ const leftType = getRecoveryItemTypePresentation(+ left.display?.itemType || left.display?.subjectType || left.subjectRef?.type,+ )?.label.toLowerCase();+ const rightType = getRecoveryItemTypePresentation(+ right.display?.itemType || right.display?.subjectType || right.subjectRef?.type,+ )?.label.toLowerCase();+ return multiplier * (leftType || '').localeCompare(rightType || '');+ }case 'source': {const leftSource = (left.providers || []).map((provider) => getSourcePlatformLabel(String(provider)))@@ -308,13 +317,14 @@ export const RecoveryProtectedInventorySection: Component<<div class="overflow-x-auto"><Tableclass="w-full border-collapse whitespace-nowrap"- style={{ 'table-layout': 'fixed', 'min-width': props.isMobile ? '100%' : '500px' }}+ style={{ 'table-layout': 'fixed', 'min-width': props.isMobile ? '100%' : '640px' }}><TableHeader><TableRow class="bg-surface-alt text-muted border-b border-border">{([['subject', getRecoveryArtifactColumnLabel('subject', 'Subject')],+ ['type', 'Item Type'],['source', getRecoveryArtifactColumnLabel('source', 'Source')],['lastBackup', 'Latest Point'],['outcome', 'Outcome'],@@ -322,8 +332,10 @@ export const RecoveryProtectedInventorySection: Component<).map(([column, label]) => (<TableHeadclass={`py-0.5 px-3 whitespace-nowrap text-left text-[11px] sm:text-xs font-medium uppercase tracking-wider cursor-pointer select-none hover:text-base-content transition-colors${- column === 'source'- ? ' hidden md:table-cell w-[110px]'+ column === 'type'+ ? ' hidden md:table-cell w-[96px]'+ : column === 'source'+ ? ' hidden lg:table-cell w-[110px]': column === 'lastBackup'? ' w-[120px]': column === 'outcome'@@ -363,6 +375,12 @@ export const RecoveryProtectedInventorySection: Component<.sort((left, right) =>getSourcePlatformLabel(left).localeCompare(getSourcePlatformLabel(right)),);+ const itemTypePresentation =+ getRecoveryItemTypePresentation(+ rollup.display?.itemType ||+ rollup.display?.subjectType ||+ rollup.subjectRef?.type,+ ) || null;const nowMs = Date.now();const issueTone: RecoveryIssueTone = getRecoveryRollupIssueTone(rollup, nowMs);const issueRailClass =@@ -403,6 +421,21 @@ export const RecoveryProtectedInventorySection: Component<</TableCell><TableCell class="hidden md:table-cell whitespace-nowrap px-3 py-0.5">+ <Show+ when={itemTypePresentation}+ fallback={<span class="text-muted">—</span>}+ >+ <span+ class={`inline-flex min-w-[4.5rem] justify-center rounded px-1.5 py-px text-[10px] font-medium ${+ itemTypePresentation?.badgeClasses || 'bg-surface-alt text-base-content'+ }`}+ >+ {itemTypePresentation?.label}+ </span>+ </Show>+ </TableCell>++ <TableCell class="hidden lg:table-cell whitespace-nowrap px-3 py-0.5"><div class="flex flex-wrap gap-1.5"><For each={providers}>{(provider) => {diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsxindex b28a357185..9c6d6a023a 100644--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx@@ -197,7 +197,9 @@ describe('Recovery', () => {});const inventoryTable = screen.getAllByRole('table')[0];expect(within(inventoryTable).getByText('Item')).toBeInTheDocument();+ expect(within(inventoryTable).getByText('Item Type')).toBeInTheDocument();expect(within(inventoryTable).getByText('Platform')).toBeInTheDocument();+ expect(within(inventoryTable).getByText('VM')).toBeInTheDocument();expect(screen.queryByText('Backups By Date')).not.toBeInTheDocument();fireEvent.click(await screen.findByText('VM 123'));