mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
[webconsole] format transit tunnels with table
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
d4426118c5
commit
e1ec79daf2
@ -779,19 +779,20 @@ namespace http {
|
|||||||
{
|
{
|
||||||
if (i2p::tunnel::tunnels.CountTransitTunnels())
|
if (i2p::tunnel::tunnels.CountTransitTunnels())
|
||||||
{
|
{
|
||||||
s << "<b>" << tr("Transit Tunnels") << ":</b><br>\r\n<div class=\"list\">\r\n";
|
s << "<b>" << tr("Transit Tunnels") << ":</b><br>\r\n";
|
||||||
|
s << "<table><thead><th>⇒</th><th>ID</th><th>⇒</th><th>" << tr("Amount") << "</th></thead><tbody class=\"tableitem\">";
|
||||||
for (const auto& it: i2p::tunnel::tunnels.GetTransitTunnels ())
|
for (const auto& it: i2p::tunnel::tunnels.GetTransitTunnels ())
|
||||||
{
|
{
|
||||||
s << "<div class=\"listitem\">\r\n";
|
|
||||||
if (std::dynamic_pointer_cast<i2p::tunnel::TransitTunnelGateway>(it))
|
if (std::dynamic_pointer_cast<i2p::tunnel::TransitTunnelGateway>(it))
|
||||||
s << it->GetTunnelID () << " ⇒ ";
|
s << "<tr><td></td><td>" << it->GetTunnelID () << "</td><td>⇒</td><td>";
|
||||||
else if (std::dynamic_pointer_cast<i2p::tunnel::TransitTunnelEndpoint>(it))
|
else if (std::dynamic_pointer_cast<i2p::tunnel::TransitTunnelEndpoint>(it))
|
||||||
s << " ⇒ " << it->GetTunnelID ();
|
s << "<tr><td>⇒</td><td>" << it->GetTunnelID () << "</td><td></td><td>";
|
||||||
else
|
else
|
||||||
s << " ⇒ " << it->GetTunnelID () << " ⇒ ";
|
s << "<tr><td>⇒</td><td>" << it->GetTunnelID () << "</td><td>⇒</td><td>";
|
||||||
s << " " << it->GetNumTransmittedBytes () << "</div>\r\n";
|
ShowTraffic(s, it->GetNumTransmittedBytes ());
|
||||||
|
s << "</td></tr>\r\n";
|
||||||
}
|
}
|
||||||
s << "</div>\r\n";
|
s << "</tbody></table>\r\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user