forked from I2P_Developers/i2p.i2p
/debug:
- Add container divs and styling markup - Add top navigation menu
This commit is contained in:
@@ -15,15 +15,39 @@
|
||||
<%@include file="summary.jsi" %>
|
||||
<h1>Router Debug</h1>
|
||||
<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">Session Key Manager</a></span>
|
||||
<span class="tab"><a href="#dht">Router DHT</a></span>
|
||||
</div>
|
||||
|
||||
<%
|
||||
/*
|
||||
* Quick and easy place to put debugging stuff
|
||||
*/
|
||||
net.i2p.router.RouterContext ctx = (net.i2p.router.RouterContext) net.i2p.I2PAppContext.getGlobalContext();
|
||||
|
||||
/*
|
||||
* Print out the status for the PortMapper
|
||||
*/
|
||||
ctx.portMapper().renderStatusHTML(out);
|
||||
|
||||
/*
|
||||
* Print out the status for the AppManager
|
||||
*/
|
||||
|
||||
out.print("<div class=\"debug_section\" id=\"appmanager\">");
|
||||
ctx.routerAppManager().renderStatusHTML(out);
|
||||
out.print("</div>");
|
||||
|
||||
|
||||
/*
|
||||
* Print out the status for the UpdateManager
|
||||
*/
|
||||
out.print("<div class=\"debug_section\" id=\"updatemanager\">");
|
||||
net.i2p.app.ClientAppManager cmgr = ctx.clientAppManager();
|
||||
if (cmgr != null) {
|
||||
net.i2p.router.update.ConsoleUpdateManager umgr =
|
||||
@@ -31,37 +55,32 @@
|
||||
if (umgr != null) {
|
||||
umgr.renderStatusHTML(out);
|
||||
}
|
||||
out.print("</div>");
|
||||
}
|
||||
|
||||
/*
|
||||
* Print out the status for the AppManager
|
||||
*/
|
||||
ctx.routerAppManager().renderStatusHTML(out);
|
||||
|
||||
/*
|
||||
* Print out the status for the PortMapper
|
||||
*/
|
||||
ctx.portMapper().renderStatusHTML(out);
|
||||
|
||||
/*
|
||||
* Print out the status for all the SessionKeyManagers
|
||||
*/
|
||||
out.print("<h2>Router SKM</h2>");
|
||||
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>");
|
||||
for (net.i2p.data.Destination dest : clients) {
|
||||
net.i2p.data.Hash h = dest.calculateHash();
|
||||
net.i2p.crypto.SessionKeyManager skm = ctx.clientManager().getClientSessionKeyManager(h);
|
||||
if (skm != null) {
|
||||
out.print("<h2>" + h.toBase64().substring(0,6) + " SKM</h2>");
|
||||
out.print("<div class=\"debug_section\">");
|
||||
out.print("<h2>" + h.toBase64().substring(0,6) + " Session Key Manager</h2>");
|
||||
skm.renderStatusHTML(out);
|
||||
out.print("</div>");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Print out the status for the NetDB
|
||||
*/
|
||||
out.print("<h2>Router DHT</h2>");
|
||||
out.print("<h2 id=\"dht\">Router DHT</h2>");
|
||||
ctx.netDb().renderStatusHTML(out);
|
||||
|
||||
%>
|
||||
|
Reference in New Issue
Block a user