From 31cd880cfc0f33e88bf487fa97c13fd24ec9e804 Mon Sep 17 00:00:00 2001 From: dr|z3d Date: Wed, 25 Aug 2021 14:34:58 +0000 Subject: [PATCH] Console: brighten up containing borders --- daemon/HTTPServer.cpp | 38 +++++++++++++++---------------- webconsole/style.css | 52 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 61 insertions(+), 29 deletions(-) diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp index 1fc5267a..cc2407c8 100644 --- a/daemon/HTTPServer.cpp +++ b/daemon/HTTPServer.cpp @@ -684,7 +684,7 @@ namespace http { bool i2cp = i2p::client::context.GetI2CPServer () ? true : false; bool i2pcontrol; i2p::config::GetOption("i2pcontrol.enabled", i2pcontrol); if (httpproxy || socksproxy || bob || sam || i2cp || i2pcontrol) { - s << "" << tr("Router Services") << ""; + s << "" << tr("Router Services") << ""; s << ""; if (httpproxy) s << " HTTP " << tr("Proxy") << " "; @@ -716,7 +716,7 @@ namespace http { void ShowLocalDestinations (std::stringstream& s) { std::string webroot; i2p::config::GetOption("http.webroot", webroot); - s << "" << tr("Local Destinations") << "\r\n
\r\n"; + s << "" << tr("Local Destinations") << "\r\n
\r\n"; for (auto& it: i2p::client::context.GetDestinations ()) { auto ident = it.second->GetIdentHash (); @@ -728,7 +728,7 @@ namespace http { auto i2cpServer = i2p::client::context.GetI2CPServer (); if (i2cpServer && !(i2cpServer->GetSessions ().empty ())) { - s << "I2CP "<< tr("Local Destinations") << "\r\n
\r\n"; + s << "I2CP "<< tr("Local Destinations") << "\r\n
\r\n"; for (auto& it: i2cpServer->GetSessions ()) { auto dest = it.second->GetDestination (); @@ -859,7 +859,7 @@ namespace http { << "" << it.second->GetNumOutgoingTags () << "\r\n"; out_tags += it.second->GetNumOutgoingTags (); } - s << "" << tr("Outgoing Session Tags") + s << "" << tr("Outgoing Session Tags") << " [" << out_tags << "]\r\n" << "\r\n" @@ -870,7 +870,7 @@ namespace http { auto numECIESx25519Tags = dest->GetNumIncomingECIESx25519Tags (); if (numECIESx25519Tags > 0) { - s << ""; + s << ""; s << "\r\n"; @@ -902,9 +902,9 @@ namespace http { auto dest = i2p::client::context.FindLocalDestination (ident); if (dest) { std::string b32Short = b32.substr(0,6); - s << "\r\n"; + s << "\r\n"; } else - s << "\r\n"; + s << "\r\n"; if (dest) { @@ -1043,7 +1043,7 @@ namespace http { void ShowTunnels (std::stringstream& s) { - s << "\r\n"; + s << "\r\n"; s << "\r\n"; auto ExplPool = i2p::tunnel::tunnels.GetExploratoryPool (); @@ -1100,7 +1100,7 @@ namespace http { s << "
\r\n\r\n" << "\r\n"; // TODO: separate client & exploratory tunnels into sections and flag individual services? + << "]\r\n"; // TODO: flag individual services by name s << "
\r\n
\r\n"; for (auto & it : i2p::tunnel::tunnels.GetInboundTunnels ()) { if (it->GetTunnelPool () != ExplPool) { @@ -1152,7 +1152,7 @@ namespace http { size_t localInCount = i2p::tunnel::tunnels.CountInboundTunnels(); size_t localOutCount = i2p::tunnel::tunnels.CountOutboundTunnels(); size_t transitCount = i2p::tunnel::tunnels.CountTransitTunnels(); - s << "
\r\n"; + s << "\r\n"; s << "\r\n
ECIESx25519
ECIESx25519
" << tr("Incoming Tags") << " [" << numECIESx25519Tags << "]
" << tr("Local Destination") << " [" << b32Short << "]
" << tr("Local Destination") << " [" << b32Short << "]
" << tr("Local Destination") << " [" << tr("Not Found") << "]
" << tr("Local Destination") << " [" << tr("Not Found") << "]
" << tr("Local Tunnels") << "
" << tr("Local Tunnels") << "
" << tr("Queue size") << ": " << i2p::tunnel::tunnels.GetQueueSize () << "
" << tr("Tunnel Summary") << "
" << tr("Tunnel Summary") << "
\r\n"; s << "\r\n" << "" @@ -1164,9 +1164,9 @@ namespace http { s << "" << "\r\n"; } + s << "\r\n
" << tr("Type") << "
" << tr("Transit") << "" << transitCount << "View
\r\n"; s << "
"; ShowI2PTunnels (s); - s << "
\r\n"; s << "\r\n"; } @@ -1226,7 +1226,7 @@ namespace http { std::string webroot; i2p::config::GetOption("http.webroot", webroot); - s << "" << tr("Router Commands") << "" + s << "" << tr("Router Commands") << "" << "\r\n"; std::string styleFile = i2p::fs::DataDirPath ("webconsole/style.css"); @@ -1301,7 +1301,7 @@ namespace http { << "
\r\n"; const LogLevel loglevel = i2p::log::Logger().GetLogLevel(); - s << "" << tr("Logging Level") << "\r\n"; + s << "" << tr("Logging Level") << "\r\n"; s << ""; s << "none\r\n"; @@ -1317,7 +1317,7 @@ namespace http { if (i2p::context.AcceptsTunnels ()) { uint16_t maxTunnels = GetMaxNumTransitTunnels (); - s << "" << tr("Maximum Transit Tunnels") << "\r\n"; + s << "" << tr("Maximum Transit Tunnels") << "\r\n"; s << "\r\n"; s << "
\r\n"; s << " \r\n"; @@ -1328,7 +1328,7 @@ namespace http { } std::string currLang = i2p::context.GetLanguage ()->GetLanguage(); // get current used language - s << "" << tr("Console Display Language") << "\r\n"; + s << "" << tr("Console Display Language") << "\r\n"; s << "\r\n"; s << "\r\n"; s << " \r\n"; @@ -1347,7 +1347,7 @@ namespace http { if(i2p::tunnel::tunnels.CountTransitTunnels()) { int count = i2p::tunnel::tunnels.GetTransitTunnels().size(); - s << "" << tr("Transit Tunnels") << ""; + s << "" << tr("Transit Tunnels") << ""; s << "\r\n"; s << "
8) @@ -1481,7 +1481,7 @@ namespace http { void ShowTransports (std::stringstream& s) { - s << "" << tr("Transports") << "\r\n" + s << "" << tr("Transports") << "\r\n" << ""; auto ntcp2Server = i2p::transport::transports.GetNTCP2Server (); if (ntcp2Server) @@ -1589,7 +1589,7 @@ namespace http { if (sam->GetSessions ().size ()) { - s << "" << tr("SAM sessions") + s << "" << tr("SAM sessions") << "\r\n\r\n
\r\n"; for (auto& it: sam->GetSessions ()) { @@ -1644,7 +1644,7 @@ namespace http { void ShowI2PTunnels (std::stringstream& s) { std::string webroot; i2p::config::GetOption("http.webroot", webroot); - s << "" << tr("Service Tunnels") << ""; + s << "" << tr("Service Tunnels") << ""; s << "\r\n"; s << "
\r\n\r\n" << "