From 94a2e79068d00c147abc1cf0731d0b1f44d75f3e Mon Sep 17 00:00:00 2001 From: dr|z3d Date: Thu, 26 Aug 2021 12:53:07 +0000 Subject: [PATCH] Console: tooltips for transit b/w and data transferred --- daemon/HTTPServer.cpp | 44 ++++++++++++++++++++++++------------------- webconsole/style.css | 12 +++++++++--- 2 files changed, 34 insertions(+), 22 deletions(-) diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp index 4862d605..1f90a197 100644 --- a/daemon/HTTPServer.cpp +++ b/daemon/HTTPServer.cpp @@ -633,7 +633,8 @@ namespace http { s << std::fixed << std::setprecision(2); else if (i2p::transport::transports.GetTransitBandwidth () > 1024*1024) s << std::fixed << std::setprecision(1); - s << " / "; + s << " / "; s << (double) i2p::transport::transports.GetTransitBandwidth () / 1024; s << " " << tr(/* tr: Kibibit/s */ "K/s") << ""; } @@ -657,7 +658,8 @@ namespace http { if ((i2p::context.AcceptsTunnels() || i2p::tunnel::tunnels.CountTransitTunnels()) && (i2p::transport::transports.GetTotalReceivedBytes () > 0)) { - s << " / "; + s << " / "; s << std::fixed << std::setprecision(0); if (i2p::transport::transports.GetTotalTransitTransmittedBytes () > 1024*1024*1024) s << std::fixed << std::setprecision(2); @@ -815,7 +817,7 @@ namespace http { s << "\r\n"; s << "
\r\n\r\n" << "\r\n"; s << "
\r\n\r\n\r\n" << "" @@ -881,7 +883,7 @@ namespace http { if (dest->GetNumIncomingTags () > 0) { s << "\r\n"; } else { s << "\r\n"; @@ -895,7 +897,7 @@ namespace http { out_tags += it.second->GetNumOutgoingTags (); } s << "\r\n" << "
" << tr("Address") << "
" << tr("Incoming Session Tags") - << " [" + << " [" << dest->GetNumIncomingTags () << "]
" << tr("No Incoming Session Tags") << "
" << tr("Outgoing Session Tags") - << " [" << out_tags + << " [" << out_tags << "]
\r\n" << "\r\n"; s << "\r\n"; if (!dest->GetECIESx25519Sessions ().empty ()) { @@ -921,7 +923,7 @@ namespace http { s << "\r\n"; + s << "\r\n"; } else - s << "\r\n"; + s << "\r\n"; if (dest) { @@ -1085,7 +1091,7 @@ namespace http { s << ""; s << "\r\n\r\n\r\n
" << tr("Destination") << "" << tr("Count") @@ -907,7 +909,7 @@ namespace http { if (numECIESx25519Tags > 0) { s << "
ECIESx25519
" << tr("Incoming Tags") - << " [" << numECIESx25519Tags + << " [" << numECIESx25519Tags << "]
\r\n" << "
\r\n" << "\r\n" << "
\r\n\r\n\r\n\r\n" << tmp_s.str () << "
" << tr("Destination") << "" << tr("Status") << "
\r\n
\r\n
\r\n"; @@ -937,9 +939,13 @@ namespace http { auto dest = i2p::client::context.FindLocalDestination (ident); if (dest) { std::string b32Short = b32.substr(0,6); - s << "
" << tr("Local Destination") << " [" << b32Short << "]
" << tr("Local Destination") + << " [" << b32Short + << "]
" << tr("Local Destination") << " [" << tr("Not Found") << "]
" << tr("Local Destination") + << " [" << tr("Not Found") + << "]
\r\n"; s << "
\r\n\r\n" - << "
" << tr("Service Tunnels") << "
\r\n"; s << "
\r\n\r\n" - << "
\r\n"; s << "
\r\n\r\n" - << "
\r\n"; s << "
\r\n\r\n" - << "
\r\n"; s << "
\r\n\r\n" - << "