Skip to content

Commit

Permalink
Support TiB in storage calculation (blakeblackshear#8142)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Oct 13, 2023
1 parent dcafcc1 commit 2379e6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/src/routes/Storage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ export default function Storage() {
const getUnitSize = (MB) => {
if (isNaN(MB) || MB < 0) return 'Invalid number';
if (MB < 1024) return `${MB} MiB`;
if (MB < 1048576) return `${(MB / 1024).toFixed(2)} GiB`;

return `${(MB / 1024).toFixed(2)} GiB`;
return `${(MB / 1048576).toFixed(2)} TiB`;
};

let storage_usage;
Expand Down

0 comments on commit 2379e6f

Please sign in to comment.