2009-10-19 13:49:47 +00:00
|
|
|
package net.i2p.router.web;
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.Writer;
|
|
|
|
|
|
|
|
import net.i2p.router.RouterContext;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Refactored from summarynoframe.jsp to save ~100KB
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public class SummaryBarRenderer {
|
|
|
|
private RouterContext _context;
|
|
|
|
private SummaryHelper _helper;
|
|
|
|
|
|
|
|
public SummaryBarRenderer(RouterContext context, SummaryHelper helper) {
|
|
|
|
_context = context;
|
|
|
|
_helper = helper;
|
|
|
|
}
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
/**
|
|
|
|
* Note - ensure all links in here are absolute, as the summary bar may be displayed
|
|
|
|
* on lower-level directory errors.
|
|
|
|
*/
|
2009-10-19 13:49:47 +00:00
|
|
|
public void renderSummaryHTML(Writer out) throws IOException {
|
|
|
|
StringBuilder buf = new StringBuilder(8*1024);
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
buf.append("<a href=\"/index.jsp\" target=\"_top\"><img src=\"/themes/console/images/i2plogo.png\" alt=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("I2P Router Console"))
|
|
|
|
.append("\" title=\"")
|
|
|
|
.append(_("I2P Router Console"))
|
|
|
|
.append("\"></a><hr>");
|
|
|
|
|
|
|
|
File lpath = new File(_context.getBaseDir(), "docs/toolbar.html");
|
|
|
|
// you better have target="_top" for the links in there...
|
|
|
|
if (lpath.exists()) {
|
|
|
|
ContentHelper linkhelper = new ContentHelper();
|
|
|
|
linkhelper.setPage(lpath.getAbsolutePath());
|
|
|
|
linkhelper.setMaxLines("100");
|
|
|
|
buf.append(linkhelper.getContent());
|
|
|
|
} else {
|
|
|
|
buf.append("<h3><a href=\"/configclients.jsp\" target=\"_top\" title=\"")
|
2009-10-29 23:22:51 +00:00
|
|
|
.append(_("Configure startup of clients and webapps (services); manually start dormant services"))
|
2009-10-19 13:49:47 +00:00
|
|
|
.append("\">")
|
|
|
|
.append(_("I2P Services"))
|
|
|
|
.append("</a></h3>\n" +
|
|
|
|
|
|
|
|
"<hr><table>" +
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
"<tr><td><a href=\"/susidns/index.jsp\" target=\"_blank\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("Manage your I2P hosts file here (I2P domain name resolution)"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("Addressbook"))
|
|
|
|
.append("</a>\n" +
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
"<a href=\"/i2psnark/\" target=\"_blank\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("Built-in anonymous BitTorrent Client"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("Torrents"))
|
|
|
|
.append("</a>\n" +
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
"<a href=\"/susimail/susimail\" target=\"blank\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("Anonymous webmail client"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("Webmail"))
|
|
|
|
.append("</a>\n" +
|
|
|
|
|
|
|
|
"<a href=\"http://127.0.0.1:7658/\" target=\"_blank\" title=\"")
|
|
|
|
.append(_("Anonymous resident webserver"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("Webserver"))
|
2010-02-07 19:01:06 +00:00
|
|
|
.append("</a>")
|
|
|
|
|
|
|
|
.append(NavHelper.getClientAppLinks(_context))
|
|
|
|
|
|
|
|
.append("</td></tr></table>\n" +
|
2009-10-19 13:49:47 +00:00
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
"<hr><h3><a href=\"/config.jsp\" target=\"_top\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("Configure I2P Router"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("I2P Internals"))
|
|
|
|
.append("</a></h3><hr>\n" +
|
|
|
|
|
|
|
|
"<table><tr><td>\n" +
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
"<a href=\"/tunnels.jsp\" target=\"_top\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("View existing tunnels and tunnel build status"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("Tunnels"))
|
|
|
|
.append("</a>\n" +
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
"<a href=\"/peers.jsp\" target=\"_top\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("Show all current peer connections"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("Peers"))
|
|
|
|
.append("</a>\n" +
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
"<a href=\"/profiles.jsp\" target=\"_top\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("Show recent peer performance profiles"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("Profiles"))
|
|
|
|
.append("</a>\n" +
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
"<a href=\"/netdb.jsp\" target=\"_top\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("Show list of all known I2P routers"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("NetDB"))
|
|
|
|
.append("</a>\n" +
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
"<a href=\"/logs.jsp\" target=\"_top\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("Health Report"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("Logs"))
|
|
|
|
.append("</a>\n" +
|
|
|
|
|
2010-02-26 16:47:41 +00:00
|
|
|
// "<a href=\"/jobs.jsp\" target=\"_top\" title=\"")
|
|
|
|
// .append(_("Show the router's workload, and how it's performing"))
|
|
|
|
// .append("\">")
|
|
|
|
// .append(_("Jobs"))
|
|
|
|
// .append("</a>\n" +
|
2009-10-19 13:49:47 +00:00
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
"<a href=\"/graphs.jsp\" target=\"_top\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("Graph router performance"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("Graphs"))
|
|
|
|
.append("</a>\n" +
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
"<a href=\"/stats.jsp\" target=\"_top\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("Textual router performance statistics"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("Stats"))
|
2010-01-06 14:52:53 +00:00
|
|
|
.append("</a>\n" +
|
|
|
|
|
|
|
|
"<a href=\"/i2ptunnel/index.jsp\" target=\"_blank\" title=\"")
|
|
|
|
.append(_("Local Destinations"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("I2PTunnel"))
|
|
|
|
|
2009-10-19 13:49:47 +00:00
|
|
|
.append("</a></td></tr></table>\n");
|
|
|
|
|
|
|
|
out.write(buf.toString());
|
|
|
|
buf.setLength(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
buf.append("<hr><h3><a href=\"/help.jsp\" target=\"_top\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("I2P Router Help"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("General"))
|
|
|
|
.append("</a></h3><hr>" +
|
|
|
|
"<h4><a title=\"")
|
|
|
|
.append(_("Your unique I2P router identity is"))
|
|
|
|
.append(' ')
|
|
|
|
.append(_helper.getIdent())
|
|
|
|
.append(", ")
|
|
|
|
.append(_("never reveal it to anyone"))
|
2009-12-11 19:03:30 +00:00
|
|
|
.append("\" href=\"/netdb.jsp?r=.\" target=\"_top\">")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("Local Identity"))
|
2009-10-31 04:09:25 +00:00
|
|
|
.append("</a></h4><hr>\n" +
|
2009-10-19 13:49:47 +00:00
|
|
|
|
|
|
|
"<table><tr><td align=\"left\">" +
|
|
|
|
"<b>")
|
|
|
|
.append(_("Version"))
|
|
|
|
.append(":</b></td>" +
|
|
|
|
"<td align=\"right\">")
|
|
|
|
.append(_helper.getVersion())
|
|
|
|
.append("</td></tr>\n" +
|
|
|
|
|
|
|
|
"<tr title=\"")
|
|
|
|
.append(_("How long we've been running for this session"))
|
|
|
|
.append("\">" +
|
|
|
|
"<td align=\"left\"><b>")
|
|
|
|
.append(_("Uptime"))
|
|
|
|
.append(":</b></td>" +
|
|
|
|
"<td align=\"right\">")
|
|
|
|
.append(_helper.getUptime())
|
|
|
|
.append("</td></tr></table>\n" +
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
"<hr><h4><a href=\"/config.jsp#help\" target=\"_top\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("Help with configuring your firewall and router for optimal I2P performance"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_helper.getReachability())
|
|
|
|
.append("</a></h4><hr>\n");
|
|
|
|
|
|
|
|
|
2010-02-19 14:42:43 +00:00
|
|
|
// display all the time so we display the final failure message, and plugin update messages too
|
|
|
|
buf.append(UpdateHandler.getStatus());
|
2009-10-19 13:49:47 +00:00
|
|
|
if (_helper.updateAvailable() || _helper.unsignedUpdateAvailable()) {
|
2010-02-06 20:25:13 +00:00
|
|
|
if ("true".equals(System.getProperty(UpdateHandler.PROP_UPDATE_IN_PROGRESS))) {
|
2009-10-19 13:49:47 +00:00
|
|
|
// nothing
|
|
|
|
} else if(
|
|
|
|
// isDone() is always false for now, see UpdateHandler
|
|
|
|
// ((!update.isDone()) &&
|
|
|
|
_helper.getAction() == null &&
|
|
|
|
_helper.getUpdateNonce() == null &&
|
|
|
|
ConfigRestartBean.getRestartTimeRemaining() > 12*60*1000) {
|
|
|
|
long nonce = _context.random().nextLong();
|
|
|
|
String prev = System.getProperty("net.i2p.router.web.UpdateHandler.nonce");
|
|
|
|
if (prev != null)
|
|
|
|
System.setProperty("net.i2p.router.web.UpdateHandler.noncePrev", prev);
|
|
|
|
System.setProperty("net.i2p.router.web.UpdateHandler.nonce", nonce+"");
|
|
|
|
String uri = _helper.getRequestURI();
|
2009-12-17 14:02:02 +00:00
|
|
|
buf.append("<p><form action=\"").append(uri).append("\" method=\"GET\">\n");
|
2009-10-19 13:49:47 +00:00
|
|
|
buf.append("<input type=\"hidden\" name=\"updateNonce\" value=\"").append(nonce).append("\" >\n");
|
|
|
|
if (_helper.updateAvailable()) {
|
|
|
|
buf.append("<button type=\"submit\" name=\"updateAction\" value=\"signed\" >")
|
|
|
|
.append(_("Download"))
|
|
|
|
.append(' ')
|
|
|
|
.append(_helper.getUpdateVersion())
|
|
|
|
.append(' ')
|
|
|
|
.append(_("Update"))
|
|
|
|
.append("</button>\n");
|
|
|
|
}
|
|
|
|
if (_helper.unsignedUpdateAvailable()) {
|
|
|
|
buf.append("<button type=\"submit\" name=\"updateAction\" value=\"Unsigned\" >")
|
|
|
|
.append(_("Download Unsigned"))
|
|
|
|
.append("<br>")
|
|
|
|
.append(_("Update"))
|
2009-10-22 22:25:53 +00:00
|
|
|
.append(' ')
|
|
|
|
.append(_helper.getUnsignedUpdateVersion())
|
2009-10-19 13:49:47 +00:00
|
|
|
.append("</button>\n");
|
|
|
|
}
|
|
|
|
buf.append("</form>\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
buf.append("<p>")
|
|
|
|
.append(ConfigRestartBean.renderStatus(_helper.getRequestURI(), _helper.getAction(), _helper.getConsoleNonce()))
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
.append("</p><hr><h3><a href=\"/peers.jsp\" target=\"_top\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("Show all current peer connections"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("Peers"))
|
|
|
|
.append("</a></h3><hr>\n" +
|
|
|
|
|
|
|
|
"<table>\n" +
|
|
|
|
|
|
|
|
"<tr><td align=\"left\"><b>")
|
|
|
|
.append(_("Active"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
|
|
|
.append(_helper.getActivePeers())
|
2010-05-10 14:22:37 +00:00
|
|
|
.append(" / ")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_helper.getActiveProfiles())
|
|
|
|
.append("</td></tr>\n" +
|
|
|
|
|
|
|
|
"<tr><td align=\"left\"><b>")
|
|
|
|
.append(_("Fast"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
|
|
|
.append(_helper.getFastPeers())
|
|
|
|
.append("</td></tr>\n" +
|
|
|
|
|
|
|
|
"<tr><td align=\"left\"><b>")
|
|
|
|
.append(_("High capacity"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
|
|
|
.append(_helper.getHighCapacityPeers())
|
|
|
|
.append("</td></tr>\n" +
|
|
|
|
|
|
|
|
"<tr><td align=\"left\"><b>")
|
|
|
|
.append(_("Integrated"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
|
|
|
.append(_helper.getWellIntegratedPeers())
|
|
|
|
.append("</td></tr>\n" +
|
|
|
|
|
|
|
|
"<tr><td align=\"left\"><b>")
|
|
|
|
.append(_("Known"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
|
|
|
.append(_helper.getAllPeers())
|
|
|
|
.append("</td></tr>\n" +
|
|
|
|
|
|
|
|
"</table><hr>\n");
|
|
|
|
|
|
|
|
|
|
|
|
out.write(buf.toString());
|
|
|
|
buf.setLength(0);
|
|
|
|
|
|
|
|
|
2009-10-19 21:40:14 +00:00
|
|
|
boolean anotherLine = false;
|
2009-10-19 13:49:47 +00:00
|
|
|
if (_helper.showFirewallWarning()) {
|
2009-12-11 19:03:30 +00:00
|
|
|
buf.append("<h4><a href=\"/config.jsp\" target=\"_top\" title=\"")
|
2009-10-19 13:49:47 +00:00
|
|
|
.append(_("Help with firewall configuration"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("Check NAT/firewall"))
|
|
|
|
.append("</a></h4>");
|
2009-10-19 21:40:14 +00:00
|
|
|
anotherLine = true;
|
2009-10-19 13:49:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
boolean reseedInProgress = Boolean.valueOf(System.getProperty("net.i2p.router.web.ReseedHandler.reseedInProgress")).booleanValue();
|
|
|
|
// If showing the reseed link is allowed
|
|
|
|
if (_helper.allowReseed()) {
|
|
|
|
if (reseedInProgress) {
|
|
|
|
// While reseed occurring, show status message instead
|
|
|
|
buf.append("<i>").append(System.getProperty("net.i2p.router.web.ReseedHandler.statusMessage","")).append("</i><br>");
|
|
|
|
} else {
|
|
|
|
// While no reseed occurring, show reseed link
|
|
|
|
long nonce = _context.random().nextLong();
|
|
|
|
String prev = System.getProperty("net.i2p.router.web.ReseedHandler.nonce");
|
|
|
|
if (prev != null) System.setProperty("net.i2p.router.web.ReseedHandler.noncePrev", prev);
|
|
|
|
System.setProperty("net.i2p.router.web.ReseedHandler.nonce", nonce+"");
|
|
|
|
String uri = _helper.getRequestURI();
|
2009-10-31 18:18:36 +00:00
|
|
|
buf.append("<p><form action=\"").append(uri).append("\" method=\"GET\">\n");
|
2009-10-19 13:49:47 +00:00
|
|
|
buf.append("<input type=\"hidden\" name=\"reseedNonce\" value=\"").append(nonce).append("\" >\n");
|
2009-10-31 18:18:36 +00:00
|
|
|
buf.append("<button type=\"submit\" value=\"Reseed\" >").append(_("Reseed")).append("</button></form></p>\n");
|
2009-10-19 13:49:47 +00:00
|
|
|
}
|
2009-10-19 21:40:14 +00:00
|
|
|
anotherLine = true;
|
2009-10-19 13:49:47 +00:00
|
|
|
}
|
|
|
|
// If a new reseed ain't running, and the last reseed had errors, show error message
|
|
|
|
if (!reseedInProgress) {
|
|
|
|
String reseedErrorMessage = System.getProperty("net.i2p.router.web.ReseedHandler.errorMessage","");
|
|
|
|
if (reseedErrorMessage.length() > 0) {
|
|
|
|
buf.append("<i>").append(reseedErrorMessage).append("</i><br>");
|
2009-10-19 21:40:14 +00:00
|
|
|
anotherLine = true;
|
2009-10-19 13:49:47 +00:00
|
|
|
}
|
|
|
|
}
|
2009-10-19 21:40:14 +00:00
|
|
|
if (anotherLine)
|
|
|
|
buf.append("<hr>");
|
2009-10-19 13:49:47 +00:00
|
|
|
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
buf.append("<h3><a href=\"/config.jsp\" title=\"")
|
2009-10-19 21:40:14 +00:00
|
|
|
.append(_("Configure router bandwidth allocation"))
|
|
|
|
.append("\" target=\"_top\">")
|
|
|
|
.append(_("Bandwidth in/out"))
|
|
|
|
.append("</a></h3><hr>" +
|
|
|
|
"<table>\n" +
|
|
|
|
|
|
|
|
"<tr><td align=\"left\"><b>1s:</b></td><td align=\"right\">")
|
2010-05-10 14:22:37 +00:00
|
|
|
.append(_helper.getSecondKBps())
|
|
|
|
.append("Bps</td></tr>\n");
|
2009-10-19 21:40:14 +00:00
|
|
|
|
2010-05-10 14:22:37 +00:00
|
|
|
if (_context.router().getUptime() > 6*60*1000) {
|
|
|
|
buf.append("<tr><td align=\"left\"><b>5m:</b></td><td align=\"right\">")
|
|
|
|
.append(_helper.getFiveMinuteKBps())
|
|
|
|
.append("Bps</td></tr>\n");
|
|
|
|
}
|
2009-10-19 21:40:14 +00:00
|
|
|
|
2010-05-10 14:22:37 +00:00
|
|
|
if (_context.router().getUptime() > 2*60*1000) {
|
|
|
|
buf.append("<tr><td align=\"left\"><b>")
|
2009-10-19 21:40:14 +00:00
|
|
|
.append(_("Total"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
2010-05-10 14:22:37 +00:00
|
|
|
.append(_helper.getLifetimeKBps())
|
|
|
|
.append("Bps</td></tr>\n");
|
|
|
|
}
|
2009-10-19 21:40:14 +00:00
|
|
|
|
2010-05-10 14:22:37 +00:00
|
|
|
buf.append("<tr><td align=\"left\"><b>")
|
2009-10-19 21:40:14 +00:00
|
|
|
.append(_("Used"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
|
|
|
.append(_helper.getInboundTransferred())
|
2010-05-10 14:22:37 +00:00
|
|
|
.append(" / ")
|
2009-10-19 21:40:14 +00:00
|
|
|
.append(_helper.getOutboundTransferred())
|
|
|
|
.append("</td></tr></table>\n" +
|
|
|
|
|
2009-12-11 19:03:30 +00:00
|
|
|
"<hr><h3><a href=\"/tunnels.jsp\" target=\"_top\" title=\"")
|
2009-10-19 21:40:14 +00:00
|
|
|
.append(_("View existing tunnels and tunnel build status"))
|
|
|
|
.append("\">")
|
2010-05-10 14:22:37 +00:00
|
|
|
.append(_("Tunnels"))
|
2009-10-19 21:40:14 +00:00
|
|
|
.append("</a></h3><hr>" +
|
|
|
|
"<table>\n" +
|
|
|
|
|
|
|
|
"<tr><td align=\"left\"><b>")
|
|
|
|
.append(_("Exploratory"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
2010-05-10 14:22:37 +00:00
|
|
|
.append(_helper.getInboundTunnels() + _helper.getOutboundTunnels())
|
2009-10-19 21:40:14 +00:00
|
|
|
.append("</td></tr>\n" +
|
|
|
|
|
|
|
|
"<tr><td align=\"left\"><b>")
|
|
|
|
.append(_("Client"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
2010-05-10 14:22:37 +00:00
|
|
|
.append(_helper.getInboundClientTunnels() + _helper.getOutboundClientTunnels())
|
2009-10-19 21:40:14 +00:00
|
|
|
.append("</td></tr>\n" +
|
|
|
|
|
|
|
|
"<tr><td align=\"left\"><b>")
|
|
|
|
.append(_("Participating"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
|
|
|
.append(_helper.getParticipatingTunnels())
|
2010-01-18 14:57:03 +00:00
|
|
|
.append("</td></tr>\n" +
|
|
|
|
|
|
|
|
"<tr><td align=\"left\"><b>")
|
|
|
|
.append(_("Share ratio"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
|
|
|
.append(_helper.getShareRatio())
|
2009-10-19 21:40:14 +00:00
|
|
|
.append("</td></tr>\n" +
|
|
|
|
|
|
|
|
"</table><hr><h3><a href=\"/jobs.jsp\" target=\"_top\" title=\"")
|
|
|
|
.append(_("What's in the router's job queue?"))
|
|
|
|
.append("\">")
|
|
|
|
.append(_("Congestion"))
|
|
|
|
.append("</a></h3><hr>" +
|
|
|
|
"<table>\n" +
|
|
|
|
|
|
|
|
"<tr><td align=\"left\"><b>")
|
|
|
|
.append(_("Job lag"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
|
|
|
.append(_helper.getJobLag())
|
|
|
|
.append("</td></tr>\n" +
|
|
|
|
|
|
|
|
"<tr><td align=\"left\"><b>")
|
|
|
|
.append(_("Message delay"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
|
|
|
.append(_helper.getMessageDelay())
|
|
|
|
.append("</td></tr>\n" +
|
|
|
|
|
|
|
|
"<tr><td align=\"left\"><b>")
|
|
|
|
.append(_("Tunnel lag"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
|
|
|
.append(_helper.getTunnelLag())
|
|
|
|
.append("</td></tr>\n" +
|
|
|
|
|
|
|
|
"<tr><td align=\"left\"><b>")
|
|
|
|
.append(_("Backlog"))
|
|
|
|
.append(":</b></td><td align=\"right\">")
|
|
|
|
.append(_helper.getInboundBacklog())
|
|
|
|
.append("</td></tr>\n" +
|
|
|
|
|
|
|
|
"</table><hr><h4>")
|
2009-11-09 17:15:19 +00:00
|
|
|
.append(_(_helper.getTunnelStatus()))
|
2009-10-19 21:40:14 +00:00
|
|
|
.append("</h4><hr>\n")
|
|
|
|
.append(_helper.getDestinations());
|
2009-10-19 13:49:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
out.write(buf.toString());
|
|
|
|
}
|
|
|
|
|
|
|
|
/** translate a string */
|
|
|
|
private String _(String s) {
|
|
|
|
return Messages.getString(s, _context);
|
|
|
|
}
|
|
|
|
}
|