mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-29 04:07:49 +02:00
Console: Add counter badge for transit tunnels
This commit is contained in:
parent
ed4d4cfc0b
commit
57c4fd5512
1 changed files with 3 additions and 23 deletions
|
@ -669,29 +669,7 @@ namespace http {
|
||||||
s << std::fixed << std::setprecision(0);
|
s << std::fixed << std::setprecision(0);
|
||||||
s << "</span>";
|
s << "</span>";
|
||||||
}
|
}
|
||||||
|
|
||||||
s << "</td></tr>\r\n";
|
s << "</td></tr>\r\n";
|
||||||
|
|
||||||
/*
|
|
||||||
if (i2p::context.AcceptsTunnels () && i2p::tunnel::tunnels.CountTransitTunnels()) {
|
|
||||||
s << "<tr><td>" << tr("Transit") << "</td><td><span class=\"transit sent\">";
|
|
||||||
s << std::fixed << std::setprecision(0);
|
|
||||||
if (i2p::transport::transports.GetTotalTransitTransmittedBytes () > 1024*1024*1024)
|
|
||||||
s << std::fixed << std::setprecision(2);
|
|
||||||
else if (i2p::transport::transports.GetTotalTransitTransmittedBytes () > 1024*1024)
|
|
||||||
s << std::fixed << std::setprecision(1);
|
|
||||||
ShowTraffic (s, i2p::transport::transports.GetTotalTransitTransmittedBytes ());
|
|
||||||
s << std::fixed << std::setprecision(0);
|
|
||||||
if (i2p::transport::transports.GetTransitBandwidth () > 1024*1024*1024 ||
|
|
||||||
i2p::transport::transports.GetTransitBandwidth () < 1024)
|
|
||||||
s << std::fixed << std::setprecision(2);
|
|
||||||
else if (i2p::transport::transports.GetTransitBandwidth () > 1024*1024)
|
|
||||||
s << std::fixed << std::setprecision(1);
|
|
||||||
s << " (" << (double) i2p::transport::transports.GetTransitBandwidth () / 1024;
|
|
||||||
s << " " << tr("K/s") << ")</span></td></tr>\r\n";
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
s << "<tr><td>" << tr("Build Success") << "</td><td>";
|
s << "<tr><td>" << tr("Build Success") << "</td><td>";
|
||||||
s << i2p::tunnel::tunnels.GetTunnelCreationSuccessRate () << "%</td></tr>\r\n";
|
s << i2p::tunnel::tunnels.GetTunnelCreationSuccessRate () << "%</td></tr>\r\n";
|
||||||
s << "<tr><td>" << tr("Routers") << "</td><td>" << i2p::data::netdb.GetNumRouters () << "</td></tr>\r\n";
|
s << "<tr><td>" << tr("Routers") << "</td><td>" << i2p::data::netdb.GetNumRouters () << "</td></tr>\r\n";
|
||||||
|
@ -1382,7 +1360,9 @@ namespace http {
|
||||||
if(i2p::tunnel::tunnels.CountTransitTunnels())
|
if(i2p::tunnel::tunnels.CountTransitTunnels())
|
||||||
{
|
{
|
||||||
int count = i2p::tunnel::tunnels.GetTransitTunnels().size();
|
int count = i2p::tunnel::tunnels.GetTransitTunnels().size();
|
||||||
s << "<tr class=\"sectiontitle configuration\"><th colspan=\"2\"><span>" << tr("Transit Tunnels") << "</span></th></tr>";
|
s << "<tr class=\"sectiontitle configuration\"><th colspan=\"2\"><span>" << tr("Transit Tunnels");
|
||||||
|
s << " <span class=\"hide\">[</span><span class=\"badge\">" << count << "</span><span class=\"hide\">]</span>"
|
||||||
|
<< "</span></th></tr>";
|
||||||
s << "<tr><td class=\"center nopadding\" colspan=\"2\">\r\n";
|
s << "<tr><td class=\"center nopadding\" colspan=\"2\">\r\n";
|
||||||
s << "<div ";
|
s << "<div ";
|
||||||
if (count > 7)
|
if (count > 7)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue