Skip to content

Commit

Permalink
fix: filter out zram devices
Browse files Browse the repository at this point in the history
fixes #981
  • Loading branch information
MauriceNino committed Jan 6, 2024
1 parent 06faae1 commit 6d265d3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions apps/server/__TESTS__/test-cases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5279,12 +5279,8 @@ export const TEST_CASE_18 = {
disks: [{ brand: 'INTEL SS', device: 'sde', type: 'HD' }],
size: 240057409536,
},
{
disks: [{ brand: 'zram0', device: 'zram0', type: 'SSD' }],
size: 8341528576,
},
],
output: [1071917584384, 91657261056, 11036561408, 0],
output: [1071917584384, 91657261056, 11036561408],
} as any as TestCase;

export const TEST_CASE_19 = {
Expand Down
1 change: 1 addition & 0 deletions apps/server/src/data/storage/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const getDiskBlocks = (blocks: Block[]) =>
block =>
block.type === 'disk' &&
block.size > 0 &&
!/^zram\d+$/.test(block.name) &&
!CONFIG.fs_device_filter.includes(block.name) &&
!CONFIG.fs_type_filter.includes(block.fsType)
);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"build:prod": "nx run-many --target=build --configuration=production --projects=server,view,cli --parallel=true --verbose",
"serve": "nx run-many --target=serve --projects=server,view,docs --parallel=true",
"dev": "docker compose -p dashdot_dev -f ./docker-compose.yml up --remove-orphans",
"test": "nx run-many --target=test --all=true --parallel=true",
"test": "nx run-many --target=test --all=true --parallel=true --skipNxCache",
"postinstall": "husky install",
"commit": "git-cz",
"clean": "rm -rf dist apps/docs/.docusaurus node_modules/.cache"
Expand Down

0 comments on commit 6d265d3

Please sign in to comment.