feat: show downlaod and upload speed in per-second form

This commit is contained in:
kunish 2023-08-29 23:07:52 +08:00
parent 16fea9213d
commit 49bf6c7e2d
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430

View File

@ -129,13 +129,13 @@ export default () => {
},
{
accessorKey: 'DL Speed',
accessorFn: (row) => byteSize(row.downloadSpeed),
accessorFn: (row) => `${byteSize(row.downloadSpeed)}/s`,
sortingFn: (prev, next) =>
prev.original.downloadSpeed - next.original.downloadSpeed,
},
{
accessorKey: 'UL Speed',
accessorFn: (row) => byteSize(row.uploadSpeed),
accessorFn: (row) => `${byteSize(row.uploadSpeed)}/s`,
sortingFn: (prev, next) =>
prev.original.uploadSpeed - next.original.uploadSpeed,
},