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.

Polish storage disk filters

rcourtman2e6cf9c7b897
diff --git a/frontend-modern/src/components/Storage/DiskList.tsx b/frontend-modern/src/components/Storage/DiskList.tsx
index 7588d970f5..6fa7fddf26 100644
--- a/frontend-modern/src/components/Storage/DiskList.tsx
+++ b/frontend-modern/src/components/Storage/DiskList.tsx
@@ -70,6 +70,7 @@ import {
} from '@/features/storageBackups/diskPresentation';
import type { Resource } from '@/types/resource';
import type { StorageHealthFilter } from '@/features/storageBackups/models';
+import { getStorageSourceOption } from '@/utils/storageSources';
import { DiskDetail } from './DiskDetail';
import { useDiskListModel } from './useDiskListModel';
@@ -79,6 +80,8 @@ interface DiskListProps {
selectedNode: string | null;
sourceFilter?: string;
healthFilter?: StorageHealthFilter;
+ roleFilter?: string;
+ groupFilter?: string;
searchTerm: string;
selectedDiskId: string | null;
highlightedSummarySeriesId?: string | null;
@@ -93,6 +96,8 @@ export const DiskList: Component<DiskListProps> = (props) => {
selectedNode: () => props.selectedNode,
sourceFilter: () => props.sourceFilter ?? 'all',
healthFilter: () => props.healthFilter ?? 'all',
+ roleFilter: () => props.roleFilter ?? 'all',
+ groupFilter: () => props.groupFilter ?? 'all',
searchTerm: () => props.searchTerm,
selectedDiskId: () => props.selectedDiskId,
setSelectedDiskId: props.onSelectedDiskChange,
@@ -103,6 +108,21 @@ export const DiskList: Component<DiskListProps> = (props) => {
searchTerm: props.searchTerm,
diskCount: (props.disks || []).length,
hasPVENodes: model.hasPVENodes(),
+ healthFilter: props.healthFilter ?? 'all',
+ sourceFilterLabel:
+ props.sourceFilter && props.sourceFilter !== 'all'
+ ? getStorageSourceOption(props.sourceFilter).label
+ : null,
+ roleFilterLabel:
+ props.roleFilter && props.roleFilter !== 'all'
+ ? (model.roleFilterOptions().find((option) => option.value === props.roleFilter)?.label ??
+ null)
+ : null,
+ groupFilterLabel:
+ props.groupFilter && props.groupFilter !== 'all'
+ ? (model.groupFilterOptions().find((option) => option.value === props.groupFilter)
+ ?.label ?? null)
+ : null,
});
return (
@@ -117,6 +137,9 @@ export const DiskList: Component<DiskListProps> = (props) => {
<Show when={emptyState().searchMessage}>
{(message) => <p class={PHYSICAL_DISK_EMPTY_MESSAGE_CLASS}>{message()}</p>}
</Show>
+ <For each={emptyState().filterMessages}>
+ {(message) => <p class={PHYSICAL_DISK_EMPTY_MESSAGE_CLASS}>{message}</p>}
+ </For>
</div>
<Show when={!props.searchTerm && (props.disks || []).length === 0}>
<Show
diff --git a/frontend-modern/src/components/Storage/Storage.tsx b/frontend-modern/src/components/Storage/Storage.tsx
index 4454c1c832..52f2a66c60 100644
--- a/frontend-modern/src/components/Storage/Storage.tsx
+++ b/frontend-modern/src/components/Storage/Storage.tsx
@@ -29,6 +29,12 @@ const Storage: Component = () => {
sourceFilter,
setSourceFilter,
healthFilter,
+ diskRoleFilter,
+ setDiskRoleFilter,
+ diskRoleOptions,
+ diskGroupFilter,
+ setDiskGroupFilter,
+ diskGroupOptions,
sortKey,
setSortKey,
sortDirection,
@@ -89,6 +95,8 @@ const Storage: Component = () => {
search={search}
sourceFilter={sourceFilter}
healthFilter={healthFilter}
+ diskRoleFilter={diskRoleFilter}
+ diskGroupFilter={diskGroupFilter}
selectedNodeId={selectedNodeId}
nodeOptions={nodeOptions}
physicalDisks={physicalDisks}
@@ -142,6 +150,12 @@ const Storage: Component = () => {
sourceFilter={sourceFilter}
setSourceFilter={setSourceFilter}
sourceOptions={sourceFilterOptions}
+ diskRoleFilter={diskRoleFilter}
+ setDiskRoleFilter={setDiskRoleFilter}
+ diskRoleOptions={diskRoleOptions}
+ diskGroupFilter={diskGroupFilter}
+ setDiskGroupFilter={setDiskGroupFilter}
+ diskGroupOptions={diskGroupOptions}
nodeFilterOptions={nodeFilterOptions()}
selectedNodeId={selectedNodeId}
setSelectedNodeId={setSelectedNodeId}
@@ -157,6 +171,8 @@ const Storage: Component = () => {
nodes={nodes}
sourceFilter={sourceFilter}
healthFilter={healthFilter}
+ diskRoleFilter={diskRoleFilter}
+ diskGroupFilter={diskGroupFilter}
selectedNodeId={selectedNodeId}
search={search}
groupedRecords={groupedRecords}
diff --git a/frontend-modern/src/components/Storage/StorageContentCard.tsx b/frontend-modern/src/components/Storage/StorageContentCard.tsx
index 487ad9bb68..7d063b56b7 100644
--- a/frontend-modern/src/components/Storage/StorageContentCard.tsx
+++ b/frontend-modern/src/components/Storage/StorageContentCard.tsx
@@ -19,6 +19,8 @@ type StorageContentCardProps = {
nodes: () => Resource[];
sourceFilter: () => string;
healthFilter: () => StorageHealthFilter;
+ diskRoleFilter: () => string;
+ diskGroupFilter: () => string;
selectedNodeId: () => string;
search: () => string;
groupedRecords: () => StorageGroupedRecords[];
@@ -77,6 +79,8 @@ export const StorageContentCard: Component<StorageContentCardProps> = (props) =>
nodes={props.nodes()}
sourceFilter={props.sourceFilter()}
healthFilter={props.healthFilter()}
+ roleFilter={props.diskRoleFilter()}
+ groupFilter={props.diskGroupFilter()}
selectedNode={model.selectedDiskNodeId()}
searchTerm={props.search()}
selectedDiskId={props.selectedDiskId()}
diff --git a/frontend-modern/src/components/Storage/StorageControls.tsx b/frontend-modern/src/components/Storage/StorageControls.tsx
index 4d9b34bffe..935c41d227 100644
--- a/frontend-modern/src/components/Storage/StorageControls.tsx
+++ b/frontend-modern/src/components/Storage/StorageControls.tsx
@@ -14,6 +14,7 @@ import type { StorageSortKey } from './useStorageModel';
import { DEFAULT_STORAGE_SORT_OPTIONS } from './storagePageState';
import { useStorageControlsModel } from './useStorageControlsModel';
import type { StorageSourceOption } from '@/utils/storageSources';
+import type { PhysicalDiskFilterOption } from '@/features/storageBackups/diskPresentation';
type StorageControlsProps = {
view: StorageView;
@@ -33,6 +34,12 @@ type StorageControlsProps = {
sourceFilter: () => string;
setSourceFilter: (value: string) => void;
sourceOptions: () => StorageSourceOption[];
+ diskRoleFilter?: () => string;
+ setDiskRoleFilter?: (value: string) => void;
+ diskRoleOptions?: () => PhysicalDiskFilterOption[];
+ diskGroupFilter?: () => string;
+ setDiskGroupFilter?: (value: string) => void;
+ diskGroupOptions?: () => PhysicalDiskFilterOption[];
nodeFilterOptions: Array<{ value: string; label: string }>;
selectedNodeId: () => string;
setSelectedNodeId: (value: string) => void;
@@ -89,6 +96,12 @@ export const StorageControls: Component<StorageControlsProps> = (props) => {
sourceFilter={props.sourceFilter}
setSourceFilter={props.setSourceFilter}
sourceOptions={props.sourceOptions}
+ diskRoleFilter={props.diskRoleFilter}
+ setDiskRoleFilter={props.setDiskRoleFilter}
+ diskRoleOptions={props.diskRoleOptions}
+ diskGroupFilter={props.diskGroupFilter}
+ setDiskGroupFilter={props.setDiskGroupFilter}
+ diskGroupOptions={props.diskGroupOptions}
selectedNodeId={props.selectedNodeId}
setSelectedNodeId={props.setSelectedNodeId}
leadingFilters={leadingFilters()}
diff --git a/frontend-modern/src/components/Storage/StorageFilter.tsx b/frontend-modern/src/components/Storage/StorageFilter.tsx
index 78ace24cdc..6eb9d5908c 100644
--- a/frontend-modern/src/components/Storage/StorageFilter.tsx
+++ b/frontend-modern/src/components/Storage/StorageFilter.tsx
@@ -11,6 +11,7 @@ import type { ColumnDef } from '@/hooks/useColumnVisibility';
import { useBreakpoint } from '@/hooks/useBreakpoint';
import { STORAGE_KEYS } from '@/utils/localStorage';
import type { StorageSourceOption } from '@/utils/storageSources';
+import type { PhysicalDiskFilterOption } from '@/features/storageBackups/diskPresentation';
import {
STORAGE_FILTER_COMPACT_SELECT_CLASS,
STORAGE_FILTER_RESET_ACTION_CLASS,
@@ -54,6 +55,12 @@ interface StorageFilterProps {
sourceFilter?: () => string;
setSourceFilter?: (value: string) => void;
sourceOptions?: () => StorageSourceOption[];
+ diskRoleFilter?: () => string;
+ setDiskRoleFilter?: (value: string) => void;
+ diskRoleOptions?: () => PhysicalDiskFilterOption[];
+ diskGroupFilter?: () => string;
+ setDiskGroupFilter?: (value: string) => void;
+ diskGroupOptions?: () => PhysicalDiskFilterOption[];
selectedNodeId?: () => string;
setSelectedNodeId?: (value: string) => void;
// Slot for page-specific filters (e.g., view toggle, node selector).
@@ -95,6 +102,10 @@ export const StorageFilter: Component<StorageFilterProps> = (props) => {
setStatusFilter: props.setStatusFilter,
sourceFilter: props.sourceFilter,
setSourceFilter: props.setSourceFilter,
+ diskRoleFilter: props.diskRoleFilter,
+ setDiskRoleFilter: props.setDiskRoleFilter,
+ diskGroupFilter: props.diskGroupFilter,
+ setDiskGroupFilter: props.setDiskGroupFilter,
selectedNodeId: props.selectedNodeId,
setSelectedNodeId: props.setSelectedNodeId,
sortOptions: props.sortOptions ?? DEFAULT_STORAGE_SORT_OPTIONS,
@@ -191,6 +202,52 @@ export const StorageFilter: Component<StorageFilterProps> = (props) => {
<FilterDivider />
</Show>
+ <Show
+ when={
+ props.diskRoleFilter &&
+ props.setDiskRoleFilter &&
+ (props.diskRoleOptions?.().length ?? 0) > 1
+ }
+ >
+ <LabeledFilterSelect
+ id="storage-disk-role-filter"
+ label="Role"
+ value={props.diskRoleFilter!()}
+ onChange={(e) => props.setDiskRoleFilter!(e.currentTarget.value)}
+ selectClass={STORAGE_FILTER_COMPACT_SELECT_CLASS}
+ >
+ <For each={props.diskRoleOptions!()}>
+ {(option: PhysicalDiskFilterOption) => (
+ <option value={option.value}>{option.label}</option>
+ )}
+ </For>
+ </LabeledFilterSelect>
+ <FilterDivider />
+ </Show>
+
+ <Show
+ when={
+ props.diskGroupFilter &&
+ props.setDiskGroupFilter &&
+ (props.diskGroupOptions?.().length ?? 0) > 1
+ }
+ >
+ <LabeledFilterSelect
+ id="storage-disk-group-filter"
+ label="Group"
+ value={props.diskGroupFilter!()}
+ onChange={(e) => props.setDiskGroupFilter!(e.currentTarget.value)}
+ selectClass={STORAGE_FILTER_COMPACT_SELECT_CLASS}
+ >
+ <For each={props.diskGroupOptions!()}>
+ {(option: PhysicalDiskFilterOption) => (
+ <option value={option.value}>{option.label}</option>
+ )}
+ </For>
+ </LabeledFilterSelect>
+ <FilterDivider />
+ </Show>
+
<LabeledFilterSelect
id="storage-status-filter"
label="Status"
diff --git a/frontend-modern/src/components/Storage/StoragePageControls.tsx b/frontend-modern/src/components/Storage/StoragePageControls.tsx
index f23f4732e0..bfcb23842b 100644
--- a/frontend-modern/src/components/Storage/StoragePageControls.tsx
+++ b/frontend-modern/src/components/Storage/StoragePageControls.tsx
@@ -5,6 +5,7 @@ import type { StorageGroupKey, StorageSortKey } from './useStorageModel';
import type { StorageGroupByFilter, StorageStatusFilter } from './StorageFilter';
import { useStoragePageControlsModel } from './useStoragePageControlsModel';
import type { StorageSourceOption } from '@/utils/storageSources';
+import type { PhysicalDiskFilterOption } from '@/features/storageBackups/diskPresentation';
type StoragePageControlsProps = {
kioskMode: () => boolean;
@@ -24,6 +25,12 @@ type StoragePageControlsProps = {
sourceFilter: () => string;
setSourceFilter: (value: string) => void;
sourceOptions: () => StorageSourceOption[];
+ diskRoleFilter?: () => string;
+ setDiskRoleFilter?: (value: string) => void;
+ diskRoleOptions?: () => PhysicalDiskFilterOption[];
+ diskGroupFilter?: () => string;
+ setDiskGroupFilter?: (value: string) => void;
+ diskGroupOptions?: () => PhysicalDiskFilterOption[];
nodeFilterOptions: Array<{ value: string; label: string }>;
selectedNodeId: () => string;
setSelectedNodeId: (value: string) => void;
@@ -61,6 +68,12 @@ export const StoragePageControls: Component<StoragePageControlsProps> = (props)
sourceFilter={props.sourceFilter}
setSourceFilter={props.setSourceFilter}
sourceOptions={props.sourceOptions}
+ diskRoleFilter={props.diskRoleFilter}
+ setDiskRoleFilter={props.setDiskRoleFilter}
+ diskRoleOptions={props.diskRoleOptions}
+ diskGroupFilter={props.diskGroupFilter}
+ setDiskGroupFilter={props.setDiskGroupFilter}
+ diskGroupOptions={props.diskGroupOptions}
nodeFilterOptions={props.nodeFilterOptions}
selectedNodeId={props.selectedNodeId}
setSelectedNodeId={props.setSelectedNodeId}
diff --git a/frontend-modern/src/components/Storage/StoragePageSummary.tsx b/frontend-modern/src/components/Storage/StoragePageSummary.tsx
index 7aad50a558..4f5ae4d8c7 100644
--- a/frontend-modern/src/components/Storage/StoragePageSummary.tsx
+++ b/frontend-modern/src/components/Storage/StoragePageSummary.tsx
@@ -14,6 +14,8 @@ type StoragePageSummaryProps = {
search: () => string;
sourceFilter: () => string;
healthFilter: () => StorageHealthFilter;
+ diskRoleFilter: () => string;
+ diskGroupFilter: () => string;
selectedNodeId: () => string;
nodeOptions: () => StoragePageNodeOption[];
physicalDisks: () => Resource[];
@@ -40,6 +42,8 @@ export const StoragePageSummary: Component<StoragePageSummaryProps> = (props) =>
search: props.search,
sourceFilter: props.sourceFilter,
healthFilter: props.healthFilter,
+ diskRoleFilter: props.diskRoleFilter,
+ diskGroupFilter: props.diskGroupFilter,
selectedNodeId: props.selectedNodeId,
nodeOptions: props.nodeOptions,
physicalDisks: props.physicalDisks,
diff --git a/frontend-modern/src/components/Storage/__tests__/storagePageState.test.ts b/frontend-modern/src/components/Storage/__tests__/storagePageState.test.ts
index 3a3ea250a7..5ffb7b4831 100644
--- a/frontend-modern/src/components/Storage/__tests__/storagePageState.test.ts
+++ b/frontend-modern/src/components/Storage/__tests__/storagePageState.test.ts
@@ -11,6 +11,8 @@ import {
coerceSelectedStorageNodeId,
countActiveStorageFilters,
countVisiblePhysicalDisksForNode,
+ DEFAULT_STORAGE_DISK_GROUP_FILTER,
+ DEFAULT_STORAGE_DISK_ROLE_FILTER,
DEFAULT_STORAGE_GROUP_KEY,
DEFAULT_STORAGE_SORT_OPTIONS,
DEFAULT_STORAGE_SORT_DIRECTION,
@@ -119,6 +121,8 @@ describe('storagePageState', () => {
expect(getStorageNodeFilterLabel('disks')).toBe('All Disk Hosts');
expect(DEFAULT_STORAGE_VIEW).toBe('pools');
expect(DEFAULT_STORAGE_SOURCE_FILTER).toBe('all');
+ expect(DEFAULT_STORAGE_DISK_ROLE_FILTER).toBe('all');
+ expect(DEFAULT_STORAGE_DISK_GROUP_FILTER).toBe('all');
expect(DEFAULT_STORAGE_SORT_KEY).toBe('priority');
expect(DEFAULT_STORAGE_SORT_DIRECTION).toBe('desc');
expect(DEFAULT_STORAGE_GROUP_KEY).toBe('none');
@@ -189,6 +193,8 @@ describe('storagePageState', () => {
groupBy: 'none',
statusFilter: 'all',
sourceFilter: 'all',
+ diskRoleFilter: 'all',
+ diskGroupFilter: 'all',
}),
).toBe(1);
@@ -200,6 +206,8 @@ describe('storagePageState', () => {
groupBy: 'none',
statusFilter: 'all',
sourceFilter: 'all',
+ diskRoleFilter: 'all',
+ diskGroupFilter: 'all',
}),
).toBe(false);
@@ -211,9 +219,24 @@ describe('storagePageState', () => {
groupBy: 'none',
statusFilter: 'all',
sourceFilter: 'all',
+ diskRoleFilter: 'all',
+ diskGroupFilter: 'all',
}),
).toBe(true);
+ expect(
+ countActiveStorageFilters({
+ search: '',
+ sortKey: 'priority',
+ sortDirection: 'desc',
+ groupBy: 'none',
+ statusFilter: 'all',
+ sourceFilter: 'all',
+ diskRoleFilter: 'nvme-disk',
+ diskGroupFilter: 'all',
+ }),
+ ).toBe(1);
+
expect(readStorageRouteValue(undefined, 'all')).toBe('all');
expect(readStorageRouteValue(' ', 'all')).toBe('all');
expect(readStorageRouteValue(' warning ', 'all')).toBe('warning');
@@ -226,6 +249,8 @@ describe('storagePageState', () => {
const [view, setView] = createSignal<'pools' | 'disks'>('pools');
const [sourceFilter, setSourceFilter] = createSignal('all');
const [healthFilter, setHealthFilter] = createSignal<StorageHealthFilter>('all');
+ const [diskRoleFilter, setDiskRoleFilter] = createSignal('all');
+ const [diskGroupFilter, setDiskGroupFilter] = createSignal('all');
const [selectedNodeId, setSelectedNodeId] = createSignal('all');
const [groupBy, setGroupBy] = createSignal<StorageGroupKey>('none');
const [sortKey, setSortKey] = createSignal<StorageSortKey>('priority');
@@ -239,6 +264,10 @@ describe('storagePageState', () => {
setSourceFilter,
healthFilter,
setHealthFilter,
+ diskRoleFilter,
+ setDiskRoleFilter,
+ diskGroupFilter,
+ setDiskGroupFilter,
selectedNodeId,
setSelectedNodeId,
groupBy,
@@ -264,6 +293,12 @@ describe('storagePageState', () => {
expect(fields.status?.write?.('attention')).toBe('attention');
expect(fields.status?.write?.('warning')).toBe('warning');
expect(fields.status?.write?.('all')).toBeNull();
+ expect(fields.diskRole?.read({ diskRole: ' NVME Disk ' } as any)).toBe('nvme-disk');
+ expect(fields.diskRole?.write?.('nvme-disk')).toBe('nvme-disk');
+ expect(fields.diskRole?.write?.('all')).toBeNull();
+ expect(fields.diskGroup?.read({ diskGroup: ' Data Pool ' } as any)).toBe('data-pool');
+ expect(fields.diskGroup?.write?.('data-pool')).toBe('data-pool');
+ expect(fields.diskGroup?.write?.('all')).toBeNull();
expect(fields.node?.read({ node: ' node-1 ' } as any)).toBe('node-1');
expect(fields.node?.read({ node: ' ALL ' } as any)).toBe('all');
expect(fields.node?.write?.('all')).toBeNull();
diff --git a/frontend-modern/src/components/Storage/__tests__/useDiskListModel.test.ts b/frontend-modern/src/components/Storage/__tests__/useDiskListModel.test.ts
index c2fe8ccf68..d73d23949f 100644
--- a/frontend-modern/src/components/Storage/__tests__/useDiskListModel.test.ts
+++ b/frontend-modern/src/components/Storage/__tests__/useDiskListModel.test.ts
@@ -18,7 +18,13 @@ const buildNode = (id: string, name: string): Resource =>
platformData: { proxmox: { instance: 'cluster-main' } },
}) as Resource;
-const buildDisk = (id: string, nodeName: string, model = `Disk ${id}`): Resource =>
+const buildDisk = (
+ id: string,
+ nodeName: string,
+ model = `Disk ${id}`,
+ storageRole = '',
+ storageGroup = '',
+): Resource =>
({
id,
type: 'physical_disk',
@@ -41,6 +47,8 @@ const buildDisk = (id: string, nodeName: string, model = `Disk ${id}`): Resource
sizeBytes: 2_000_000_000_000,
health: 'PASSED',
temperature: 41,
+ storageRole,
+ storageGroup,
},
}) as Resource;
@@ -48,13 +56,15 @@ describe('useDiskListModel', () => {
it('builds filtered disk state canonically', () => {
const [disks] = createSignal<Resource[]>([
buildDisk('sda', 'tower', 'Archive HDD'),
- buildDisk('sdb', 'tower', 'Cache SSD'),
+ buildDisk('sdb', 'tower', 'Cache SSD', 'cache', 'tank'),
]);
const [nodes] = createSignal<Resource[]>([buildNode('node-tower', 'tower')]);
const [selectedNode] = createSignal<string | null>('node-tower');
const [searchTerm] = createSignal('cache');
const [sourceFilter] = createSignal('proxmox-pve');
const [healthFilter] = createSignal('healthy' as const);
+ const [roleFilter] = createSignal('cache');
+ const [groupFilter] = createSignal('tank');
const [selectedDiskId, setSelectedDiskId] = createSignal<string | null>(null);
const { result } = renderHook(() =>
@@ -64,6 +74,8 @@ describe('useDiskListModel', () => {
selectedNode,
sourceFilter,
healthFilter,
+ roleFilter,
+ groupFilter,
searchTerm,
selectedDiskId,
setSelectedDiskId,
@@ -73,6 +85,8 @@ describe('useDiskListModel', () => {
expect(result.hasPVENodes()).toBe(true);
expect(result.selectedNodeName()).toBe('tower');
expect(result.filteredDisks().map((disk) => disk.id)).toEqual(['sdb']);
+ expect(result.roleFilterOptions().map((option) => option.value)).toContain('cache');
+ expect(result.groupFilterOptions().map((option) => option.value)).toContain('tank');
result.toggleSelectedDisk(result.filteredDisks()[0]!);
expect(result.selectedDisk()?.id).toBe('sdb');
diff --git a/frontend-modern/src/components/Storage/__tests__/useStorageFilterState.test.ts b/frontend-modern/src/components/Storage/__tests__/useStorageFilterState.test.ts
index 5988189f3a..8725aa4a03 100644
--- a/frontend-modern/src/components/Storage/__tests__/useStorageFilterState.test.ts
+++ b/frontend-modern/src/components/Storage/__tests__/useStorageFilterState.test.ts
@@ -14,6 +14,8 @@ describe('useStorageFilterState', () => {
const [sourceOptions] = createSignal(['all', 'truenas', 'proxmox-pve', 'agent']);
const [sourceFilter, setSourceFilter] = createSignal('all');
const [healthFilter, setHealthFilter] = createSignal<StorageHealthFilter>('all');
+ const [diskRoleFilter, setDiskRoleFilter] = createSignal('all');
+ const [diskGroupFilter, setDiskGroupFilter] = createSignal('all');
const [groupBy] = createSignal<StorageGroupKey>('node');
const { result } = renderHook(() =>
@@ -28,6 +30,10 @@ describe('useStorageFilterState', () => {
setSourceFilter,
healthFilter,
setHealthFilter,
+ diskRoleFilter,
+ setDiskRoleFilter,
+ diskGroupFilter,
+ setDiskGroupFilter,
groupBy,
}),
);
@@ -44,9 +50,11 @@ describe('useStorageFilterState', () => {
]);
expect(result.storageFilterGroupBy()).toBe('node');
expect(result.storageFilterStatus()).toBe('all');
+ expect(result.diskRoleFilterOptions()).toEqual([{ value: 'all', label: 'All Roles' }]);
+ expect(result.diskGroupFilterOptions()).toEqual([{ value: 'all', label: 'All Groups' }]);
});
- it('coerces stale selected nodes and maps status setters', () => {
+ it('coerces stale selected nodes and disk facets, and maps status setters', () => {
const [view] = createSignal<'pools' | 'disks'>('disks');
const [nodeOptions] = createSignal<StorageNodeOption[]>([{ id: 'all', label: 'All Nodes' }]);
const [diskNodeOptions] = createSignal<StorageNodeOption[]>([
@@ -56,6 +64,8 @@ describe('useStorageFilterState', () => {
const [sourceOptions] = createSignal(['all']);
const [sourceFilter, setSourceFilter] = createSignal('missing-source');
const [healthFilter, setHealthFilter] = createSignal<StorageHealthFilter>('all');
+ const [diskRoleFilter, setDiskRoleFilter] = createSignal('missing-role');
+ const [diskGroupFilter, setDiskGroupFilter] = createSignal('missing-group');
const [groupBy] = createSignal<StorageGroupKey>('none');
const { result } = renderHook(() =>
@@ -66,16 +76,30 @@ describe('useStorageFilterState', () => {
selectedNodeId,
setSelectedNodeId,
sourceOptions,
+ diskRoleOptions: () => [
+ { value: 'all', label: 'All Roles' },
+ { value: 'nvme-disk', label: 'NVME Disk' },
+ ],
+ diskGroupOptions: () => [
+ { value: 'all', label: 'All Groups' },
+ { value: 'data', label: 'data' },
+ ],
sourceFilter,
setSourceFilter,
healthFilter,
setHealthFilter,
+ diskRoleFilter,
+ setDiskRoleFilter,
+ diskGroupFilter,
+ setDiskGroupFilter,
groupBy,
}),
);
expect(selectedNodeId()).toBe('all');
expect(sourceFilter()).toBe('all');
+ expect(diskRoleFilter()).toBe('all');
+ expect(diskGroupFilter()).toBe('all');
result.setStorageFilterStatus('critical');
expect(healthFilter()).toBe('critical');
});
diff --git a/frontend-modern/src/components/Storage/__tests__/useStorageFilterToolbarModel.test.ts b/frontend-modern/src/components/Storage/__tests__/useStorageFilterToolbarModel.test.ts
index 1f1539c042..1e53109ed0 100644
--- a/frontend-modern/src/components/Storage/__tests__/useStorageFilterToolbarModel.test.ts
+++ b/frontend-modern/src/components/Storage/__tests__/useStorageFilterToolbarModel.test.ts
@@ -12,6 +12,8 @@ describe('useStorageFilterToolbarModel', () => {
const [sortDirection, setSortDirection] = createSignal<'asc' | 'desc'>('asc');
const [statusFilter, setStatusFilter] = createSignal<'all' | 'warning'>('warning');
const [sourceFilter, setSourceFilter] = createSignal('agent');
+ const [diskRoleFilter, setDiskRoleFilter] = createSignal('nvme-disk');
+ const [diskGroupFilter, setDiskGroupFilter] = createSignal('data');
const [selectedNodeId, setSelectedNodeId] = createSignal('node-1');
const { result } = renderHook(() =>
@@ -28,6 +30,10 @@ describe('useStorageFilterToolbarModel', () => {
setStatusFilter,
sourceFilter,
setSourceFilter,
+ diskRoleFilter,
+ setDiskRoleFilter,
+ diskGroupFilter,
+ setDiskGroupFilter,
selectedNodeId,
setSelectedNodeId,
sortOptions: [{ value: 'usage', label: 'Usage' }],
@@ -51,6 +57,8 @@ describe('useStorageFilterToolbarModel', () => {
expect(sortDirection()).toBe('desc');
expect(statusFilter()).toBe('all');
expect(sourceFilter()).toBe('all');
+ expect(diskRoleFilter()).toBe('all');
+ expect(diskGroupFilter()).toBe('all');
expect(selectedNodeId()).toBe('all');
});
diff --git a/frontend-modern/src/components/Storage/__tests__/useStoragePageSummary.test.ts b/frontend-modern/src/components/Storage/__tests__/useStoragePageSummary.test.ts
index 4b80316420..13fad1be3b 100644
--- a/frontend-modern/src/components/Storage/__tests__/useStoragePageSummary.test.ts
+++ b/frontend-modern/src/components/Storage/__tests__/useStoragePageSummary.test.ts
@@ -34,6 +34,8 @@ describe('useStoragePageSummary', () => {
const [search] = createSignal('');
const [sourceFilter] = createSignal('all');
const [healthFilter] = createSignal('all' as const);
+ const [diskRoleFilter] = createSignal('all');
+ const [diskGroupFilter] = createSignal('all');
const [nodeOptions] = createSignal([
{ id: 'node-1', label: 'pve1', aliases: ['pve1.local'] },
{ id: 'node-2', label: 'pve2' },
@@ -74,6 +76,8 @@ describe('useStoragePageSummary', () => {
search,
sourceFilter,
healthFilter,
+ diskRoleFilter,
+ diskGroupFilter,
selectedNodeId,
nodeOptions,
physicalDisks,
diff --git a/frontend-modern/src/components/Storage/storagePageState.ts b/frontend-modern/src/components/Storage/storagePageState.ts
index 9f329c2a46..105cb5416b 100644
--- a/frontend-modern/src/components/Storage/storagePageState.ts
+++ b/frontend-modern/src/components/Storage/storagePageState.ts
@@ -1,5 +1,9 @@
import type { Accessor } from 'solid-js';
import type { StorageHealthFilter, StorageRecord } from '@/features/storageBackups/models';
+import {
+ DEFAULT_PHYSICAL_DISK_FACET_FILTER,
+ normalizePhysicalDiskFacetFilter,
+} from '@/features/storageBackups/diskPresentation';
import { isCephStorageRecord } from '@/features/storageBackups/cephRecordPresentation';
import type { Resource } from '@/types/resource';
import { getProxmoxData } from '@/utils/resourcePlatformData';
@@ -31,11 +35,15 @@ export interface StorageFilterActivityState {
groupBy?: StorageGroupKey;
statusFilter?: StorageStatusFilterValue;
sourceFilter?: string;
+ diskRoleFilter?: string;
+ diskGroupFilter?: string;
}
export const DEFAULT_STORAGE_VIEW: StorageView = 'pools';
export const DEFAULT_STORAGE_SELECTED_NODE_ID = 'all';
export const DEFAULT_STORAGE_SOURCE_FILTER = 'all';
+export const DEFAULT_STORAGE_DISK_ROLE_FILTER = DEFAULT_PHYSICAL_DISK_FACET_FILTER;
+export const DEFAULT_STORAGE_DISK_GROUP_FILTER = DEFAULT_PHYSICAL_DISK_FACET_FILTER;
export const DEFAULT_STORAGE_SORT_KEY: StorageSortKey = 'priority';
export const DEFAULT_STORAGE_SORT_DIRECTION: 'asc' | 'desc' = 'desc';
export const DEFAULT_STORAGE_GROUP_KEY: StorageGroupKey = 'none';
@@ -164,6 +172,15 @@ export const countActiveStorageFilters = (state: StorageFilterActivityState): nu
if ((state.groupBy || 'none') !== 'none') count++;
if ((state.statusFilter || 'all') !== 'all') count++;
if ((state.sourceFilter || 'all') !== 'all') count++;
+ if (
+ (state.diskRoleFilter || DEFAULT_STORAGE_DISK_ROLE_FILTER) !== DEFAULT_STORAGE_DISK_ROLE_FILTER
+ )
+ count++;
+ if (
+ (state.diskGroupFilter || DEFAULT_STORAGE_DISK_GROUP_FILTER) !==
+ DEFAULT_STORAGE_DISK_GROUP_FILTER
+ )
+ count++;
return count;
};
@@ -173,7 +190,10 @@ export const hasActiveStorageFilters = (state: StorageFilterActivityState): bool
state.sortDirection !== DEFAULT_STORAGE_SORT_DIRECTION ||
(state.groupBy || DEFAULT_STORAGE_GROUP_KEY) !== DEFAULT_STORAGE_GROUP_KEY ||
(state.statusFilter || DEFAULT_STORAGE_STATUS_FILTER) !== DEFAULT_STORAGE_STATUS_FILTER ||
- (state.sourceFilter || DEFAULT_STORAGE_SOURCE_FILTER) !== DEFAULT_STORAGE_SOURCE_FILTER;
+ (state.sourceFilter || DEFAULT_STORAGE_SOURCE_FILTER) !== DEFAULT_STORAGE_SOURCE_FILTER ||
+ (state.diskRoleFilter || DEFAULT_STORAGE_DISK_ROLE_FILTER) !== DEFAULT_STORAGE_DISK_ROLE_FILTER ||
+ (state.diskGroupFilter || DEFAULT_STORAGE_DISK_GROUP_FILTER) !==
+ DEFAULT_STORAGE_DISK_GROUP_FILTER;
export const getStorageNodeFilterLabel = (view: StorageView): string =>
view === 'disks' ? 'All Disk Hosts' : 'All Nodes';
@@ -193,6 +213,10 @@ type StorageRouteFieldBuilderOptions = {
setSourceFilter: (value: string) => void;
healthFilter: Accessor<StorageHealthFilter>;
setHealthFilter: (value: StorageHealthFilter) => void;
+ diskRoleFilter: Accessor<string>;
+ setDiskRoleFilter: (value: string) => void;
+ diskGroupFilter: Accessor<string>;
+ setDiskGroupFilter: (value: string) => void;
selectedNodeId: Accessor<string>;
setSelectedNodeId: (value: string) => void;
groupBy: Accessor<StorageGroupKey>;
@@ -234,6 +258,26 @@ export const buildStorageRouteFields = (
write: (value) =>
writeStorageRouteValue(getStorageStatusFilterValue(value), DEFAULT_STORAGE_STATUS_FILTER),
},
+ diskRole: {
+ get: options.diskRoleFilter,
+ set: options.setDiskRoleFilter,
+ read: (parsed) => normalizePhysicalDiskFacetFilter(parsed.diskRole),
+ write: (value) =>
+ writeStorageRouteValue(
+ normalizePhysicalDiskFacetFilter(value),
+ DEFAULT_STORAGE_DISK_ROLE_FILTER,
+ ),
+ },
+ diskGroup: {
+ get: options.diskGroupFilter,
+ set: options.setDiskGroupFilter,
+ read: (parsed) => normalizePhysicalDiskFacetFilter(parsed.diskGroup),
+ write: (value) =>
+ writeStorageRouteValue(
+ normalizePhysicalDiskFacetFilter(value),
+ DEFAULT_STORAGE_DISK_GROUP_FILTER,
+ ),
+ },
node: {
get: options.selectedNodeId,
set: options.setSelectedNodeId,
diff --git a/frontend-modern/src/components/Storage/useDiskListModel.ts b/frontend-modern/src/components/Storage/useDiskListModel.ts
index ecd4b89b53..a4aec530bf 100644
--- a/frontend-modern/src/components/Storage/useDiskListModel.ts
+++ b/frontend-modern/src/components/Storage/useDiskListModel.ts
@@ -3,6 +3,8 @@ import type { Resource } from '@/types/resource';
import type { StorageHealthFilter } from '@/features/storageBackups/models';
import {
buildPhysicalDiskPresentationDataMap,
+ buildPhysicalDiskGroupFilterOptions,
+ buildPhysicalDiskRoleFilterOptions,
extractPhysicalDiskPresentationData,
filterAndSortPhysicalDisks,
type PhysicalDiskPresentationData,
@@ -15,6 +17,8 @@ type UseDiskListModelOptions = {
selectedNode: () => string | null;
sourceFilter?: () => string;
healthFilter?: () => StorageHealthFilter;
+ roleFilter?: () => string;
+ groupFilter?: () => string;
searchTerm: () => string;
selectedDiskId: () => string | null;
setSelectedDiskId: (diskId: string | null) => void;
@@ -24,6 +28,8 @@ export const useDiskListModel = (options: UseDiskListModelOptions) => {
const hasPVENodes = createMemo(() => options.nodes().length > 0);
const diskDataById = createMemo(() => buildPhysicalDiskPresentationDataMap(options.disks()));
+ const roleFilterOptions = createMemo(() => buildPhysicalDiskRoleFilterOptions(options.disks()));
+ const groupFilterOptions = createMemo(() => buildPhysicalDiskGroupFilterOptions(options.disks()));
const getDiskData = (disk: Resource): PhysicalDiskPresentationData =>
diskDataById().get(disk.id) ?? extractPhysicalDiskPresentationData(disk);
@@ -37,6 +43,8 @@ export const useDiskListModel = (options: UseDiskListModelOptions) => {
selectedNode: selectedNodeResource(),
sourceFilter: options.sourceFilter?.() ?? 'all',
healthFilter: options.healthFilter?.() ?? 'all',
+ roleFilter: options.roleFilter?.() ?? 'all',
+ groupFilter: options.groupFilter?.() ?? 'all',
searchTerm: options.searchTerm(),
getDiskData,
matchesNode: matchesPhysicalDiskNode,
@@ -56,6 +64,8 @@ export const useDiskListModel = (options: UseDiskListModelOptions) => {
selectedDisk,
hasPVENodes,
getDiskData,
+ roleFilterOptions,
+ groupFilterOptions,
filteredDisks,
selectedNodeName,
toggleSelectedDisk,
diff --git a/frontend-modern/src/components/Storage/useStorageFilterState.ts b/frontend-modern/src/components/Storage/useStorageFilterState.ts
index a826c136fd..2727ae126f 100644
--- a/frontend-modern/src/components/Storage/useStorageFilterState.ts
+++ b/frontend-modern/src/components/Storage/useStorageFilterState.ts
@@ -2,9 +2,16 @@ import { createEffect, createMemo, type Accessor } from 'solid-js';
import { buildStorageSourceOptionsFromKeys } from '@/utils/storageSources';
import type { StorageHealthFilter } from '@/features/storageBackups/models';
import { normalizeStorageSourceKey } from '@/utils/storageSources';
+import {
+ DEFAULT_PHYSICAL_DISK_FACET_FILTER,
+ normalizePhysicalDiskFacetFilter,
+ type PhysicalDiskFilterOption,
+} from '@/features/storageBackups/diskPresentation';
import {
buildStorageNodeFilterOptions,
coerceSelectedStorageNodeId,
+ DEFAULT_STORAGE_DISK_GROUP_FILTER,
+ DEFAULT_STORAGE_DISK_ROLE_FILTER,
getActiveStorageNodeOptions,
getStorageFilterGroupBy,
getStorageStatusFilterValue,
@@ -22,10 +29,16 @@ type UseStorageFilterStateOptions = {
setSelectedNodeId: (value: string) => void;
sourceOptions: Accessor<string[]>;
diskSourceOptions?: Accessor<string[]>;
+ diskRoleOptions?: Accessor<PhysicalDiskFilterOption[]>;
+ diskGroupOptions?: Accessor<PhysicalDiskFilterOption[]>;
sourceFilter: Accessor<string>;
setSourceFilter: (value: string) => void;
healthFilter: Accessor<StorageHealthFilter>;
setHealthFilter: (value: StorageHealthFilter) => void;
+ diskRoleFilter: Accessor<string>;
+ setDiskRoleFilter: (value: string) => void;
+ diskGroupFilter: Accessor<string>;
+ setDiskGroupFilter: (value: string) => void;
groupBy: Accessor<StorageGroupKey>;
};
@@ -44,6 +57,16 @@ export const useStorageFilterState = (options: UseStorageFilterStateOptions) =>
const sourceFilterOptions = createMemo(() =>
buildStorageSourceOptionsFromKeys(activeSourceKeys()),
);
+ const diskRoleFilterOptions = createMemo(() =>
+ options.view() === 'disks' && options.diskRoleOptions
+ ? options.diskRoleOptions()
+ : [{ value: DEFAULT_PHYSICAL_DISK_FACET_FILTER, label: 'All Roles' }],
+ );
+ const diskGroupFilterOptions = createMemo(() =>
+ options.view() === 'disks' && options.diskGroupOptions
+ ? options.diskGroupOptions()
+ : [{ value: DEFAULT_PHYSICAL_DISK_FACET_FILTER, label: 'All Groups' }],
+ );
const storageFilterGroupBy = (): StorageGroupByFilter => {
return getStorageFilterGroupBy(options.groupBy());
@@ -77,10 +100,43 @@ export const useStorageFilterState = (options: UseStorageFilterStateOptions) =>
}
});
+ createEffect(() => {
+ if (options.view() !== 'disks') {
+ if (options.diskRoleFilter() !== DEFAULT_STORAGE_DISK_ROLE_FILTER) {
+ options.setDiskRoleFilter(DEFAULT_STORAGE_DISK_ROLE_FILTER);
+ }
+ if (options.diskGroupFilter() !== DEFAULT_STORAGE_DISK_GROUP_FILTER) {
+ options.setDiskGroupFilter(DEFAULT_STORAGE_DISK_GROUP_FILTER);
+ }
+ return;
+ }
+
+ const availableRoles = new Set(
+ diskRoleFilterOptions().map((option) => normalizePhysicalDiskFacetFilter(option.value)),
+ );
+ const selectedRole = normalizePhysicalDiskFacetFilter(options.diskRoleFilter());
+ if (selectedRole !== DEFAULT_STORAGE_DISK_ROLE_FILTER && !availableRoles.has(selectedRole)) {
+ options.setDiskRoleFilter(DEFAULT_STORAGE_DISK_ROLE_FILTER);
+ }
+
+ const availableGroups = new Set(
+ diskGroupFilterOptions().map((option) => normalizePhysicalDiskFacetFilter(option.value)),
+ );
+ const selectedGroup = normalizePhysicalDiskFacetFilter(options.diskGroupFilter());
+ if (
+ selectedGroup !== DEFAULT_STORAGE_DISK_GROUP_FILTER &&
+ !availableGroups.has(selectedGroup)
+ ) {
+ options.setDiskGroupFilter(DEFAULT_STORAGE_DISK_GROUP_FILTER);
+ }
+ });
+
return {
activeNodeOptions,
nodeFilterOptions,
sourceFilterOptions,
+ diskRoleFilterOptions,
+ diskGroupFilterOptions,
storageFilterGroupBy,
storageFilterStatus,
setStorageFilterStatus,
diff --git a/frontend-modern/src/components/Storage/useStorageFilterToolbarModel.ts b/frontend-modern/src/components/Storage/useStorageFilterToolbarModel.ts
index 345079afe3..c69d870ad3 100644
--- a/frontend-modern/src/components/Storage/useStorageFilterToolbarModel.ts
+++ b/frontend-modern/src/components/Storage/useStorageFilterToolbarModel.ts
@@ -8,6 +8,8 @@ import {
import {
countActiveStorageFilters,
DEFAULT_STORAGE_GROUP_KEY,
+ DEFAULT_STORAGE_DISK_GROUP_FILTER,
+ DEFAULT_STORAGE_DISK_ROLE_FILTER,
DEFAULT_STORAGE_SORT_DIRECTION,
DEFAULT_STORAGE_SORT_KEY,
DEFAULT_STORAGE_SOURCE_FILTER,
@@ -31,6 +33,10 @@ type UseStorageFilterToolbarModelOptions = {
setStatusFilter?: (value: StorageStatusFilter) => void;
sourceFilter?: Accessor<string | undefined>;
setSourceFilter?: (value: string) => void;
+ diskRoleFilter?: Accessor<string | undefined>;
+ setDiskRoleFilter?: (value: string) => void;
+ diskGroupFilter?: Accessor<string | undefined>;
+ setDiskGroupFilter?: (value: string) => void;
selectedNodeId?: Accessor<string | undefined>;
setSelectedNodeId?: (value: string) => void;
sortOptions?: StorageOption[];
@@ -52,6 +58,8 @@ export const useStorageFilterToolbarModel = (options: UseStorageFilterToolbarMod
groupBy: options.groupBy?.(),
statusFilter: options.statusFilter?.(),
sourceFilter: options.sourceFilter?.(),
+ diskRoleFilter: options.diskRoleFilter?.(),
+ diskGroupFilter: options.diskGroupFilter?.(),
}) + (nodeActive ? 1 : 0)
);
});
@@ -65,6 +73,8 @@ export const useStorageFilterToolbarModel = (options: UseStorageFilterToolbarMod
groupBy: options.groupBy?.(),
statusFilter: options.statusFilter?.(),
sourceFilter: options.sourceFilter?.(),
+ diskRoleFilter: options.diskRoleFilter?.(),
+ diskGroupFilter: options.diskGroupFilter?.(),
}) ||
(options.selectedNodeId?.() || DEFAULT_STORAGE_SELECTED_NODE_ID) !==
DEFAULT_STORAGE_SELECTED_NODE_ID,
@@ -92,6 +102,8 @@ export const useStorageFilterToolbarModel = (options: UseStorageFilterToolbarMod
if (options.setGroupBy) options.setGroupBy(DEFAULT_STORAGE_GROUP_KEY);
if (options.setStatusFilter) options.setStatusFilter(DEFAULT_STORAGE_STATUS_FILTER);
if (options.setSourceFilter) options.setSourceFilter(DEFAULT_STORAGE_SOURCE_FILTER);
+ if (options.setDiskRoleFilter) options.setDiskRoleFilter(DEFAULT_STORAGE_DISK_ROLE_FILTER);
+ if (options.setDiskGroupFilter) options.setDiskGroupFilter(DEFAULT_STORAGE_DISK_GROUP_FILTER);
if (options.setSelectedNodeId) options.setSelectedNodeId(DEFAULT_STORAGE_SELECTED_NODE_ID);
};
diff --git a/frontend-modern/src/components/Storage/useStoragePageData.ts b/frontend-modern/src/components/Storage/useStoragePageData.ts
index fb69f86ac2..ff9d51113e 100644
--- a/frontend-modern/src/components/Storage/useStoragePageData.ts
+++ b/frontend-modern/src/components/Storage/useStoragePageData.ts
@@ -1,7 +1,11 @@
import { Accessor, createMemo } from 'solid-js';
import { buildStorageRecords } from '@/features/storageBackups/storageAdapters';
import type { StorageHealthFilter } from '@/features/storageBackups/models';
-import { getPhysicalDiskSourceKey } from '@/features/storageBackups/diskPresentation';
+import {
+ buildPhysicalDiskGroupFilterOptions,
+ buildPhysicalDiskRoleFilterOptions,
+ getPhysicalDiskSourceKey,
+} from '@/features/storageBackups/diskPresentation';
import type { State } from '@/types/api';
import type { Resource } from '@/types/resource';
import { useStorageAlertState } from './useStorageAlertState';
@@ -67,6 +71,12 @@ export const useStoragePageData = (options: UseStoragePageDataOptions) => {
.filter((key) => key !== 'all')
.sort(),
]);
+ const diskRoleOptions = createMemo(() =>
+ buildPhysicalDiskRoleFilterOptions(options.physicalDisks()),
+ );
+ const diskGroupOptions = createMemo(() =>
+ buildPhysicalDiskGroupFilterOptions(options.physicalDisks()),
+ );
const { cephSummaryStats } = useStorageCephModel({
records,
@@ -81,6 +91,8 @@ export const useStoragePageData = (options: UseStoragePageDataOptions) => {
nodeOnlineByLabel,
sourceOptions,
diskSourceOptions,
+ diskRoleOptions,
+ diskGroupOptions,
filteredRecords,
groupedRecords,
cephSummaryStats,
diff --git a/frontend-modern/src/components/Storage/useStoragePageFilters.ts b/frontend-modern/src/components/Storage/useStoragePageFilters.ts
index 0c1e45d828..63237638bf 100644
--- a/frontend-modern/src/components/Storage/useStoragePageFilters.ts
+++ b/frontend-modern/src/components/Storage/useStoragePageFilters.ts
@@ -5,6 +5,8 @@ import { useStorageRouteState } from './useStorageRouteState';
import {
buildStorageRouteFields,
DEFAULT_STORAGE_GROUP_KEY,
+ DEFAULT_STORAGE_DISK_GROUP_FILTER,
+ DEFAULT_STORAGE_DISK_ROLE_FILTER,
DEFAULT_STORAGE_SORT_DIRECTION,
DEFAULT_STORAGE_SORT_KEY,
DEFAULT_STORAGE_SOURCE_FILTER,
@@ -26,6 +28,8 @@ export const useStoragePageFilters = (options: UseStoragePageFiltersOptions) =>
const [search, setSearch] = createSignal('');
const [sourceFilter, setSourceFilter] = createSignal(DEFAULT_STORAGE_SOURCE_FILTER);
const [healthFilter, setHealthFilter] = createSignal<StorageHealthFilter>('all');
+ const [diskRoleFilter, setDiskRoleFilter] = createSignal(DEFAULT_STORAGE_DISK_ROLE_FILTER);
+ const [diskGroupFilter, setDiskGroupFilter] = createSignal(DEFAULT_STORAGE_DISK_GROUP_FILTER);
const [view, setView] = createSignal<StorageView>(DEFAULT_STORAGE_VIEW);
const [selectedNodeId, setSelectedNodeId] = createSignal(DEFAULT_STORAGE_SELECTED_NODE_ID);
const [sortKey, setSortKey] = createSignal<StorageSortKey>(DEFAULT_STORAGE_SORT_KEY);
@@ -50,6 +54,10 @@ export const useStoragePageFilters = (options: UseStoragePageFiltersOptions) =>
setSourceFilter,
healthFilter,
setHealthFilter,
+ diskRoleFilter,
+ setDiskRoleFilter,
+ diskGroupFilter,
+ setDiskGroupFilter,
selectedNodeId,
setSelectedNodeId,
groupBy,
@@ -70,6 +78,10 @@ export const useStoragePageFilters = (options: UseStoragePageFiltersOptions) =>
setSourceFilter,
healthFilter,
setHealthFilter,
+ diskRoleFilter,
+ setDiskRoleFilter,
+ diskGroupFilter,
+ setDiskGroupFilter,
view,
setView,
selectedNodeId,
diff --git a/frontend-modern/src/components/Storage/useStoragePageModel.ts b/frontend-modern/src/components/Storage/useStoragePageModel.ts
index 5edce96301..6d67ca6a13 100644
--- a/frontend-modern/src/components/Storage/useStoragePageModel.ts
+++ b/frontend-modern/src/components/Storage/useStoragePageModel.ts
@@ -29,6 +29,8 @@ import { useStorageSummaryCharts } from './useStorageSummaryCharts';
import {
DEFAULT_STORAGE_SELECTED_NODE_ID,
DEFAULT_STORAGE_SOURCE_FILTER,
+ DEFAULT_STORAGE_DISK_GROUP_FILTER,
+ DEFAULT_STORAGE_DISK_ROLE_FILTER,
isStorageRecordCeph,
} from './storagePageState';
import { buildStorageSummaryGroupScopeMap } from './storageSummaryGroups';
@@ -66,6 +68,10 @@ export const useStoragePageModel = () => {
sourceFilter,
setSourceFilter,
healthFilter,
+ diskRoleFilter,
+ setDiskRoleFilter,
+ diskGroupFilter,
+ setDiskGroupFilter,
setHealthFilter,
view,
setView,
@@ -90,6 +96,8 @@ export const useStoragePageModel = () => {
nodeOnlineByLabel,
sourceOptions,
diskSourceOptions,
+ diskRoleOptions,
+ diskGroupOptions,
filteredRecords,
groupedRecords,
cephSummaryStats,
@@ -247,6 +255,8 @@ export const useStoragePageModel = () => {
const clearStorageFilters = () => {
setSearch('');
setSourceFilter(DEFAULT_STORAGE_SOURCE_FILTER);
+ setDiskRoleFilter(DEFAULT_STORAGE_DISK_ROLE_FILTER);
+ setDiskGroupFilter(DEFAULT_STORAGE_DISK_GROUP_FILTER);
setStorageFilterStatus('all');
setSelectedNodeId(DEFAULT_STORAGE_SELECTED_NODE_ID);
};
@@ -345,6 +355,8 @@ export const useStoragePageModel = () => {
const {
nodeFilterOptions,
sourceFilterOptions,
+ diskRoleFilterOptions,
+ diskGroupFilterOptions,
storageFilterGroupBy,
storageFilterStatus,
setStorageFilterStatus,
@@ -356,10 +368,16 @@ export const useStoragePageModel = () => {
setSelectedNodeId,
sourceOptions,
diskSourceOptions,
+ diskRoleOptions,
+ diskGroupOptions,
sourceFilter,
setSourceFilter,
healthFilter,
setHealthFilter,
+ diskRoleFilter,
+ setDiskRoleFilter,
+ diskGroupFilter,
+ setDiskGroupFilter,
groupBy,
});
@@ -437,6 +455,12 @@ export const useStoragePageModel = () => {
sourceFilter,
setSourceFilter,
healthFilter,
+ diskRoleFilter,
+ setDiskRoleFilter,
+ diskRoleOptions: diskRoleFilterOptions,
+ diskGroupFilter,
+ setDiskGroupFilter,
+ diskGroupOptions: diskGroupFilterOptions,
sortKey,
setSortKey,
sortDirection,
diff --git a/frontend-modern/src/components/Storage/useStoragePageSummary.ts b/frontend-modern/src/components/Storage/useStoragePageSummary.ts
index ebb3411b5c..cfd8b82687 100644
--- a/frontend-modern/src/components/Storage/useStoragePageSummary.ts
+++ b/frontend-modern/src/components/Storage/useStoragePageSummary.ts
@@ -16,6 +16,8 @@ type UseStoragePageSummaryOptions = {
search: Accessor<string>;
sourceFilter: Accessor<string>;
healthFilter: Accessor<StorageHealthFilter>;
+ diskRoleFilter: Accessor<string>;
+ diskGroupFilter: Accessor<string>;
selectedNodeId: Accessor<string>;
nodeOptions: Accessor<StoragePageNodeOption[]>;
physicalDisks: Accessor<Resource[]>;
@@ -52,6 +54,8 @@ export const useStoragePageSummary = (options: UseStoragePageSummaryOptions) =>
return matchesPhysicalDiskFilterState(disk, getDiskData(disk), {
sourceFilter: options.sourceFilter(),
healthFilter: options.healthFilter(),
+ roleFilter: options.diskRoleFilter(),
+ groupFilter: options.diskGroupFilter(),
searchTerm: options.search(),
});
});
diff --git a/frontend-modern/src/components/Storage/useStorageRouteState.ts b/frontend-modern/src/components/Storage/useStorageRouteState.ts
index 6a33f2e9f7..5e474736d2 100644
--- a/frontend-modern/src/components/Storage/useStorageRouteState.ts
+++ b/frontend-modern/src/components/Storage/useStorageRouteState.ts
@@ -8,6 +8,8 @@ export type StorageManagedQueryKey =
| 'group'
| 'source'
| 'status'
+ | 'diskRole'
+ | 'diskGroup'
| 'node'
| 'query'
| 'sort'
@@ -46,6 +48,8 @@ const MANAGED_QUERY_KEYS: StorageManagedQueryKey[] = [
'group',
'source',
'status',
+ 'diskRole',
+ 'diskGroup',
'node',
'query',
'sort',
diff --git a/frontend-modern/src/features/storageBackups/__tests__/diskPresentation.test.ts b/frontend-modern/src/features/storageBackups/__tests__/diskPresentation.test.ts
index 7c650a5b44..65da42bbe0 100644
--- a/frontend-modern/src/features/storageBackups/__tests__/diskPresentation.test.ts
+++ b/frontend-modern/src/features/storageBackups/__tests__/diskPresentation.test.ts
@@ -2,6 +2,8 @@ import { describe, expect, it } from 'vitest';
import type { Resource } from '@/types/resource';
import {
buildPhysicalDiskPresentationDataMap,
+ buildPhysicalDiskGroupFilterOptions,
+ buildPhysicalDiskRoleFilterOptions,
comparePhysicalDiskPresentation,
extractPhysicalDiskPresentationData,
filterAndSortPhysicalDisks,
@@ -20,10 +22,12 @@ import {
getPhysicalDiskParentLabel,
getPhysicalDiskPlatformLabel,
getPhysicalDiskRoleLabel,
+ getPhysicalDiskRoleFilterValue,
getPhysicalDiskSourceKey,
getPhysicalDiskSourceBadgePresentation,
hasPhysicalDiskSmartWarning,
matchesPhysicalDiskSearch,
+ normalizePhysicalDiskFacetFilter,
type PhysicalDiskPresentationData,
} from '@/features/storageBackups/diskPresentation';
@@ -162,6 +166,7 @@ describe('diskPresentation', () => {
tone: 'text-amber-700 dark:text-amber-300',
}),
).toBe('Pending sectors detected.');
+ expect(getPhysicalDiskHealthStatus(makeDiskData({ health: 'UNKNOWN' })).label).toBe('Unknown');
expect(
getPhysicalDiskEmptyStatePresentation({
@@ -173,9 +178,27 @@ describe('diskPresentation', () => {
).toMatchObject({
title: 'No physical disks found',
nodeMessage: 'for node tower',
+ filterMessages: [],
showRequirements: true,
requirementsTitle: 'Physical disk monitoring requirements:',
});
+
+ expect(
+ getPhysicalDiskEmptyStatePresentation({
+ selectedNodeName: null,
+ searchTerm: '',
+ diskCount: 4,
+ hasPVENodes: true,
+ healthFilter: 'attention',
+ sourceFilterLabel: 'PVE',
+ roleFilterLabel: 'Cache Pool',
+ groupFilterLabel: 'tank',
+ }),
+ ).toMatchObject({
+ title: 'No disks need attention',
+ filterMessages: ['from PVE', 'with role Cache Pool', 'in tank'],
+ showRequirements: false,
+ });
});
it('extracts search and sort presentation canonically from resources', () => {
@@ -226,6 +249,16 @@ describe('diskPresentation', () => {
expect(matchesPhysicalDiskSearch(warningDisk, warningData, 'node:tower')).toBe(true);
expect(matchesPhysicalDiskSearch(warningDisk, warningData, 'node:pve1')).toBe(false);
expect(getPhysicalDiskSourceKey(warningDisk)).toBe('proxmox-pve');
+ expect(getPhysicalDiskRoleFilterValue(warningData)).toBe('cache-pool');
+ expect(normalizePhysicalDiskFacetFilter(' Cache Pool ')).toBe('cache-pool');
+ expect(buildPhysicalDiskRoleFilterOptions([warningDisk, healthyDisk])).toContainEqual({
+ value: 'cache-pool',
+ label: 'Cache Pool',
+ });
+ expect(buildPhysicalDiskGroupFilterOptions([warningDisk, healthyDisk])).toContainEqual({
+ value: 'tank',
+ label: 'tank',
+ });
expect(getPhysicalDiskNormalizedHealth(warningDisk, warningData)).toBe('warning');
expect(
comparePhysicalDiskPresentation(warningDisk, warningData, healthyDisk, healthyData),
@@ -237,6 +270,8 @@ describe('diskPresentation', () => {
searchTerm: 'cache',
sourceFilter: 'proxmox-pve',
healthFilter: 'attention',
+ roleFilter: 'cache-pool',
+ groupFilter: 'tank',
getDiskData: (disk) => (disk.id === warningDisk.id ? warningData : healthyData),
matchesNode: () => true,
}).map((disk) => disk.id),
diff --git a/frontend-modern/src/features/storageBackups/diskPresentation.ts b/frontend-modern/src/features/storageBackups/diskPresentation.ts
index 28e7ca412d..f5a2bf119a 100644
--- a/frontend-modern/src/features/storageBackups/diskPresentation.ts
+++ b/frontend-modern/src/features/storageBackups/diskPresentation.ts
@@ -19,6 +19,7 @@ export interface PhysicalDiskEmptyStatePresentation {
title: string;
nodeMessage: string | null;
searchMessage: string | null;
+ filterMessages: string[];
showRequirements: boolean;
fallbackMessage: string;
requirementsTitle: string;
@@ -26,6 +27,11 @@ export interface PhysicalDiskEmptyStatePresentation {
requirementsNote: string;
}
+export interface PhysicalDiskFilterOption {
+ value: string;
+ label: string;
+}
+
export interface PhysicalDiskPresentationData {
node: string;
instance: string;
@@ -134,6 +140,22 @@ const titleize = (value: string | undefined | null): string =>
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
.join(' ');
+const slugifyPhysicalDiskFacetValue = (value: string): string =>
+ value
+ .trim()
+ .toLowerCase()
+ .replace(/[^a-z0-9]+/g, '-')
+ .replace(/^-+|-+$/g, '');
+
+export const DEFAULT_PHYSICAL_DISK_FACET_FILTER = 'all';
+
+export const normalizePhysicalDiskFacetFilter = (value: string | null | undefined): string => {
+ const normalized = slugifyPhysicalDiskFacetValue(value || '');
+ return normalized && normalized !== DEFAULT_PHYSICAL_DISK_FACET_FILTER
+ ? normalized
+ : DEFAULT_PHYSICAL_DISK_FACET_FILTER;
+};
+
export function getPhysicalDiskPlatformLabel(_resource: Resource, fallbackLabel: string): string {
return fallbackLabel || 'Unknown';
}
@@ -300,6 +322,8 @@ export function matchesPhysicalDiskFilterState(
options: {
sourceFilter?: string;
healthFilter?: StorageHealthFilter;
+ roleFilter?: string;
+ groupFilter?: string;
searchTerm?: string;
},
): boolean {
@@ -316,6 +340,22 @@ export function matchesPhysicalDiskFilterState(
return false;
}
+ const selectedRole = normalizePhysicalDiskFacetFilter(options.roleFilter);
+ if (
+ selectedRole !== DEFAULT_PHYSICAL_DISK_FACET_FILTER &&
+ getPhysicalDiskRoleFilterValue(disk) !== selectedRole
+ ) {
+ return false;
+ }
+
+ const selectedGroup = normalizePhysicalDiskFacetFilter(options.groupFilter);
+ if (
+ selectedGroup !== DEFAULT_PHYSICAL_DISK_FACET_FILTER &&
+ getPhysicalDiskGroupFilterValue(disk) !== selectedGroup
+ ) {
+ return false;
+ }
+
return matchesPhysicalDiskSearch(resource, disk, options.searchTerm || '');
}
@@ -325,6 +365,8 @@ export function filterAndSortPhysicalDisks(
selectedNode: Resource | null;
sourceFilter?: string;
healthFilter?: StorageHealthFilter;
+ roleFilter?: string;
+ groupFilter?: string;
searchTerm: string;
getDiskData: (disk: Resource) => PhysicalDiskPresentationData;
matchesNode: (disk: Resource, node: { id: string; name: string; instance?: string }) => boolean;
@@ -346,6 +388,8 @@ export function filterAndSortPhysicalDisks(
matchesPhysicalDiskFilterState(disk, options.getDiskData(disk), {
sourceFilter: options.sourceFilter,
healthFilter: options.healthFilter,
+ roleFilter: options.roleFilter,
+ groupFilter: options.groupFilter,
searchTerm: options.searchTerm,
}),
);
@@ -395,8 +439,11 @@ export function getPhysicalDiskHealthStatus(
}
return {
- label: normalizedHealth === 'PASSED' || normalizedHealth === 'GOOD' ? 'Healthy' : 'Monitor',
- summary: 'No active disk-health issues.',
+ label: normalizedHealth === 'PASSED' || normalizedHealth === 'GOOD' ? 'Healthy' : 'Unknown',
+ summary:
+ normalizedHealth === 'PASSED' || normalizedHealth === 'GOOD'
+ ? 'No active disk-health issues.'
+ : 'Health state is not reported.',
tone: 'text-base-content',
};
}
@@ -443,17 +490,94 @@ export function getPhysicalDiskParentLabel(disk: PhysicalDiskPresentationData):
return '';
}
+export function getPhysicalDiskRoleFilterValue(disk: PhysicalDiskPresentationData): string {
+ return normalizePhysicalDiskFacetFilter(getPhysicalDiskRoleLabel(disk));
+}
+
+export function getPhysicalDiskGroupFilterValue(disk: PhysicalDiskPresentationData): string {
+ return normalizePhysicalDiskFacetFilter(getPhysicalDiskParentLabel(disk));
+}
+
+const buildPhysicalDiskFacetOptions = (
+ disks: Resource[],
+ allLabel: string,
+ getLabel: (disk: PhysicalDiskPresentationData) => string,
+): PhysicalDiskFilterOption[] => {
+ const byValue = new Map<string, string>();
+ for (const resource of disks || []) {
+ const label = getLabel(extractPhysicalDiskPresentationData(resource)).trim();
+ if (!label) continue;
+ byValue.set(normalizePhysicalDiskFacetFilter(label), label);
+ }
+
+ return [
+ { value: DEFAULT_PHYSICAL_DISK_FACET_FILTER, label: allLabel },
+ ...Array.from(byValue.entries())
+ .sort(([, labelA], [, labelB]) => labelA.localeCompare(labelB))
+ .map(([value, label]) => ({ value, label })),
+ ];
+};
+
+export const buildPhysicalDiskRoleFilterOptions = (disks: Resource[]): PhysicalDiskFilterOption[] =>
+ buildPhysicalDiskFacetOptions(disks, 'All Roles', getPhysicalDiskRoleLabel);
+
+export const buildPhysicalDiskGroupFilterOptions = (
+ disks: Resource[],
+): PhysicalDiskFilterOption[] =>
+ buildPhysicalDiskFacetOptions(disks, 'All Groups', getPhysicalDiskParentLabel);
+
+const getPhysicalDiskHealthFilterEmptyTitle = (filter: StorageHealthFilter): string | null => {
+ switch (filter) {
+ case 'attention':
+ return 'No disks need attention';
+ case 'healthy':
+ return 'No healthy disks found';
+ case 'warning':
+ return 'No warning disks found';
+ case 'critical':
+ return 'No critical disks found';
+ case 'offline':
+ return 'No offline disks found';
+ case 'unknown':
+ return 'No disks with unknown health';
+ default:
+ return null;
+ }
+};
+
export function getPhysicalDiskEmptyStatePresentation(options: {
selectedNodeName: string | null;
searchTerm: string;
diskCount: number;
hasPVENodes: boolean;
+ healthFilter?: StorageHealthFilter;
+ sourceFilterLabel?: string | null;
+ roleFilterLabel?: string | null;
+ groupFilterLabel?: string | null;
}): PhysicalDiskEmptyStatePresentation {
+ const healthFilter = options.healthFilter || 'all';
+ const hasScopedFilter = Boolean(
+ options.searchTerm ||
+ options.sourceFilterLabel ||
+ options.roleFilterLabel ||
+ options.groupFilterLabel ||
+ healthFilter !== 'all',
+ );
+ const filterMessages = [
+ options.sourceFilterLabel ? `from ${options.sourceFilterLabel}` : null,
+ options.roleFilterLabel ? `with role ${options.roleFilterLabel}` : null,
+ options.groupFilterLabel ? `in ${options.groupFilterLabel}` : null,
+ ].filter((message): message is string => Boolean(message));
+
return {
- title: 'No physical disks found',
+ title:
+ options.diskCount === 0
+ ? 'No physical disks found'
+ : getPhysicalDiskHealthFilterEmptyTitle(healthFilter) || 'No disks match these filters',
nodeMessage: options.selectedNodeName ? `for node ${options.selectedNodeName}` : null,
searchMessage: options.searchTerm ? `matching "${options.searchTerm}"` : null,
- showRequirements: !options.searchTerm && options.diskCount === 0 && options.hasPVENodes,
+ filterMessages,
+ showRequirements: !hasScopedFilter && options.diskCount === 0 && options.hasPVENodes,
fallbackMessage:
'No Proxmox nodes configured. Add a Proxmox VE cluster in Settings to monitor physical disks.',
requirementsTitle: 'Physical disk monitoring requirements:',
diff --git a/frontend-modern/src/routing/__tests__/resourceLinks.test.ts b/frontend-modern/src/routing/__tests__/resourceLinks.test.ts
index e22e1eed54..3f992e431f 100644
--- a/frontend-modern/src/routing/__tests__/resourceLinks.test.ts
+++ b/frontend-modern/src/routing/__tests__/resourceLinks.test.ts
@@ -95,9 +95,9 @@ describe('resource link routing contract', () => {
expect(buildWorkloadsPath({ type: 'docker', platform: 'docker', agent: 'runtime-1' })).toBe(
'/workloads?type=app-container&platform=docker&agent=runtime-1',
);
- expect(buildWorkloadsPath({ type: 'kubernetes', platform: 'kubernetes', context: 'cluster-a' })).toBe(
- '/workloads?type=pod&platform=kubernetes&context=cluster-a',
- );
+ expect(
+ buildWorkloadsPath({ type: 'kubernetes', platform: 'kubernetes', context: 'cluster-a' }),
+ ).toBe('/workloads?type=pod&platform=kubernetes&context=cluster-a');
});
it('builds and parses infrastructure query params', () => {
@@ -272,6 +272,8 @@ describe('resource link routing contract', () => {
group: 'storage',
source: 'pbs',
status: 'available',
+ diskRole: 'nvme-disk',
+ diskGroup: 'data',
node: 'cluster-main-pve1',
query: 'local-lvm',
resource: 'storage-1',
@@ -279,7 +281,7 @@ describe('resource link routing contract', () => {
order: 'desc',
});
expect(href).toBe(
- '/storage?tab=disks&group=storage&source=proxmox-pbs&status=available&node=cluster-main-pve1&q=local-lvm&resource=storage-1&sort=usage&order=desc',
+ '/storage?tab=disks&group=storage&source=proxmox-pbs&status=available&diskRole=nvme-disk&diskGroup=data&node=cluster-main-pve1&q=local-lvm&resource=storage-1&sort=usage&order=desc',
);
const parsed = parseStorageLinkSearch(href.slice('/storage'.length));
@@ -288,6 +290,8 @@ describe('resource link routing contract', () => {
group: 'storage',
source: 'proxmox-pbs',
status: 'available',
+ diskRole: 'nvme-disk',
+ diskGroup: 'data',
node: 'cluster-main-pve1',
query: 'local-lvm',
resource: 'storage-1',
@@ -298,6 +302,8 @@ describe('resource link routing contract', () => {
expect(STORAGE_QUERY_PARAMS.tab).toBe('tab');
expect(STORAGE_QUERY_PARAMS.group).toBe('group');
+ expect(STORAGE_QUERY_PARAMS.diskRole).toBe('diskRole');
+ expect(STORAGE_QUERY_PARAMS.diskGroup).toBe('diskGroup');
expect(STORAGE_QUERY_PARAMS.query).toBe('q');
expect(STORAGE_QUERY_PARAMS.resource).toBe('resource');
expect(STORAGE_QUERY_PARAMS.sort).toBe('sort');
diff --git a/frontend-modern/src/routing/resourceLinks.ts b/frontend-modern/src/routing/resourceLinks.ts
index db4b637523..fec7fa64e0 100644
--- a/frontend-modern/src/routing/resourceLinks.ts
+++ b/frontend-modern/src/routing/resourceLinks.ts
@@ -61,6 +61,8 @@ export const STORAGE_QUERY_PARAMS = {
group: 'group',
source: 'source',
status: 'status',
+ diskRole: 'diskRole',
+ diskGroup: 'diskGroup',
node: 'node',
query: 'q',
resource: 'resource',
@@ -140,6 +142,8 @@ type StorageLinkOptions = {
group?: string | null;
source?: string | null;
status?: string | null;
+ diskRole?: string | null;
+ diskGroup?: string | null;
node?: string | null;
query?: string | null;
resource?: string | null;
@@ -537,6 +541,8 @@ export const parseStorageLinkSearch = (search: string) => {
group: normalizeQueryValue(params.get(STORAGE_QUERY_PARAMS.group)),
source: normalizeStorageSourceKey(params.get(STORAGE_QUERY_PARAMS.source)),
status: normalizeQueryValue(params.get(STORAGE_QUERY_PARAMS.status)),
+ diskRole: normalizeQueryValue(params.get(STORAGE_QUERY_PARAMS.diskRole)),
+ diskGroup: normalizeQueryValue(params.get(STORAGE_QUERY_PARAMS.diskGroup)),
node: normalizeQueryValue(params.get(STORAGE_QUERY_PARAMS.node)),
query: normalizeQueryValue(params.get(STORAGE_QUERY_PARAMS.query)),
resource: normalizeQueryValue(params.get(STORAGE_QUERY_PARAMS.resource)),
@@ -552,6 +558,8 @@ export const buildStoragePath = (options: StorageLinkOptions = {}): string => {
const group = normalizeQueryValue(options.group);
const source = normalizeStorageSourceKey(options.source);
const status = normalizeQueryValue(options.status);
+ const diskRole = normalizeQueryValue(options.diskRole);
+ const diskGroup = normalizeQueryValue(options.diskGroup);
const node = normalizeQueryValue(options.node);
const query = normalizeQueryValue(options.query);
const resource = normalizeQueryValue(options.resource);
@@ -563,6 +571,8 @@ export const buildStoragePath = (options: StorageLinkOptions = {}): string => {
if (group) params.set(STORAGE_QUERY_PARAMS.group, group);
if (source) params.set(STORAGE_QUERY_PARAMS.source, source);
if (status) params.set(STORAGE_QUERY_PARAMS.status, status);
+ if (diskRole) params.set(STORAGE_QUERY_PARAMS.diskRole, diskRole);
+ if (diskGroup) params.set(STORAGE_QUERY_PARAMS.diskGroup, diskGroup);
if (node) params.set(STORAGE_QUERY_PARAMS.node, node);
if (query) params.set(STORAGE_QUERY_PARAMS.query, query);
if (resource) params.set(STORAGE_QUERY_PARAMS.resource, resource);