mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-19 15:23:20 +00:00
Add camera bandwidth back in storage metrics (#13436)
This commit is contained in:
1 parent
cf7718132a
commit
4ec136cab0
3 files changed
+15
-9
No files matched your search
@@ -0,0 +1,7 @@
|
||||
export const getUnitSize = (MB: number) => {
|
||||
if (MB === null || isNaN(MB) || MB < 0) return "Invalid number";
|
||||
if (MB < 1024) return `${MB.toFixed(2)} MiB`;
|
||||
if (MB < 1048576) return `${(MB / 1024).toFixed(2)} GiB`;
|
||||
|
||||
return `${(MB / 1048576).toFixed(2)} TiB`;
|
||||
};
|
||||
Reference in new issue
Block a user