diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp index fe6395c8..dfde5288 100644 --- a/daemon/HTTPServer.cpp +++ b/daemon/HTTPServer.cpp @@ -1351,7 +1351,21 @@ namespace http { for (const auto& it: i2p::tunnel::tunnels.GetTransitTunnels ()) { s << "
"; - s << "" << it->GetNumTransmittedBytes () << "B "; + + double bytes = it->GetNumTransmittedBytes (); + s << std::fixed << std::setprecision(0); + if (bytes > 1024 * 1024 * 1024) { + s << std::fixed << std::setprecision(2); + s << "" << (double) (bytes / 1024 / 1024 / 1024) << "G "; + } else if (bytes > 1024 * 1024) { + s << std::fixed << std::setprecision(1); + s << "" << (double) (bytes / 1024 / 1024) << "M "; + } else if (bytes > 1024) { + s << "" << (int) (bytes / 1024) << "K "; + } else { + s << "" << (int) (bytes) << "B "; + } + s << "" << it->GetTunnelID () << " "; if (std::dynamic_pointer_cast(it)) s << "" @@ -1623,14 +1637,13 @@ namespace http { void ShowI2PTunnels (std::stringstream& s) { std::string webroot; i2p::config::GetOption("http.webroot", webroot); + s << "" << tr("Service Tunnels") << ""; s << "\r\n"; - s << "
\r\n\r\n" - << "\r\n"; - s << "
\r\n"; -// s << "" << tr("Client Tunnels") << ""; + s << "
\r\n\r\n" + << "\r\n"; + s << "
\r\n"; s << "
\r\n"; - s << "
" << tr("Client Tunnels") << "
"; for (auto& it: i2p::client::context.GetClientTunnels ()) { auto& ident = it.second->GetLocalDestination ()->GetIdentHash(); @@ -1657,12 +1670,15 @@ namespace http { s << i2p::client::context.GetAddressBook ().ToAddress(ident); s << "
\r\n" << std::endl; } - s << "
\r\n
\r\n"; + s << "
\r\n
\r\n
\r\n"; auto& serverTunnels = i2p::client::context.GetServerTunnels (); if (!serverTunnels.empty ()) { - s << "" << tr("Server Tunnels") << "\r\n"; - s << "\r\n"; + s << "\r\n\r\n\r\n"; + s << "
\r\n\r\n" + << "\r\n"; + s << "
\r\n"; s << "
\r\n"; for (auto& it: serverTunnels) { @@ -1673,14 +1689,18 @@ namespace http { s << ":" << it.second->GetLocalPort (); s << "
\r\n" << std::endl; } - s << "
\r\n
\r\n\r\n"; + s << "\r\n\r\n\r\n\r\n"; } auto& clientForwards = i2p::client::context.GetClientForwards (); if (!clientForwards.empty ()) { - s << "" << tr("Client Forwards") << "" - << "\r\n
\r\n"; + s << "\r\n\r\n\r\n"; + s << "
\r\n\r\n" + << "\r\n"; + s << "
\r\n"; + s << "
\r\n"; for (auto& it: clientForwards) { auto& ident = it.second->GetLocalDestination ()->GetIdentHash(); @@ -1689,24 +1709,28 @@ namespace http { s << i2p::client::context.GetAddressBook ().ToAddress(ident); s << "
\r\n"<< std::endl; } - s << "
\r\n"; + s << "
\r\n
\r\n\r\n\r\n"; } auto& serverForwards = i2p::client::context.GetServerForwards (); if (!serverForwards.empty ()) { - s << "" << tr("Server Forwards") << "\r\n"; - s << "\r\n"; - s << "
\r\n"; + s << "\r\n\r\n\r\n"; + s << "
\r\n\r\n" + << "\r\n"; + s << "
\r\n"; + s << "
\r\n"; for (auto& it: serverForwards) { auto& ident = it.second->GetLocalDestination ()->GetIdentHash(); - s << ""; + s << "
"; s << it.second->GetName () << " "; s << i2p::client::context.GetAddressBook ().ToAddress(ident); s << "
\r\n"<< std::endl; } - s << "
\r\n"; + s << "
\r\n
\r\n
\r\n\r\n"; } +// s << "\r\n"; } HTTPConnection::HTTPConnection (std::string hostname, std::shared_ptr socket): diff --git a/webconsole/style.css b/webconsole/style.css index 2a510af4..fa9edaa1 100644 --- a/webconsole/style.css +++ b/webconsole/style.css @@ -509,7 +509,7 @@ th.sectiontitle, .sectiontitle { display: inline-block; white-space: nowrap; line-height: 1.6; - font-size: 98%; + font-size: 11.5pt; border: 1px solid var(--button-border); border-top: none; border-radius: 0 0 4px 4px; @@ -1234,9 +1234,9 @@ input[type=checkbox]:checked + label::after { padding: 1px 3px; } - .chrome a.button { - min-width: 40px; - } + .chrome a.button { + min-width: 40px; + } .b32, .listitem a[href*="local_destination&b32"] { max-width: 300px; @@ -1265,6 +1265,10 @@ input[type=checkbox]:checked + label::after { vertical-align: middle; } + .sectiontitle span { + font-size: 10.5pt; + } + @media screen and (-webkit-min-device-pixel-ratio: 1.5) { body { font-size: 12pt !important;