mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-29 04:07:49 +02:00
Console: transit tunnel traffic presentational tweaks
This commit is contained in:
parent
caf18f819d
commit
a77b931d76
1 changed files with 4 additions and 2 deletions
|
@ -626,7 +626,8 @@ namespace http {
|
||||||
s << (double) i2p::transport::transports.GetOutBandwidth () / 1024 << " " << tr(/* tr: Kibibit/s */ "K/s");
|
s << (double) i2p::transport::transports.GetOutBandwidth () / 1024 << " " << tr(/* tr: Kibibit/s */ "K/s");
|
||||||
s << "</span>";
|
s << "</span>";
|
||||||
|
|
||||||
if (i2p::context.AcceptsTunnels () && i2p::tunnel::tunnels.CountTransitTunnels()) {
|
if ((i2p::context.AcceptsTunnels() || i2p::tunnel::tunnels.CountTransitTunnels()) &&
|
||||||
|
(i2p::transport::transports.GetTotalReceivedBytes () > 0)) {
|
||||||
if (i2p::transport::transports.GetTransitBandwidth () > 1024*1024*1024 ||
|
if (i2p::transport::transports.GetTransitBandwidth () > 1024*1024*1024 ||
|
||||||
i2p::transport::transports.GetTransitBandwidth () < 1024)
|
i2p::transport::transports.GetTransitBandwidth () < 1024)
|
||||||
s << std::fixed << std::setprecision(2);
|
s << std::fixed << std::setprecision(2);
|
||||||
|
@ -654,7 +655,8 @@ namespace http {
|
||||||
ShowTraffic (s, i2p::transport::transports.GetTotalSentBytes ());
|
ShowTraffic (s, i2p::transport::transports.GetTotalSentBytes ());
|
||||||
s << "</span>";
|
s << "</span>";
|
||||||
|
|
||||||
if (i2p::context.AcceptsTunnels () && i2p::tunnel::tunnels.CountTransitTunnels()) {
|
if ((i2p::context.AcceptsTunnels() || i2p::tunnel::tunnels.CountTransitTunnels()) &&
|
||||||
|
(i2p::transport::transports.GetTotalReceivedBytes () > 0)) {
|
||||||
s << " <span class=\"hide\">/</span> <span class=\"transit sent\">";
|
s << " <span class=\"hide\">/</span> <span class=\"transit sent\">";
|
||||||
s << std::fixed << std::setprecision(0);
|
s << std::fixed << std::setprecision(0);
|
||||||
if (i2p::transport::transports.GetTotalTransitTransmittedBytes () > 1024*1024*1024)
|
if (i2p::transport::transports.GetTotalTransitTransmittedBytes () > 1024*1024*1024)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue