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

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

added some client info (e.g. 2 clients w/ 2 1 hop tunnels each expiring in 8m)

parent fd2a4029
No related branches found
No related tags found
No related merge requests found
package net.i2p.router.web; package net.i2p.router.web;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import net.i2p.data.DataHelper; import net.i2p.data.DataHelper;
...@@ -301,11 +303,25 @@ public class SummaryHelper { ...@@ -301,11 +303,25 @@ public class SummaryHelper {
} }
} }
/**
* How many client destinations are connected locally.
*
* @return html section summary
*/
public String getDestinations() {
ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
try {
_context.clientManager().renderStatusHTML(baos);
return new String(baos.toByteArray());
} catch (IOException ioe) {
_context.logManager().getLog(SummaryHelper.class).error("Error rendering client info", ioe);
return "";
}
}
/** /**
* How many free inbound tunnels we have. * How many free inbound tunnels we have.
* *
* @param contextId begging few characters of the routerHash, or null to pick
* the first one we come across.
*/ */
public int getInboundTunnels() { public int getInboundTunnels() {
if (_context == null) if (_context == null)
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
<b>Used:</b> <jsp:getProperty name="helper" property="inboundTransferred" />/<jsp:getProperty name="helper" property="outboundTransferred" /><br /> <b>Used:</b> <jsp:getProperty name="helper" property="inboundTransferred" />/<jsp:getProperty name="helper" property="outboundTransferred" /><br />
<hr /> <hr />
<jsp:getProperty name="helper" property="destinations" />
<u><b>Tunnels</b></u><br /> <u><b>Tunnels</b></u><br />
<b>Inbound:</b> <jsp:getProperty name="helper" property="inboundTunnels" /><br /> <b>Inbound:</b> <jsp:getProperty name="helper" property="inboundTunnels" /><br />
<b>Outbound:</b> <jsp:getProperty name="helper" property="outboundTunnels" /><br /> <b>Outbound:</b> <jsp:getProperty name="helper" property="outboundTunnels" /><br />
......
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