From 2379e6fd1be3be2ae23718b52e7451f7611498a6 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 13 Oct 2023 05:14:24 -0600 Subject: [PATCH] Support TiB in storage calculation (#8142) --- web/src/routes/Storage.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/routes/Storage.jsx b/web/src/routes/Storage.jsx index 71fde1668..4e187ef86 100644 --- a/web/src/routes/Storage.jsx +++ b/web/src/routes/Storage.jsx @@ -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;