Skip to content

Commit

Permalink
fix(api): also filter disks by fs type filter
Browse files Browse the repository at this point in the history
  • Loading branch information
MauriceNino committed Jan 5, 2023
1 parent 477a435 commit 0a97265
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
7 changes: 2 additions & 5 deletions apps/api/__TESTS__/test-cases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2452,11 +2452,8 @@ export const TEST_CASE_8 = {
group: undefined,
},
],
layout: [
{ brand: 'vda', device: 'vda', size: 53687091200, type: 'HDD' },
{ brand: 'vdb', device: 'vdb', size: 485376, type: 'HDD' },
],
output: { layout: [{ load: 17542520832 }, { load: 0 }] },
layout: [{ brand: 'vda', device: 'vda', size: 53687091200, type: 'HDD' }],
output: { layout: [{ load: 17542520832 }] },
} as any as TestCase;

// https://github.com/MauriceNino/dashdot/issues/188
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const CONFIG: Config = {
use_network_interface: penv('USE_NETWORK_INTERFACE') ?? '',
fs_device_filter: lst(penv('FS_DEVICE_FILTER') ?? ''),
fs_type_filter: lst(
penv('FS_TYPE_FILTER') ?? 'cifs,9p,fuse.rclone,fuse.mergerfs,nfs4'
penv('FS_TYPE_FILTER') ?? 'cifs,9p,fuse.rclone,fuse.mergerfs,nfs4,iso9660'
),
fs_virtual_mounts: lst(penv('FS_VIRTUAL_MOUNTS') ?? ''),
disable_integrations: penv('DISABLE_INTEGRATIONS') === 'true',
Expand Down
3 changes: 2 additions & 1 deletion apps/api/src/data/storage/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const getDiskBlocks = (blocks: Block[]) =>
block =>
block.type === 'disk' &&
block.size > 0 &&
!CONFIG.fs_device_filter.includes(block.name)
!CONFIG.fs_device_filter.includes(block.name) &&
!CONFIG.fs_type_filter.includes(block.fsType)
);

const getNativeDisk = (disks: Disk[], block: Block) =>
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/docs/config/features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Please also create a [bug ticket](https://github.com/MauriceNino/dashdot/issues/
repository though, so that we can fix this problem for everyone.

- type: `string (comma separated list)`
- default: `cifs,9p,fuse.rclone,fuse.mergerfs,nfs4`
- default: `cifs,9p,fuse.rclone,fuse.mergerfs,nfs4,iso9660`

## `DASHDOT_FS_VIRTUAL_MOUNTS`

Expand Down

0 comments on commit 0a97265

Please sign in to comment.