feat(client): ネットワークウィジェットの単位に秒追加
This commit is contained in:
parent
36ac2f2e28
commit
af9712f006
|
@ -1,6 +1,6 @@
|
|||
export default (v) => {
|
||||
if (v == null) return '?';
|
||||
const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
|
||||
const sizes = ['B/s', 'KB/s', 'MB/s', 'GB/s', 'TB/s'];
|
||||
if (v === 0) return sizes[0];
|
||||
const i = Math.floor(Math.log(v) / Math.log(1024));
|
||||
return sizes[i];
|
||||
|
|
Loading…
Reference in a new issue