Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webui shows undefined instead of TB traffic unit #148

Closed
milahu opened this issue Jul 4, 2024 · 3 comments
Closed

webui shows undefined instead of TB traffic unit #148

milahu opened this issue Jul 4, 2024 · 3 comments

Comments

@milahu
Copy link

milahu commented Jul 4, 2024

the webui fails to show the terabyte unit of upload traffic
probably also fails on the petabyte unit

also, for consistency with speed units
the traffic units should be iec-i units: KiB MiB GiB TiB PiB ...

also, nitpick: add space before (

torrent 66: ↑ 0.49 MiB/s(4.31 undefined)
torrent 0: ↑ 0.00 MiB/s(6.45 GB)
torrent 8: ↑ 0.00 MiB/s(218.9 MB)
torrent 148: ↑ 0.00 MiB/s(320 KB)
torrent 18: ↑ 0.00 MiB/s

expected

$ function t() { curl -s http://localhost:3030/torrents/"$1"/stats/v1 | jq .uploaded_bytes | tee /dev/stderr | numfmt --to=iec-i --suffix=B --format=%.3f; }

$ t 66
4744189414774
4.315TiB

$ t 0
6928358881
6.453GiB

$ t 8
229536704
218.904MiB

$ t 148
327680
320.000KiB

t 18
0
0.000B
@ikatson
Copy link
Owner

ikatson commented Jul 4, 2024

@kielerdotdev
Copy link
Contributor

PR made :)
#156

@ikatson
Copy link
Owner

ikatson commented Jul 26, 2024

Fixed in #156

@ikatson ikatson closed this as completed Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants