added some client info (e.g. 2 clients w/ 2 1 hop tunnels each expiring in 8m)
This commit is contained in:
@ -1,5 +1,7 @@
|
|||||||
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 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 @@
|
|||||||
<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 />
|
||||||
|
Reference in New Issue
Block a user