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

Skip to content
Snippets Groups Projects
Commit ef0f1ca1 authored by jrandom's avatar jrandom Committed by zzz
Browse files

include a lil more eye candy on the console (how active each tunnel is and last test time)

parent 31ca34b9
No related branches found
No related tags found
No related merge requests found
...@@ -650,7 +650,7 @@ class TunnelPool { ...@@ -650,7 +650,7 @@ class TunnelPool {
out.write("</ul>\n".getBytes()); out.write("</ul>\n".getBytes());
} }
private final static void renderTunnel(OutputStream out, StringBuffer buf, TunnelId id, TunnelInfo tunnel) throws IOException { private final void renderTunnel(OutputStream out, StringBuffer buf, TunnelId id, TunnelInfo tunnel) throws IOException {
buf.setLength(0); buf.setLength(0);
if (tunnel == null) { if (tunnel == null) {
buf.append("<li>Tunnel: ").append(id.getTunnelId()).append(" is not known</li>\n"); buf.append("<li>Tunnel: ").append(id.getTunnelId()).append(" is not known</li>\n");
...@@ -658,6 +658,12 @@ class TunnelPool { ...@@ -658,6 +658,12 @@ class TunnelPool {
buf.append("<li>Tunnel: ").append(tunnel.getTunnelId()).append("</li><pre>"); buf.append("<li>Tunnel: ").append(tunnel.getTunnelId()).append("</li><pre>");
buf.append("\n\tStyle: ").append(getStyle(id)); buf.append("\n\tStyle: ").append(getStyle(id));
buf.append("\n\tReady? ").append(tunnel.getIsReady()); buf.append("\n\tReady? ").append(tunnel.getIsReady());
buf.append("\n\tMessages processed: ").append(tunnel.getMessagesProcessed());
long timeSinceTest = _context.clock().now() - tunnel.getLastTested();
if (timeSinceTest < 60*60*1000)
buf.append("\n\tLast tested: ").append(timeSinceTest/1000).append(" seconds ago");
else
buf.append("\n\tLast tested: never");
buf.append("\n\tDest? ").append(getDestination(tunnel)); buf.append("\n\tDest? ").append(getDestination(tunnel));
if (tunnel.getSettings() != null) if (tunnel.getSettings() != null)
buf.append("\n\tExpiration: ").append(new Date(tunnel.getSettings().getExpiration())); buf.append("\n\tExpiration: ").append(new Date(tunnel.getSettings().getExpiration()));
......
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