mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-29 04:07:49 +02:00
Console: indicate which log level is active
This commit is contained in:
parent
8781486d6a
commit
d85d9d0224
2 changed files with 24 additions and 8 deletions
|
@ -1046,7 +1046,7 @@ namespace http {
|
||||||
|
|
||||||
void ShowTunnels (std::stringstream& s)
|
void ShowTunnels (std::stringstream& s)
|
||||||
{
|
{
|
||||||
s << "<tr><th class=\"sectiontitle\" colspan=\"2\"><span>" << tr("Client Tunnels") << "</span></th><tr>\r\n";
|
s << "<tr><th class=\"sectiontitle\" colspan=\"2\"><span>" << tr("Local Tunnels") << "</span></th><tr>\r\n";
|
||||||
s << "<tr><th colspan=\"2\">" << tr("Queue size") << ": " << i2p::tunnel::tunnels.GetQueueSize () << "</th></tr>\r\n";
|
s << "<tr><th colspan=\"2\">" << tr("Queue size") << ": " << i2p::tunnel::tunnels.GetQueueSize () << "</th></tr>\r\n";
|
||||||
|
|
||||||
auto ExplPool = i2p::tunnel::tunnels.GetExploratoryPool ();
|
auto ExplPool = i2p::tunnel::tunnels.GetExploratoryPool ();
|
||||||
|
@ -1111,7 +1111,7 @@ namespace http {
|
||||||
}
|
}
|
||||||
// s << "<tr><td>" << tr("Exploratory") << "</td><td class=\"in\">---</td><td class=\"out\">---</td>"
|
// s << "<tr><td>" << tr("Exploratory") << "</td><td class=\"in\">---</td><td class=\"out\">---</td>"
|
||||||
// << "<td><a class=\"button\" href=\"#\">View</a></td></tr>\r\n"
|
// << "<td><a class=\"button\" href=\"#\">View</a></td></tr>\r\n"
|
||||||
s << "<tr><td>" << tr("Client") << "</td><td class=\"in\">---</td><td class=\"out\">---</td>"
|
s << "<tr><td>" << tr("Local") << "</td><td class=\"in\">---</td><td class=\"out\">---</td>"
|
||||||
<< "<td><a class=\"button\" href=\"" << webroot << "?page=" << HTTP_PAGE_CLIENT_TUNNELS << "\">View</a></td></tr>\r\n"
|
<< "<td><a class=\"button\" href=\"" << webroot << "?page=" << HTTP_PAGE_CLIENT_TUNNELS << "\">View</a></td></tr>\r\n"
|
||||||
// << "<tr><td>" << tr("Service") << "</td><td>count in/out</td><td><a class=\"button\" href=\"#\">View</a></td></tr>\r\n"
|
// << "<tr><td>" << tr("Service") << "</td><td>count in/out</td><td><a class=\"button\" href=\"#\">View</a></td></tr>\r\n"
|
||||||
<< "<tr><td class=\"center nopadding\" colspan=\"4\">";
|
<< "<tr><td class=\"center nopadding\" colspan=\"4\">";
|
||||||
|
@ -1247,13 +1247,20 @@ namespace http {
|
||||||
<< tr("<b>Note:</b> Configuration changes made here persist for the duration of the router session and will not be saved to your config file.")
|
<< tr("<b>Note:</b> Configuration changes made here persist for the duration of the router session and will not be saved to your config file.")
|
||||||
<< "</div>\r\n</td></tr>";
|
<< "</div>\r\n</td></tr>";
|
||||||
|
|
||||||
|
const LogLevel loglevel = i2p::log::Logger().GetLogLevel();
|
||||||
s << "<tr><th class=\"sectiontitle\" colspan=\"2\"><span>" << tr("Logging Level") << "</span></th></tr>\r\n";
|
s << "<tr><th class=\"sectiontitle\" colspan=\"2\"><span>" << tr("Logging Level") << "</span></th></tr>\r\n";
|
||||||
s << "<tr class=\"chrome\"><td class=\"center\" colspan=\"2\">";
|
s << "<tr class=\"chrome\"><td class=\"center\" colspan=\"2\">";
|
||||||
s << "<a class=\"button\" href=\"" << webroot << "?cmd=" << HTTP_COMMAND_LOGLEVEL << "&level=none&token=" << token << "\">none</a>\r\n";
|
s << "<a class=\"button" << (loglevel == 0 ? " selected" : "")
|
||||||
s << "<a class=\"button\" href=\"" << webroot << "?cmd=" << HTTP_COMMAND_LOGLEVEL << "&level=error&token=" << token << "\">error</a>\r\n";
|
<< "\" href=\"" << webroot << "?cmd=" << HTTP_COMMAND_LOGLEVEL << "&level=none&token=" << token << "\">none</a>\r\n";
|
||||||
s << "<a class=\"button\" href=\"" << webroot << "?cmd=" << HTTP_COMMAND_LOGLEVEL << "&level=warn&token=" << token << "\">warn</a>\r\n";
|
s << "<a class=\"button" << (loglevel == 1 ? " selected" : "")
|
||||||
s << "<a class=\"button\" href=\"" << webroot << "?cmd=" << HTTP_COMMAND_LOGLEVEL << "&level=info&token=" << token << "\">info</a>\r\n";
|
<< "\" href=\"" << webroot << "?cmd=" << HTTP_COMMAND_LOGLEVEL << "&level=error&token=" << token << "\">error</a>\r\n";
|
||||||
s << "<a class=\"button\" href=\"" << webroot << "?cmd=" << HTTP_COMMAND_LOGLEVEL << "&level=debug&token=" << token << "\">debug</a></td></tr>\r\n";
|
s << "<a class=\"button" << (loglevel == 2 ? " selected" : "")
|
||||||
|
<< "\" href=\"" << webroot << "?cmd=" << HTTP_COMMAND_LOGLEVEL << "&level=warn&token=" << token << "\">warn</a>\r\n";
|
||||||
|
s << "<a class=\"button" << (loglevel == 3 ? " selected" : "")
|
||||||
|
<< "\" href=\"" << webroot << "?cmd=" << HTTP_COMMAND_LOGLEVEL << "&level=info&token=" << token << "\">info</a>\r\n";
|
||||||
|
s << "<a class=\"button" << (loglevel == 4 ? " selected" : "")
|
||||||
|
<< "\" href=\"" << webroot << "?cmd=" << HTTP_COMMAND_LOGLEVEL << "&level=debug&token=" << token << "\">debug</a>"
|
||||||
|
<< "</td></tr>\r\n";
|
||||||
|
|
||||||
if (i2p::context.AcceptsTunnels ()) {
|
if (i2p::context.AcceptsTunnels ()) {
|
||||||
uint16_t maxTunnels = GetMaxNumTransitTunnels ();
|
uint16_t maxTunnels = GetMaxNumTransitTunnels ();
|
||||||
|
|
|
@ -314,11 +314,15 @@ a.button:hover, a.button:focus {
|
||||||
background: var(--button_hover) !important;
|
background: var(--button_hover) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:active, a.button:active, .slide label:active, td.streamid:active {
|
button:active, a.button:active, .slide label:active, td.streamid:active, .button.selected {
|
||||||
box-shadow: var(--highlight), var(--active_shadow);
|
box-shadow: var(--highlight), var(--active_shadow);
|
||||||
background: var(--button_active) !important;
|
background: var(--button_active) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button.selected {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
.streamid:hover a {
|
.streamid:hover a {
|
||||||
color: var(--link_hover);
|
color: var(--link_hover);
|
||||||
}
|
}
|
||||||
|
@ -1459,6 +1463,11 @@ input[type=checkbox]:checked + label::after {
|
||||||
.note {
|
.note {
|
||||||
padding: 15px 90px !important;
|
padding: 15px 90px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button.selected {
|
||||||
|
padding-left: 16px;
|
||||||
|
background: var(--yes) no-repeat 10px center / 12px, var(--button_active) !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 1200px) and (min-height: 600px) {
|
@media screen and (min-width: 1200px) and (min-height: 600px) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue