From 33727c744f0863b377dab1a55402dd9a9e02a4db Mon Sep 17 00:00:00 2001 From: 0xGlitch <92540908+bgauger@users.noreply.github.com> Date: Mon, 20 Apr 2026 16:46:46 -0600 Subject: [PATCH] fix(UI): gate NAS Storage label on network filesystem type (#749) Closes #743 --- admin/inertia/hooks/useDiskDisplayData.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/admin/inertia/hooks/useDiskDisplayData.ts b/admin/inertia/hooks/useDiskDisplayData.ts index 331b323..415fae9 100644 --- a/admin/inertia/hooks/useDiskDisplayData.ts +++ b/admin/inertia/hooks/useDiskDisplayData.ts @@ -19,9 +19,15 @@ export function getAllDiskDisplayItems( ): DiskDisplayItem[] { const validDisks = disks?.filter((d) => d.totalSize > 0) || [] - // If /app/storage is on a dedicated filesystem (e.g. NFS), it won't appear - // in the block-device list. Prepend it so NAS and OS disk are both shown. - const storageMount = fsSize?.find((fs) => fs.mount === '/app/storage' && fs.size > 0) + // If /app/storage is backed by a network filesystem (NFS/CIFS), it won't + // appear in the block-device list. Prepend it so NAS and OS disk are both + // shown. Local-disk-backed /app/storage is already reported in disk[] and + // fsSize[], so skip it here to avoid a phantom "NAS Storage" entry. + const NETWORK_FS_TYPES = new Set(['nfs', 'nfs4', 'cifs', 'smbfs', 'smb2', 'smb3']) + const storageMount = fsSize?.find( + (fs) => + fs.mount === '/app/storage' && fs.size > 0 && NETWORK_FS_TYPES.has(fs.type?.toLowerCase()) + ) const storageMountItem: DiskDisplayItem[] = storageMount ? [ {