forked from I2P_Developers/i2p.i2p
Console: Debug page cleanups
Split sections into separate tabs Clean up VersionAvailable.toString() Don't limit height of DHT section
This commit is contained in:
@@ -1755,8 +1755,27 @@ public class ConsoleUpdateManager implements UpdateManager, RouterApp {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VersionAvailable \"" + version + "\" " + sourceMap +
|
||||
(constraint != null ? (" \"" + constraint + '"') : "");
|
||||
StringBuilder buf = new StringBuilder(128);
|
||||
buf.append("Version ").append(version).append(' ');
|
||||
for (Map.Entry<UpdateMethod, List<URI>> e : sourceMap.entrySet()) {
|
||||
buf.append(e.getKey());
|
||||
List<URI> u = e.getValue();
|
||||
if (u.isEmpty()) {
|
||||
buf.append(' ');
|
||||
} else {
|
||||
buf.append('=');
|
||||
if (u.size() > 1)
|
||||
buf.append('[');
|
||||
for (URI uri : u) {
|
||||
buf.append(uri).append(' ');
|
||||
}
|
||||
if (u.size() > 1)
|
||||
buf.append(']');
|
||||
}
|
||||
}
|
||||
if (constraint != null)
|
||||
buf.append(" \"").append(constraint).append('"');
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -16,12 +16,12 @@
|
||||
<div class="main" id="debug">
|
||||
|
||||
<div class="confignav">
|
||||
<span class="tab"><a href="#debug_portmapper">Port Mapper</a></span>
|
||||
<span class="tab"><a href="#appmanager">App Manager</a></span>
|
||||
<span class="tab"><a href="#updatemanager">Update Manager</a></span>
|
||||
<span class="tab"><a href="#skm">Router Session Key Manager</a></span>
|
||||
<span class="tab"><a href="#cskm0">Client Session Key Managers</a></span>
|
||||
<span class="tab"><a href="#dht">Router DHT</a></span>
|
||||
<span class="tab"><a href="/debug">Port Mapper</a></span>
|
||||
<span class="tab"><a href="/debug?d=1">App Manager</a></span>
|
||||
<span class="tab"><a href="/debug?d=2">Update Manager</a></span>
|
||||
<span class="tab"><a href="/debug?d=3">Router Session Key Manager</a></span>
|
||||
<span class="tab"><a href="/debug?d=4">Client Session Key Managers</a></span>
|
||||
<span class="tab"><a href="/debug?d=5">Router DHT</a></span>
|
||||
</div>
|
||||
|
||||
<%
|
||||
@@ -30,6 +30,9 @@
|
||||
*/
|
||||
net.i2p.router.RouterContext ctx = (net.i2p.router.RouterContext) net.i2p.I2PAppContext.getGlobalContext();
|
||||
|
||||
String dd = request.getParameter("d");
|
||||
if (dd == null || dd.equals("0")) {
|
||||
|
||||
/*
|
||||
* Print out the status for the PortMapper
|
||||
*/
|
||||
@@ -40,6 +43,8 @@
|
||||
*/
|
||||
net.i2p.util.InternalServerSocket.renderStatusHTML(out);
|
||||
|
||||
} else if (dd.equals("1")) {
|
||||
|
||||
/*
|
||||
* Print out the status for the AppManager
|
||||
*/
|
||||
@@ -48,6 +53,7 @@
|
||||
ctx.routerAppManager().renderStatusHTML(out);
|
||||
out.print("</div>");
|
||||
|
||||
} else if (dd.equals("2")) {
|
||||
|
||||
/*
|
||||
* Print out the status for the UpdateManager
|
||||
@@ -63,14 +69,20 @@
|
||||
out.print("</div>");
|
||||
}
|
||||
|
||||
} else if (dd.equals("3")) {
|
||||
|
||||
/*
|
||||
* Print out the status for all the SessionKeyManagers
|
||||
*/
|
||||
out.print("<div class=\"debug_section\" id=\"skm\">");
|
||||
out.print("<h2>Router Session Key Manager</h2>");
|
||||
ctx.sessionKeyManager().renderStatusHTML(out);
|
||||
java.util.Set<net.i2p.data.Destination> clients = ctx.clientManager().listClients();
|
||||
out.print("</div>");
|
||||
|
||||
} else if (dd.equals("4")) {
|
||||
|
||||
out.print("<h2>Client Session Key Managers</h2>");
|
||||
java.util.Set<net.i2p.data.Destination> clients = ctx.clientManager().listClients();
|
||||
int i = 0;
|
||||
for (net.i2p.data.Destination dest : clients) {
|
||||
net.i2p.data.Hash h = dest.calculateHash();
|
||||
@@ -92,6 +104,7 @@
|
||||
out.print("</div>");
|
||||
}
|
||||
}
|
||||
} else if (dd.equals("5")) {
|
||||
|
||||
/*
|
||||
* Print out the status for the NetDB
|
||||
@@ -99,5 +112,7 @@
|
||||
out.print("<h2 id=\"dht\">Router DHT</h2>");
|
||||
ctx.netDb().renderStatusHTML(out);
|
||||
|
||||
}
|
||||
|
||||
%>
|
||||
</div></body></html>
|
||||
|
@@ -7563,7 +7563,6 @@ b.netdb_transport {
|
||||
word-break: break-all;
|
||||
margin-bottom: 5px;
|
||||
padding-bottom: 0;
|
||||
max-height: 600px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user