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
Keep storage view selector in table-only embeds
rcourtmanfbf9adb419cb
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 9a17a5c9f7..838e41e475 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -1045,11 +1045,14 @@ bypass the API fail-closed execution gate.Storage and Recovery can now be embedded by a platform page in table-only modewith a forced Proxmox source/platform filter. The embedded mode suppresses-standalone page chrome and summary charts, but the canonical route-backed-filter state, fetch builders, table rendering, and storage/recovery vocabulary-remain owned by the Storage and Recovery surfaces. Platform pages must compose-those owners rather than cloning storage pools, physical disks, recovery-events, or protected-inventory tables under Proxmox-specific data contracts.+standalone page chrome, summary charts, and full filter chrome, but the+Storage surface must keep the canonical Storage / Physical Disks view selector+available unless the embedding explicitly locks a `forcedView`. The canonical+route-backed filter state, fetch builders, table rendering, and+storage/recovery vocabulary remain owned by the Storage and Recovery surfaces.+Platform pages must compose those owners rather than cloning storage pools,+physical disks, recovery events, or protected-inventory tables under+Proxmox-specific data contracts.The investigation enrichment path reads operator-state from thein-memory provider already wired against the durablediff --git a/frontend-modern/src/components/Storage/Storage.tsx b/frontend-modern/src/components/Storage/Storage.tsxindex 32a7fa4324..312f8ac71c 100644--- a/frontend-modern/src/components/Storage/Storage.tsx+++ b/frontend-modern/src/components/Storage/Storage.tsx@@ -2,7 +2,7 @@ import { Component, Show, createEffect } from 'solid-js';import StorageCephSection from '@/components/Storage/StorageCephSection';import StorageContentCard from '@/components/Storage/StorageContentCard';import StoragePageBanners from '@/components/Storage/StoragePageBanners';-import StoragePageControls from '@/components/Storage/StoragePageControls';+import StoragePageControls, { StorageViewSwitcher } from '@/components/Storage/StoragePageControls';import StoragePageSummary from '@/components/Storage/StoragePageSummary';import { PageHeader } from '@/components/shared/PageHeader';import { StickySummarySection } from '@/components/shared/StickySummarySection';@@ -166,6 +166,12 @@ const Storage: Component<StorageProps> = (props) => {</Show><div class="space-y-4" data-testid="storage-interaction-surface">+ <Show when={props.tableOnly && !props.forcedView && !kioskMode()}>+ <div data-summary-clear-ignore>+ <StorageViewSwitcher view={view} setView={setView} />+ </div>+ </Show>+<Show when={!props.tableOnly}><div data-summary-clear-ignore><StoragePageControlsdiff --git a/frontend-modern/src/components/Storage/StoragePageControls.tsx b/frontend-modern/src/components/Storage/StoragePageControls.tsxindex 5b870c7b92..9aead21ad5 100644--- a/frontend-modern/src/components/Storage/StoragePageControls.tsx+++ b/frontend-modern/src/components/Storage/StoragePageControls.tsx@@ -70,6 +70,22 @@ type StoragePageControlsProps = {const VIEW_TABS = STORAGE_VIEW_OPTIONS as { value: string; label: string }[];+type StorageViewSwitcherProps = {+ view: () => StorageView;+ setView: (value: StorageView) => void;+ class?: string;+};++export const StorageViewSwitcher: Component<StorageViewSwitcherProps> = (props) => (+ <Subtabs+ class={props.class}+ value={props.view()}+ onChange={(value) => props.setView(value as StorageView)}+ ariaLabel="Storage view"+ tabs={VIEW_TABS}+ />+);+export const StoragePageControls: Component<StoragePageControlsProps> = (props) => {const { isMobile } = useBreakpoint();const isPoolsView = () => props.view() === 'pools';@@ -154,8 +170,7 @@ export const StoragePageControls: Component<StoragePageControlsProps> = (props)label: 'Status',group: 'status',value: () => props.statusFilter(),- setValue: (value: string) =>- props.setStatusFilter(value as StorageStatusFilterValue),+ setValue: (value: string) => props.setStatusFilter(value as StorageStatusFilterValue),defaultValue: DEFAULT_STORAGE_STATUS_FILTER as StorageStatusFilterValue,options: () =>STORAGE_STATUS_FILTER_OPTIONS.map((option) => ({@@ -167,12 +182,7 @@ export const StoragePageControls: Component<StoragePageControlsProps> = (props)const diskRoleFilter = props.diskRoleFilter;const setDiskRoleFilter = props.setDiskRoleFilter;const diskRoleOptions = props.diskRoleOptions;- if (- diskRoleFilter &&- setDiskRoleFilter &&- diskRoleOptions &&- diskRoleOptions().length > 1- ) {+ if (diskRoleFilter && setDiskRoleFilter && diskRoleOptions && diskRoleOptions().length > 1) {filters.push({id: 'storage-disk-role',label: 'Role',@@ -219,12 +229,7 @@ export const StoragePageControls: Component<StoragePageControlsProps> = (props)return (<Show when={!props.kioskMode()}><div class="flex flex-col gap-2">- <Subtabs- value={props.view()}- onChange={(value) => props.setView(value as StorageView)}- ariaLabel="Storage view"- tabs={VIEW_TABS}- />+ <StorageViewSwitcher view={props.view} setView={props.setView} /><FilterBarrole="group"diff --git a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsxindex 97b68df934..de74760fea 100644--- a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx+++ b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx@@ -1825,6 +1825,29 @@ describe('Storage', () => {);});+ it('keeps the storage view selector available in table-only embedding', async () => {+ mockLocationPath = '/proxmox/storage';+ hookResources = [+ buildPhysicalDiskResource('sda', 'node-1', 'pve1'),+ buildStorageResource('storage-1', 'Local-LVM-PVE1', 'pve1'),+ ];++ render(() => <Storage embedded tableOnly forcedSourceFilter="proxmox-pve" />);++ expect(screen.getByRole('tablist', { name: 'Storage view' })).toBeInTheDocument();+ expect(screen.queryByTestId('storage-summary')).not.toBeInTheDocument();++ fireEvent.click(screen.getByRole('tab', { name: 'Physical Disks' }));++ await waitFor(() => {+ expect(screen.getByTestId('disk-list')).toHaveTextContent('disk-view:all:');+ });+ expect(screen.getByRole('tab', { name: 'Physical Disks' })).toHaveAttribute(+ 'aria-selected',+ 'true',+ );+ });+it('supports Proxmox platform table embedding without standalone page chrome', async () => {mockLocationPath = '/proxmox/storage';hookResources = [@@ -1846,6 +1869,7 @@ describe('Storage', () => {).not.toBeInTheDocument();expect(screen.queryByTestId('storage-summary')).not.toBeInTheDocument();expect(screen.queryByText('Ceph')).not.toBeInTheDocument();+ expect(screen.queryByRole('tablist', { name: 'Storage view' })).not.toBeInTheDocument();});it('collapses and restores storage charts from the shared toolbar toggle', async () => {