diff --git a/frontend-modern/src/components/Storage/StoragePageControls.tsx b/frontend-modern/src/components/Storage/StoragePageControls.tsx index e055ad192..35105f8d4 100644 --- a/frontend-modern/src/components/Storage/StoragePageControls.tsx +++ b/frontend-modern/src/components/Storage/StoragePageControls.tsx @@ -1,13 +1,11 @@ import { Component, JSX, Show, createMemo } from 'solid-js'; import { FilterBar, type FilterDef } from '@/components/shared/FilterBar'; -import { Subtabs } from '@/components/shared/Subtabs'; import { useBreakpoint } from '@/hooks/useBreakpoint'; import { STORAGE_KEYS } from '@/utils/localStorage'; import { DEFAULT_PHYSICAL_DISK_FACET_FILTER, type PhysicalDiskFilterOption, } from '@/features/storageBackups/diskPresentation'; -import { STORAGE_VIEW_OPTIONS } from '@/features/storageBackups/storagePagePresentation'; import { getNextStorageSortDirection, getStorageSortDirectionIconClass, @@ -81,27 +79,10 @@ type StoragePageControlsProps = { savedViewsKey?: string; }; -const VIEW_TABS = STORAGE_VIEW_OPTIONS as { value: string; label: string }[]; const storageStatusDot = (className: string) => ( ); -type StorageViewSwitcherProps = { - view: () => StorageView; - setView: (value: StorageView) => void; - class?: string; -}; - -export const StorageViewSwitcher: Component = (props) => ( - props.setView(value as StorageView)} - ariaLabel="Storage view" - tabs={VIEW_TABS} - /> -); - export const StoragePageControls: Component = (props) => { const { isMobile } = useBreakpoint(); const isPoolsView = () => props.view() === 'pools'; @@ -287,8 +268,6 @@ export const StoragePageControls: Component = (props) return (
- - { expect(storageFilterStateSource).toContain('PHYSICAL_DISK_ALL_GROUPS_FILTER_LABEL'); expect(storagePageSource).toContain('StorageContentCard'); expect(storagePageControlsSource).toContain('FilterBar'); - expect(storagePageControlsSource).toContain('Subtabs'); - expect(storagePageControlsSource).toContain('STORAGE_VIEW_OPTIONS'); expect(storagePageControlsSource).toContain('hasActiveStorageFilters'); expect(storagePageControlsSource).toContain('DEFAULT_STORAGE_SORT_OPTIONS'); expect(storagePageControlsSource).toContain('getNextStorageSortDirection'); @@ -1463,6 +1461,12 @@ describe('frontend resource type boundaries', () => { expect(storagePageControlsSource).not.toContain('StorageControls'); expect(storagePageControlsSource).not.toContain('useStoragePageControlsModel'); expect(storagePageControlsSource).not.toContain('focus:ring-blue-500'); + // StoragePageControls used to render a Subtabs strip for "Storage / + // Physical Disks" alongside the segmented control inside the + // StorageContentCard header, producing two switches bound to the same + // view state. The view switch lives only on the table card now. + expect(storagePageControlsSource).not.toContain('Subtabs'); + expect(storagePageControlsSource).not.toContain('StorageViewSwitcher'); expect(storageFilterPresentationSource).toContain('export const getStorageSortDirectionTitle'); expect(storageFilterPresentationSource).toContain( 'export const getStorageSortDirectionIconClass',