mirror of
https://github.com/csehviktor/status-monitor.git
synced 2026-04-29 00:27:35 +02:00
fix network units
This commit is contained in:
@@ -55,6 +55,10 @@ export function formatBytes(bytes: number | undefined): string {
|
||||
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(1))} ${sizes[i]}`;
|
||||
}
|
||||
|
||||
export function formatBits(bits: number | undefined): string {
|
||||
return formatBytes((bits ?? 0) / 8);
|
||||
}
|
||||
|
||||
export function calcPercentage(
|
||||
value: number | undefined,
|
||||
total: number | undefined,
|
||||
|
||||
Reference in New Issue
Block a user