Skip to content

Commit

Permalink
use sum of file system sizes instead of first to avoid problems with …
Browse files Browse the repository at this point in the history
…boot partitions at first index
  • Loading branch information
aliceif committed Oct 10, 2024
1 parent 2518cf3 commit 2563dbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
total: memStats.total,
},
fs: {
total: fsStats[0].size,
used: fsStats[0].used,
total: fsStats.map(fs => fs.size).reduce((acc, size) => acc + size),
used: fsStats.map(fs => fs.used).reduce((acc, size) => acc + size),
},
net: {
interface: netInterface,
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/server/api/endpoints/server-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
total: memStats.total,
},
fs: {
total: fsStats[0].size,
used: fsStats[0].used,
total: fsStats.map(fs => fs.size).reduce((acc, size) => acc + size),
used: fsStats.map(fs => fs.used).reduce((acc, size) => acc + size),
},
};
});
Expand Down

0 comments on commit 2563dbe

Please sign in to comment.