I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit ae89d2f2 authored by z3d's avatar z3d
Browse files

Rejig netdb.jsp into tables; sidepanel logo refresh.

parent 456ed0aa
No related branches found
No related tags found
No related merge requests found
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>DEBUG</title>
<html><head><title>I2P Router Console - Debug</title>
<%@include file="css.jsp" %>
</head><body>
<%@include file="summary.jsp" %>
<h1>Router SKM</h1>
<div class="main" id="main">
<%
/*
......@@ -15,7 +16,7 @@
/*
* Print out the status for all the SessionKeyManagers
*/
out.print("<h1>Router SKM</h1>");
ctx.sessionKeyManager().renderStatusHTML(out);
java.util.Set<net.i2p.data.Destination> clients = ctx.clientManager().listClients();
for (net.i2p.data.Destination dest : clients) {
......
......@@ -145,7 +145,7 @@ div.routersummary {
width: 185px;
color: inherit;
margin: 0;
padding: 7px 1px;
padding: 10px 1px 7px 1px;
text-align: center !important;
border: 5px solid #bbf;
font-size: 9pt;
......
installer/resources/themes/console/classic/images/i2plogo.png

6.35 KiB

installer/resources/themes/console/dark/i2plogo.png

11.2 KiB

installer/resources/themes/console/light/images/i2plogo.png

6.35 KiB | W: | H:

installer/resources/themes/console/light/images/i2plogo.png

11.7 KiB | W: | H:

installer/resources/themes/console/light/images/i2plogo.png
installer/resources/themes/console/light/images/i2plogo.png
installer/resources/themes/console/light/images/i2plogo.png
installer/resources/themes/console/light/images/i2plogo.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -998,7 +998,7 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
StringBuilder buf = new StringBuilder(size);
out.write("<h2>Network Database Contents (<a href=\"netdb.jsp?l=1\">View LeaseSets</a>)</h2>\n");
if (!_initialized) {
buf.append("<i>Not initialized</i>\n");
buf.append("Not initialized\n");
out.write(buf.toString());
out.flush();
return;
......@@ -1047,8 +1047,8 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
buf.append("<tr><th>Version</th><th>Count</th></tr>\n");
for (String routerVersion : versionList) {
int num = versions.count(routerVersion);
buf.append("<tr><td>").append(DataHelper.stripHTML(routerVersion));
buf.append("</td><td align=\"right\">").append(num).append("</td></tr>\n");
buf.append("<tr><td align=\"center\">").append(DataHelper.stripHTML(routerVersion));
buf.append("</td><td align=\"center\">").append(num).append("</td></tr>\n");
}
buf.append("</table>\n");
}
......@@ -1066,7 +1066,7 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
buf.append("<tr><td><img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase()).append("\"");
buf.append(" src=\"/flags.jsp?c=").append(country).append("\"> ");
buf.append(_context.commSystem().getCountryName(country));
buf.append("</td><td align=\"right\">").append(num).append("</td></tr>\n");
buf.append("</td><td align=\"center\">").append(num).append("</td></tr>\n");
}
buf.append("</table>\n");
}
......@@ -1081,21 +1081,22 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
*/
private void renderRouterInfo(StringBuilder buf, RouterInfo info, boolean isUs, boolean full) {
String hash = info.getIdentity().getHash().toBase64();
buf.append("<a name=\"").append(hash.substring(0, 6)).append("\" ></a>");
buf.append("<table><tr><th><a name=\"").append(hash.substring(0, 6)).append("\" ></a>");
if (isUs) {
buf.append("<a name=\"our-info\" ></a><b>Our info: ").append(hash).append("</b><br>\n");
buf.append("<a name=\"our-info\" ></a><b>Our info: ").append(hash).append("</b></th></tr><tr><td>\n");
} else {
buf.append("<b>Peer info for:</b> ").append(hash).append("<br>\n");
buf.append("<b>Peer info for:</b> ").append(hash).append("\n");
buf.append("[<a href=\"netdb.jsp?r=").append(hash.substring(0, 6)).append("\" >Full entry</a>]</th></tr><td>\n");
}
long age = _context.clock().now() - info.getPublished();
if (isUs && _context.router().isHidden())
buf.append("Hidden, Updated: <i>").append(DataHelper.formatDuration(age)).append(" ago</i><br>\n");
buf.append("<b>Hidden, Updated:</b> ").append(DataHelper.formatDuration(age)).append(" ago<br>\n");
else if (age > 0)
buf.append("Published: <i>").append(DataHelper.formatDuration(age)).append(" ago</i><br>\n");
buf.append("<b>Published:</b> ").append(DataHelper.formatDuration(age)).append(" ago<br>\n");
else
buf.append("Published: <i>in ").append(DataHelper.formatDuration(0-age)).append("???</i><br>\n");
buf.append("Address(es): <i>");
buf.append("<b>Published:</b> in ").append(DataHelper.formatDuration(0-age)).append("???<br>\n");
buf.append("<b>Address(es):</b> ");
String country = _context.commSystem().getCountry(info.getIdentity().getHash());
if(country != null) {
buf.append("<img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase()).append("\"");
......@@ -1110,19 +1111,18 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
buf.append('[').append(DataHelper.stripHTML(name)).append('=').append(DataHelper.stripHTML(val)).append("] ");
}
}
buf.append("</i><br>\n");
buf.append("</td></tr>\n");
if (full) {
buf.append("Stats: <br><i><code>\n");
buf.append("<tr><td>Stats: <br><code>\n");
for (Iterator iter = info.getOptions().keySet().iterator(); iter.hasNext(); ) {
String key = (String)iter.next();
String val = info.getOption(key);
buf.append(DataHelper.stripHTML(key)).append(" = ").append(DataHelper.stripHTML(val)).append("<br>\n");
}
buf.append("</code></i>\n");
buf.append("</code></td></tr>\n");
} else {
buf.append("<a href=\"netdb.jsp?r=").append(hash.substring(0, 6)).append("\" >Full entry</a>\n");
}
buf.append("<hr>\n");
buf.append("</td></tr>\n");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment