Remove redundant html markup and refashion table display a la fois.
This commit is contained in:
@ -97,7 +97,7 @@ public class I2PSnarkServlet extends HttpServlet {
|
||||
out.write("<a href=\"" + baseURL + "\" class=\"snarkRefresh\" target=\"_blank\">" + name + "</a>");
|
||||
}
|
||||
out.write("</div>\n");
|
||||
out.write("<div class=\"mainsection\"><div class=\"snarkMessages\"><table><tr><td valign=\"top\" align=\"left\"><pre>");
|
||||
out.write("<div class=\"mainsection\"><div class=\"snarkMessages\"><table><tr><td align=\"left\"><pre>");
|
||||
List msgs = _manager.getMessages();
|
||||
for (int i = msgs.size()-1; i >= 0; i--) {
|
||||
String msg = (String)msgs.get(i);
|
||||
@ -115,7 +115,7 @@ public class I2PSnarkServlet extends HttpServlet {
|
||||
out.write("(<a href=\"" + req.getRequestURI() + "?p=1" + "\">Show Peers</a>)<br />\n");
|
||||
}
|
||||
out.write(TABLE_HEADER2);
|
||||
out.write("<th align=\"left\" valign=\"top\">");
|
||||
out.write("<th align=\"left\">");
|
||||
if (_manager.util().connected())
|
||||
out.write("<a href=\"" + uri + "?action=StopAll&nonce=" + _nonce +
|
||||
"\" title=\"Stop all torrents and the i2p tunnel\">Stop All</a>");
|
||||
@ -135,12 +135,12 @@ public class I2PSnarkServlet extends HttpServlet {
|
||||
out.write(TABLE_EMPTY);
|
||||
} else if (snarks.size() > 1) {
|
||||
out.write("<tfoot><tr>\n" +
|
||||
" <th align=\"left\" valign=\"top\" colspan=\"2\">Totals (" + snarks.size() + " torrents, " + stats[4] + " connected peers)</th>\n" +
|
||||
" <th align=\"left\" colspan=\"2\">Totals (" + snarks.size() + " torrents, " + stats[4] + " connected peers)</th>\n" +
|
||||
" <th> </th>\n" +
|
||||
" <th align=\"right\" valign=\"top\">" + formatSize(stats[0]) + "</th>\n" +
|
||||
" <th align=\"right\" valign=\"top\">" + formatSize(stats[1]) + "</th>\n" +
|
||||
" <th align=\"right\" valign=\"top\">" + formatSize(stats[2]) + "ps</th>\n" +
|
||||
" <th align=\"right\" valign=\"top\">" + formatSize(stats[3]) + "ps</th>\n" +
|
||||
" <th align=\"right\">" + formatSize(stats[0]) + "</th>\n" +
|
||||
" <th align=\"right\">" + formatSize(stats[1]) + "</th>\n" +
|
||||
" <th align=\"right\">" + formatSize(stats[2]) + "ps</th>\n" +
|
||||
" <th align=\"right\">" + formatSize(stats[3]) + "ps</th>\n" +
|
||||
" <th> </th></tr>\n" +
|
||||
"</tfoot>\n");
|
||||
}
|
||||
@ -486,9 +486,9 @@ public class I2PSnarkServlet extends HttpServlet {
|
||||
|
||||
String rowClass = (row % 2 == 0 ? "snarkTorrentEven" : "snarkTorrentOdd");
|
||||
out.write("<tr class=\"" + rowClass + "\">");
|
||||
out.write("<td valign=\"top\" align=\"left\" class=\"snarkTorrentStatus " + rowClass + "\">");
|
||||
out.write("<td align=\"left\" class=\"snarkTorrentStatus " + rowClass + "\">");
|
||||
out.write(statusString + "</td>\n\t");
|
||||
out.write("<td valign=\"top\" align=\"left\" class=\"snarkTorrentName " + rowClass + "\">");
|
||||
out.write("<td align=\"left\" class=\"snarkTorrentName " + rowClass + "\">");
|
||||
|
||||
if (remaining == 0)
|
||||
out.write("<a href=\"" + _manager.linkPrefix() + snark.meta.getName()
|
||||
@ -520,27 +520,27 @@ public class I2PSnarkServlet extends HttpServlet {
|
||||
}
|
||||
out.write("</td>\n\t");
|
||||
|
||||
out.write("<td valign=\"top\" align=\"right\" class=\"snarkTorrentETA " + rowClass + "\">");
|
||||
out.write("<td align=\"right\" class=\"snarkTorrentETA " + rowClass + "\">");
|
||||
if(isRunning && remainingSeconds > 0)
|
||||
out.write(DataHelper.formatDuration(remainingSeconds*1000)); // (eta 6h)
|
||||
out.write("</td>\n\t");
|
||||
out.write("<td valign=\"top\" align=\"right\" class=\"snarkTorrentDownloaded " + rowClass + "\">");
|
||||
out.write("<td align=\"right\" class=\"snarkTorrentDownloaded " + rowClass + "\">");
|
||||
if (remaining > 0)
|
||||
out.write(formatSize(total-remaining) + "/" + formatSize(total)); // 18MB/3GB
|
||||
else
|
||||
out.write(formatSize(total)); // 3GB
|
||||
out.write("</td>\n\t");
|
||||
out.write("<td valign=\"top\" align=\"right\" class=\"snarkTorrentUploaded " + rowClass
|
||||
out.write("<td align=\"right\" class=\"snarkTorrentUploaded " + rowClass
|
||||
+ "\">" + formatSize(uploaded) + "</td>\n\t");
|
||||
out.write("<td valign=\"top\" align=\"right\" class=\"snarkTorrentRate\">");
|
||||
out.write("<td align=\"right\" class=\"snarkTorrentRate\">");
|
||||
if(isRunning && remaining > 0)
|
||||
out.write(formatSize(downBps) + "ps");
|
||||
out.write("</td>\n\t");
|
||||
out.write("<td valign=\"top\" align=\"right\" class=\"snarkTorrentRate\">");
|
||||
out.write("<td align=\"right\" class=\"snarkTorrentRate\">");
|
||||
if(isRunning)
|
||||
out.write(formatSize(upBps) + "ps");
|
||||
out.write("</td>\n\t");
|
||||
out.write("<td valign=\"top\" align=\"left\" class=\"snarkTorrentAction " + rowClass + "\">");
|
||||
out.write("<td align=\"left\" class=\"snarkTorrentAction " + rowClass + "\">");
|
||||
String parameters = "&nonce=" + _nonce + "&torrent=" + Base64.encode(snark.meta.getInfoHash());
|
||||
if (showPeers)
|
||||
parameters = parameters + "&p=1";
|
||||
@ -567,7 +567,7 @@ public class I2PSnarkServlet extends HttpServlet {
|
||||
out.write("<tr class=\"" + rowClass + "\">");
|
||||
out.write("<td class=\"snarkTorrentStatus " + rowClass + "\">");
|
||||
out.write("</td>\n\t");
|
||||
out.write("<td valign=\"top\" align=\"right\" class=\"snarkTorrentStatus " + rowClass + "\">");
|
||||
out.write("<td align=\"right\" class=\"snarkTorrentStatus " + rowClass + "\">");
|
||||
String ch = peer.toString().substring(0, 4);
|
||||
String client;
|
||||
if ("AwMD".equals(ch))
|
||||
@ -592,7 +592,7 @@ public class I2PSnarkServlet extends HttpServlet {
|
||||
out.write("</td>\n\t");
|
||||
out.write("<td class=\"snarkTorrentStatus " + rowClass + "\">");
|
||||
out.write("</td>\n\t");
|
||||
out.write("<td valign=\"top\" align=\"right\" class=\"snarkTorrentStatus " + rowClass + "\">");
|
||||
out.write("<td align=\"right\" class=\"snarkTorrentStatus " + rowClass + "\">");
|
||||
float pct = (float) (100.0 * (float) peer.completed() / snark.meta.getPieces());
|
||||
if (pct == 100.0)
|
||||
out.write("<font size=-1>Seed</font>");
|
||||
@ -605,7 +605,7 @@ public class I2PSnarkServlet extends HttpServlet {
|
||||
out.write("</td>\n\t");
|
||||
out.write("<td class=\"snarkTorrentStatus " + rowClass + "\">");
|
||||
out.write("</td>\n\t");
|
||||
out.write("<td valign=\"top\" align=\"right\" class=\"snarkTorrentStatus " + rowClass + "\">");
|
||||
out.write("<td align=\"right\" class=\"snarkTorrentStatus " + rowClass + "\">");
|
||||
if (remaining > 0) {
|
||||
if (peer.isInteresting() && !peer.isChoked()) {
|
||||
out.write("<font color=#008000>");
|
||||
@ -620,7 +620,7 @@ public class I2PSnarkServlet extends HttpServlet {
|
||||
}
|
||||
}
|
||||
out.write("</td>\n\t");
|
||||
out.write("<td valign=\"top\" align=\"right\" class=\"snarkTorrentStatus " + rowClass + "\">");
|
||||
out.write("<td align=\"right\" class=\"snarkTorrentStatus " + rowClass + "\">");
|
||||
if (pct != 100.0) {
|
||||
if (peer.isInterested() && !peer.isChoking()) {
|
||||
out.write("<font color=#008000>");
|
||||
@ -789,19 +789,19 @@ public class I2PSnarkServlet extends HttpServlet {
|
||||
|
||||
private static final String TABLE_HEADER = "<table border=\"0\" class=\"snarkTorrents\" width=\"100%\" cellpadding=\"0 10px\">\n" +
|
||||
"<thead>\n" +
|
||||
"<tr><th align=\"left\" valign=\"top\">Status \n";
|
||||
"<tr><th align=\"left\">Status \n";
|
||||
|
||||
private static final String TABLE_HEADER2 = "</th>\n" +
|
||||
" <th align=\"left\" valign=\"top\">Torrent</th>\n" +
|
||||
" <th align=\"right\" valign=\"top\">ETA</th>\n" +
|
||||
" <th align=\"right\" valign=\"top\">Downloaded</th>\n" +
|
||||
" <th align=\"right\" valign=\"top\">Uploaded</th>\n" +
|
||||
" <th align=\"right\" valign=\"top\">Down Rate</th>\n" +
|
||||
" <th align=\"right\" valign=\"top\">Up Rate</th>\n";
|
||||
" <th align=\"left\">Torrent</th>\n" +
|
||||
" <th align=\"right\">ETA</th>\n" +
|
||||
" <th align=\"right\">Downloaded</th>\n" +
|
||||
" <th align=\"right\">Uploaded</th>\n" +
|
||||
" <th align=\"right\">Down Rate</th>\n" +
|
||||
" <th align=\"right\">Up Rate</th>\n";
|
||||
|
||||
private static final String TABLE_EMPTY = "<tr class=\"snarkTorrentEven\">" +
|
||||
"<td class=\"snarkTorrentEven\" align=\"center\"" +
|
||||
" valign=\"top\" colspan=\"8\"><i>No torrents loaded.</i></td></tr>\n";
|
||||
" colspan=\"8\"><i>No torrents loaded.</i></td></tr>\n";
|
||||
|
||||
private static final String TABLE_FOOTER = "</table></div>\n";
|
||||
|
||||
|
@ -14,7 +14,7 @@ public class ConfigTunnelsHelper extends HelperBase {
|
||||
|
||||
public String getForm() {
|
||||
StringBuilder buf = new StringBuilder(1024);
|
||||
buf.append("<table border=\"1\">\n");
|
||||
buf.append("<table>\n");
|
||||
TunnelPoolSettings exploratoryIn = _context.tunnelManager().getInboundSettings();
|
||||
TunnelPoolSettings exploratoryOut = _context.tunnelManager().getOutboundSettings();
|
||||
|
||||
@ -80,7 +80,7 @@ buf.append("<tr><th></th><th><img src=\"/themes/console/images/inbound.png\" alt
|
||||
// buf.append("<tr><th></th><th>Inbound</th><th>Outbound</th></tr>\n");
|
||||
|
||||
// tunnel depth
|
||||
buf.append("<tr><td align=\"right\">Depth</td>\n");
|
||||
buf.append("<tr><td align=\"right\" class=\"mediumtags\">Depth:</td>\n");
|
||||
buf.append("<td align=\"center\"><select name=\"").append(index).append(".depthInbound\">\n");
|
||||
int now = in.getLength();
|
||||
renderOptions(buf, 0, MAX_LENGTH, now, "", "hop");
|
||||
@ -97,7 +97,7 @@ buf.append("<tr><th></th><th><img src=\"/themes/console/images/inbound.png\" alt
|
||||
buf.append("</tr>\n");
|
||||
|
||||
// tunnel depth variance
|
||||
buf.append("<tr><td align=\"right\">Randomization</td>\n");
|
||||
buf.append("<tr><td align=\"right\" class=\"mediumtags\">Randomization:</td>\n");
|
||||
buf.append("<td align=\"center\"><select name=\"").append(index).append(".varianceInbound\">\n");
|
||||
now = in.getLengthVariance();
|
||||
renderOptions(buf, 0, 0, now, "", "hop");
|
||||
@ -121,7 +121,7 @@ buf.append("<tr><th></th><th><img src=\"/themes/console/images/inbound.png\" alt
|
||||
buf.append("</select></td>\n");
|
||||
|
||||
// tunnel quantity
|
||||
buf.append("<tr><td align=\"right\">Quantity</td>\n");
|
||||
buf.append("<tr><td align=\"right\" class=\"mediumtags\">Quantity:</td>\n");
|
||||
buf.append("<td align=\"center\"><select name=\"").append(index).append(".quantityInbound\">\n");
|
||||
now = in.getQuantity();
|
||||
renderOptions(buf, 1, MAX_QUANTITY, now, "", "tunnel");
|
||||
@ -138,7 +138,7 @@ buf.append("<tr><th></th><th><img src=\"/themes/console/images/inbound.png\" alt
|
||||
buf.append("</tr>\n");
|
||||
|
||||
// tunnel backup quantity
|
||||
buf.append("<tr><td align=\"right\">Backup quantity</td>\n");
|
||||
buf.append("<tr><td align=\"right\" class=\"mediumtags\">Backup quantity:</td>\n");
|
||||
buf.append("<td align=\"center\"><select name=\"").append(index).append(".backupInbound\">\n");
|
||||
now = in.getBackupQuantity();
|
||||
renderOptions(buf, 0, MAX_BACKUP_QUANTITY, now, "", "tunnel");
|
||||
@ -155,7 +155,7 @@ buf.append("<tr><th></th><th><img src=\"/themes/console/images/inbound.png\" alt
|
||||
buf.append("</tr>\n");
|
||||
|
||||
// custom options
|
||||
buf.append("<tr><td align=\"right\">Inbound options:</td>\n");
|
||||
buf.append("<tr><td align=\"right\" class=\"mediumtags\">Inbound options:</td>\n");
|
||||
buf.append("<td colspan=\"2\" align=\"center\"><input name=\"").append(index);
|
||||
buf.append(".inboundOptions\" type=\"text\" size=\"32\" ");
|
||||
buf.append("value=\"");
|
||||
@ -166,7 +166,7 @@ buf.append("<tr><th></th><th><img src=\"/themes/console/images/inbound.png\" alt
|
||||
buf.append(prop).append("=").append(val).append(" ");
|
||||
}
|
||||
buf.append("\"/></td></tr>\n");
|
||||
buf.append("<tr><td align=\"right\">Outbound options:</td>\n");
|
||||
buf.append("<tr><td align=\"right\" class=\"mediumtags\">Outbound options:</td>\n");
|
||||
buf.append("<td colspan=\"2\" align=\"center\"><input name=\"").append(index);
|
||||
buf.append(".outboundOptions\" type=\"text\" size=\"32\" ");
|
||||
buf.append("value=\"");
|
||||
|
@ -183,7 +183,8 @@ public class StatSummarizer implements Runnable {
|
||||
def.setGridY(false);
|
||||
}
|
||||
//System.out.println("rendering: path=" + path + " dsNames[0]=" + dsNames[0] + " dsNames[1]=" + dsNames[1] + " lsnr.getName=" + _listener.getName());
|
||||
def.setAntiAliasing(false);
|
||||
// Let's set anti-aliasing on and see what happens..
|
||||
def.setAntiAliasing(true);
|
||||
//System.out.println("Rendering: \n" + def.exportXmlTemplate());
|
||||
//System.out.println("*****************\nData: \n" + _listener.getData().dump());
|
||||
RrdGraph graph = new RrdGraph(def);
|
||||
|
@ -10,6 +10,7 @@
|
||||
<%@include file="summary.jsp" %>
|
||||
<h1>I2P Router Logs</h1>
|
||||
<div class="main" id="main">
|
||||
<div class="joblog">
|
||||
<h3>Version:</h3><a name="version"> </a>
|
||||
Please include this information in bug reports.
|
||||
<p>
|
||||
@ -31,6 +32,6 @@ jbigi <%=net.i2p.util.NativeBigInteger.loadStatus()%><br />
|
||||
<h3>Service (Wrapper) logs:</h3><a name="servicelogs"> </a>
|
||||
<jsp:getProperty name="logsHelper" property="serviceLogs" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -12,7 +12,7 @@
|
||||
2009-07-25 dr|z3d
|
||||
* Enhance the layout of /graphs.jsp
|
||||
* Fix some of the irks in I2PSnark UI.
|
||||
* Ongoing tweaks and fiddles the the theme css. Not finished by any means!
|
||||
* Ongoing tweaks and fiddles to the themes' css. Not finished by any means!
|
||||
|
||||
2009-07-24 zzz
|
||||
* Eepsite: Add Deutsch index page and css (thanks sperrbezirk!)
|
||||
|
@ -260,6 +260,8 @@ th {
|
||||
text-align: center;
|
||||
font-size: 8pt;
|
||||
background: #004 url('images/tabletitledark.png') repeat-x;
|
||||
border-top: 1px solid #99f;
|
||||
border-bottom: 1px solid #99f;
|
||||
}
|
||||
|
||||
tr {
|
||||
@ -283,15 +285,21 @@ tr:last-child {
|
||||
}
|
||||
*/
|
||||
td {
|
||||
padding: 6px 3px 5px 3px;
|
||||
padding: 6px 4px;
|
||||
color: #eef;
|
||||
vertical-align: middle;
|
||||
border-top: 1px inset #006;
|
||||
border-bottom: 1px outset #006;
|
||||
}
|
||||
|
||||
td img {
|
||||
padding: 0 1px 0 2px;
|
||||
}
|
||||
|
||||
tt {
|
||||
font: bold 9pt "Lucida Console", "DejaVu Sans Mono", Courier, mono;
|
||||
font: bold 8pt "Lucida Console", "DejaVu Sans Mono", Courier, mono;
|
||||
color: #FF0;
|
||||
padding: 10px;
|
||||
padding: 0 5px 2px 0;
|
||||
}
|
||||
|
||||
div.main li {
|
||||
@ -559,23 +567,33 @@ form {}
|
||||
|
||||
.joblog {
|
||||
margin: 25px 0 25px 0;
|
||||
padding: 20px 40px 20px 40px !important;
|
||||
padding: 20px 30px 20px 30px !important;
|
||||
border: 1px solid #99f;
|
||||
background-color: #004;
|
||||
background: url("images/lightbluetile.png");
|
||||
background: url("images/darkbluebg.png");
|
||||
color: #dfd;
|
||||
border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-khtml-border-radius: 4px;
|
||||
text-align: justify;
|
||||
-moz-box-shadow: inset 0px 0px 1px 0px #eef;
|
||||
overflow-x: scroll;
|
||||
overflow-x: scroll; /* Opera fix */
|
||||
}
|
||||
|
||||
div.joblog:li {
|
||||
word-wrap: break-word !important;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.joblog:ul {
|
||||
word-wrap: break-word !important;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.smallhead {
|
||||
font-size: 8pt
|
||||
}
|
||||
|
||||
.mediumtags {
|
||||
font-size: 9pt;
|
||||
}
|
@ -307,10 +307,13 @@ th {
|
||||
background: #b4c8ff url('images/tabletitlelight.png') repeat-x;
|
||||
text-align: center;
|
||||
font-size: 9pt;
|
||||
border-bottom: 1px solid #001;
|
||||
border-top: 1px solid #001;
|
||||
}
|
||||
|
||||
tr {
|
||||
vertical-align: middle !important;
|
||||
align: center;
|
||||
}
|
||||
|
||||
tr:nth-child(even) {
|
||||
@ -331,6 +334,8 @@ td {
|
||||
padding: 5px;
|
||||
color: #000;
|
||||
vertical-align: middle;
|
||||
border-top: 1px inset #001;
|
||||
border-bottom: 1px outset #99f;
|
||||
}
|
||||
|
||||
tt {
|
||||
@ -627,3 +632,13 @@ form {}
|
||||
.joblog:ul {
|
||||
word-wrap: break-word !important;
|
||||
}
|
||||
|
||||
.smallhead {
|
||||
font-size: 7pt
|
||||
}
|
||||
|
||||
.mediumtags {
|
||||
font-size: 8pt;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
}
|
@ -762,7 +762,7 @@ public class Router {
|
||||
buf.append("\n<h2>Most recent console messages:</h2><table border=\"1\">\n");
|
||||
for (Iterator iter = msgs.iterator(); iter.hasNext(); ) {
|
||||
String msg = (String)iter.next();
|
||||
buf.append("<tr><td valign=\"top\" align=\"left\"><pre>");
|
||||
buf.append("<tr><td align=\"left\"><pre>");
|
||||
appendLogMessage(buf, msg);
|
||||
buf.append("</pre></td></tr>\n");
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 28;
|
||||
public final static long BUILD = 29;
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "-rc";
|
||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
||||
|
@ -1037,11 +1037,11 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
|
||||
}
|
||||
}
|
||||
|
||||
buf.append("<table border=\"0\" cellspacing=\"30\"><tr><td valign=\"top\">");
|
||||
buf.append("<table border=\"0\" cellspacing=\"30\"><tr><td>");
|
||||
List<String> versionList = new ArrayList(versions.objects());
|
||||
if (versionList.size() > 0) {
|
||||
Collections.sort(versionList, Collections.reverseOrder());
|
||||
buf.append("<table border=\"1\">\n");
|
||||
buf.append("<table>\n");
|
||||
buf.append("<tr><th>Version</th><th>Count</th></tr>\n");
|
||||
for (String routerVersion : versionList) {
|
||||
int num = versions.count(routerVersion);
|
||||
@ -1050,14 +1050,14 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
|
||||
}
|
||||
buf.append("</table>\n");
|
||||
}
|
||||
buf.append("</td><td valign=\"top\">");
|
||||
buf.append("</td><td>");
|
||||
out.write(buf.toString());
|
||||
buf.setLength(0);
|
||||
|
||||
List<String> countryList = new ArrayList(countries.objects());
|
||||
if (countryList.size() > 0) {
|
||||
Collections.sort(countryList);
|
||||
buf.append("<table border=\"1\">\n");
|
||||
buf.append("<table>\n");
|
||||
buf.append("<tr><th>Country</th><th>Count</th></tr>\n");
|
||||
for (String country : countryList) {
|
||||
int num = countries.count(country);
|
||||
|
@ -59,7 +59,7 @@ class ProfileOrganizerRenderer {
|
||||
StringBuilder buf = new StringBuilder(16*1024);
|
||||
buf.append("<h2>Peer Profiles</h2>\n");
|
||||
buf.append("<p>Showing ").append(order.size()).append(" recent profiles, hiding ").append(peers.size()-order.size()).append(" older profiles</p>");
|
||||
buf.append("<table border=\"1\">");
|
||||
buf.append("<table>");
|
||||
buf.append("<tr>");
|
||||
buf.append("<th>Peer</th>");
|
||||
buf.append("<th>Groups (Caps)</th>");
|
||||
@ -98,9 +98,9 @@ class ProfileOrganizerRenderer {
|
||||
buf.append("<tr><td colspan=\"7\"><hr /></td></tr>\n");
|
||||
prevTier = tier;
|
||||
|
||||
buf.append("<tr><td align=\"right\" nowrap>");
|
||||
buf.append("<tr><td align=\"center\" nowrap>");
|
||||
buf.append(_context.commSystem().renderPeerHTML(peer));
|
||||
buf.append("</td><td>");
|
||||
buf.append("</td><td align=\"center\">");
|
||||
|
||||
switch (tier) {
|
||||
case 1: buf.append("Fast, High Capacity"); break;
|
||||
@ -137,7 +137,7 @@ class ProfileOrganizerRenderer {
|
||||
buf.append(bonus).append(')');
|
||||
}
|
||||
buf.append("</td><td align=\"right\">").append(num(prof.getIntegrationValue()));
|
||||
buf.append("</td><td>");
|
||||
buf.append("</td><td align=\"center\">");
|
||||
if (_context.shitlist().isShitlisted(peer)) buf.append("Shitlist");
|
||||
if (prof.getIsFailing()) buf.append(" Failing");
|
||||
if (_context.commSystem().wasUnreachable(peer)) buf.append(" Unreachable");
|
||||
@ -150,37 +150,41 @@ class ProfileOrganizerRenderer {
|
||||
buf.append(' ').append(fails).append('/').append(total).append(" Test Fails");
|
||||
}
|
||||
buf.append(" </td>");
|
||||
buf.append("<td nowrap><a href=\"dumpprofile.jsp?peer=").append(peer.toBase64().substring(0,6)).append("\">profile</a>");
|
||||
buf.append("/<a href=\"configpeer.jsp?peer=").append(peer.toBase64()).append("\">+-</a></td>\n");
|
||||
buf.append("<td nowrap align=\"center\"><a target=\"_blank\" href=\"dumpprofile.jsp?peer=").append(peer.toBase64().substring(0,6)).append("\">profile</a>");
|
||||
buf.append(" <a href=\"configpeer.jsp?peer=").append(peer.toBase64()).append("\">+-</a></td>\n");
|
||||
buf.append("</tr>");
|
||||
}
|
||||
buf.append("</table>");
|
||||
|
||||
buf.append("<h2>Floodfill and Integrated Peers</h2>\n");
|
||||
buf.append("<table border=\"1\">");
|
||||
buf.append("<table>");
|
||||
buf.append("<tr>");
|
||||
buf.append("<th>Peer</th>");
|
||||
buf.append("<th>Caps</th>");
|
||||
buf.append("<th>Integ. Value</th>");
|
||||
buf.append("<th>Last Heard About</th>");
|
||||
buf.append("<th>Last Heard From</th>");
|
||||
buf.append("<th>Last Successful Send</th>");
|
||||
buf.append("<th>Last Failed Send</th>");
|
||||
buf.append("<th>10m Resp. Time</th>");
|
||||
buf.append("<th>1h Resp. Time</th>");
|
||||
buf.append("<th>1d Resp. Time</th>");
|
||||
buf.append("<th>Successful Lookups</th>");
|
||||
buf.append("<th>Failed Lookups</th>");
|
||||
buf.append("<th>New Stores</th>");
|
||||
buf.append("<th>Old Stores</th>");
|
||||
buf.append("<th>1h Fail Rate</th>");
|
||||
buf.append("<th>1d Fail Rate</th>");
|
||||
buf.append("<th class=\"smallhead\">Peer</th>");
|
||||
buf.append("<th class=\"smallhead\">Caps</th>");
|
||||
buf.append("<th class=\"smallhead\">Integ. Value</th>");
|
||||
buf.append("<th class=\"smallhead\">Last Heard About</th>");
|
||||
buf.append("<th class=\"smallhead\">Last Heard From</th>");
|
||||
// buf.append("<th class=\"smallhead\">Last Successful Send</th>");
|
||||
buf.append("<th class=\"smallhead\">Last Good Send</th>");
|
||||
// buf.append("<th class=\"smallhead\">Last Failed Send</th>");
|
||||
buf.append("<th class=\"smallhead\">Last Bad Send</th>");
|
||||
buf.append("<th class=\"smallhead\">10m Resp. Time</th>");
|
||||
buf.append("<th class=\"smallhead\">1h Resp. Time</th>");
|
||||
buf.append("<th class=\"smallhead\">1d Resp. Time</th>");
|
||||
// buf.append("<th class=\"smallhead\">Successful Lookups</th>");
|
||||
buf.append("<th class=\"smallhead\">Good Lookups</th>");
|
||||
// buf.append("<th>Failed Lookups</th>");
|
||||
buf.append("<th class=\"smallhead\">Bad Lookups</th>");
|
||||
buf.append("<th class=\"smallhead\">New Stores</th>");
|
||||
buf.append("<th class=\"smallhead\">Old Stores</th>");
|
||||
buf.append("<th class=\"smallhead\">1h Fail Rate</th>");
|
||||
buf.append("<th class=\"smallhead\">1d Fail Rate</th>");
|
||||
buf.append("</tr>");
|
||||
for (Iterator iter = integratedPeers.iterator(); iter.hasNext();) {
|
||||
PeerProfile prof = (PeerProfile)iter.next();
|
||||
Hash peer = prof.getPeer();
|
||||
|
||||
buf.append("<tr><td align=\"right\" nowrap>");
|
||||
buf.append("<tr><td align=\"center\" nowrap>");
|
||||
buf.append(_context.commSystem().renderPeerHTML(peer));
|
||||
buf.append("</td>");
|
||||
RouterInfo info = _context.netDb().lookupRouterInfoLocally(peer);
|
||||
|
@ -643,7 +643,7 @@ public class NTCPTransport extends TransportImpl {
|
||||
buf.append(" limit: ").append(getMaxConnections());
|
||||
buf.append(" timeout: ").append(DataHelper.formatDuration(_pumper.getIdleTimeout()));
|
||||
buf.append("</b><br />\n");
|
||||
buf.append("<table border=\"1\">\n");
|
||||
buf.append("<table>\n");
|
||||
buf.append("<tr><th><a href=\"#def.peer\">Peer</a></th>");
|
||||
buf.append("<th>Dir</th>");
|
||||
buf.append("<th align=\"right\"><a href=\"#def.idle\">Idle</a></th>");
|
||||
|
@ -1767,7 +1767,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
buf.append(" limit: ").append(getMaxConnections());
|
||||
buf.append(" timeout: ").append(DataHelper.formatDuration(_expireTimeout));
|
||||
buf.append("</b><br />\n");
|
||||
buf.append("<table border=\"1\">\n");
|
||||
buf.append("<table>\n");
|
||||
buf.append("<tr><th><a href=\"#def.peer\">Peer</a>");
|
||||
if (sortFlags != FLAG_ALPHA)
|
||||
buf.append(" <a href=\"").append(urlBase).append("?sort=0\">V</a> ");
|
||||
@ -1862,7 +1862,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
if (idleIn < 0) idleIn = 0;
|
||||
if (idleOut < 0) idleOut = 0;
|
||||
|
||||
buf.append("<td valign=\"top\" align=\"right\" ><code>");
|
||||
buf.append("<td align=\"right\" ><code>");
|
||||
buf.append(idleIn);
|
||||
buf.append("s/");
|
||||
buf.append(idleOut);
|
||||
@ -1871,7 +1871,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
int recvBps = (idleIn > 2 ? 0 : peer.getReceiveBps());
|
||||
int sendBps = (idleOut > 2 ? 0 : peer.getSendBps());
|
||||
|
||||
buf.append("<td valign=\"top\" align=\"right\" ><code>");
|
||||
buf.append("<td align=\"right\" ><code>");
|
||||
buf.append(formatKBps(recvBps));
|
||||
buf.append("/");
|
||||
buf.append(formatKBps(sendBps));
|
||||
@ -1884,18 +1884,18 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
|
||||
long uptime = now - peer.getKeyEstablishedTime();
|
||||
|
||||
buf.append("<td valign=\"top\" align=\"right\" ><code>");
|
||||
buf.append("<td align=\"right\" ><code>");
|
||||
buf.append(DataHelper.formatDuration(uptime));
|
||||
buf.append("</code></td>");
|
||||
|
||||
buf.append("<td valign=\"top\" align=\"right\" ><code>");
|
||||
buf.append("<td align=\"right\" ><code>");
|
||||
buf.append(peer.getClockSkew());
|
||||
buf.append("s</code></td>");
|
||||
offsetTotal = offsetTotal + peer.getClockSkew();
|
||||
|
||||
long sendWindow = peer.getSendWindowBytes();
|
||||
|
||||
buf.append("<td valign=\"top\" align=\"right\" ><code>");
|
||||
buf.append("<td align=\"right\" ><code>");
|
||||
buf.append(sendWindow/1024);
|
||||
buf.append("K");
|
||||
buf.append("/").append(peer.getConcurrentSends());
|
||||
@ -1903,26 +1903,26 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
buf.append("/").append(peer.getConsecutiveSendRejections());
|
||||
buf.append("</code></td>");
|
||||
|
||||
buf.append("<td valign=\"top\" align=\"right\" ><code>");
|
||||
buf.append("<td align=\"right\" ><code>");
|
||||
buf.append(peer.getSlowStartThreshold()/1024);
|
||||
buf.append("K</code></td>");
|
||||
|
||||
int rtt = peer.getRTT();
|
||||
int rto = peer.getRTO();
|
||||
|
||||
buf.append("<td valign=\"top\" align=\"right\" ><code>");
|
||||
buf.append("<td align=\"right\" ><code>");
|
||||
buf.append(rtt);
|
||||
buf.append("</code></td>");
|
||||
|
||||
buf.append("<td valign=\"top\" align=\"right\" ><code>");
|
||||
buf.append("<td align=\"right\" ><code>");
|
||||
buf.append(peer.getRTTDeviation());
|
||||
buf.append("</code></td>");
|
||||
|
||||
buf.append("<td valign=\"top\" align=\"right\" ><code>");
|
||||
buf.append("<td align=\"right\" ><code>");
|
||||
buf.append(rto);
|
||||
buf.append("</code></td>");
|
||||
|
||||
buf.append("<td valign=\"top\" align=\"right\" ><code>");
|
||||
buf.append("<td align=\"right\" ><code>");
|
||||
buf.append(peer.getMTU()).append("/").append(peer.getReceiveMTU());
|
||||
|
||||
//.append('/');
|
||||
@ -1933,11 +1933,11 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
long sent = peer.getPacketsTransmitted();
|
||||
long recv = peer.getPacketsReceived();
|
||||
|
||||
buf.append("<td valign=\"top\" align=\"right\" ><code>");
|
||||
buf.append("<td align=\"right\" ><code>");
|
||||
buf.append(sent);
|
||||
buf.append("</code></td>");
|
||||
|
||||
buf.append("<td valign=\"top\" align=\"right\" ><code>");
|
||||
buf.append("<td align=\"right\" ><code>");
|
||||
buf.append(recv);
|
||||
buf.append("</code></td>");
|
||||
|
||||
@ -1949,14 +1949,14 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
long resent = peer.getPacketsRetransmitted();
|
||||
long dupRecv = peer.getPacketsReceivedDuplicate();
|
||||
|
||||
buf.append("<td valign=\"top\" align=\"right\" ><code>");
|
||||
buf.append("<td align=\"right\" ><code>");
|
||||
//buf.append(formatPct(sendLostPct));
|
||||
buf.append(resent); // + "/" + peer.getPacketsPeriodRetransmitted() + "/" + sent);
|
||||
//buf.append(peer.getPacketRetransmissionRate());
|
||||
buf.append("</code></td>");
|
||||
|
||||
double recvDupPct = (double)peer.getPacketsReceivedDuplicate()/(double)peer.getPacketsReceived();
|
||||
buf.append("<td valign=\"top\" align=\"right\" ><code>");
|
||||
buf.append("<td align=\"right\" ><code>");
|
||||
buf.append(dupRecv); //formatPct(recvDupPct));
|
||||
buf.append("</code></td>");
|
||||
|
||||
|
@ -438,7 +438,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
|
||||
List participating = _context.tunnelDispatcher().listParticipatingTunnels();
|
||||
Collections.sort(participating, new TunnelComparator());
|
||||
out.write("<h2><a name=\"participating\"></a>Participating tunnels:</h2><table border=\"1\">\n");
|
||||
out.write("<h2><a name=\"participating\"></a>Participating tunnels:</h2><table>\n");
|
||||
out.write("<tr><th>Receive on</th><th>From</th><th>"
|
||||
+ "Send on</th><th>To</th><th>Expiration</th>"
|
||||
+ "<th>Usage</th><th>Rate</th><th>Role</th></tr>\n");
|
||||
@ -524,7 +524,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
if (info.getLength() > maxLength)
|
||||
maxLength = info.getLength();
|
||||
}
|
||||
out.write("<table border=\"1\"><tr><th>In/Out</th><th>Expiry</th><th>Usage</th><th>Gateway</th>");
|
||||
out.write("<table><tr><th>In/Out</th><th>Expiry</th><th>Usage</th><th>Gateway</th>");
|
||||
if (maxLength > 3) {
|
||||
out.write("<th align=\"center\" colspan=\"" + (maxLength - 2));
|
||||
out.write("\">Participants</th>");
|
||||
@ -603,7 +603,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
Collections.sort(peerList, new HashComparator());
|
||||
|
||||
out.write("<h2><a name=\"peers\"></a>Tunnel Counts By Peer:</h2>\n");
|
||||
out.write("<table border=\"1\"><tr><th>Peer</th><th>Expl. + Client</th><th>% of total</th><th>Part. from + to</th><th>% of total</th></tr>\n");
|
||||
out.write("<table><tr><th>Peer</th><th>Expl. + Client</th><th>% of total</th><th>Part. from + to</th><th>% of total</th></tr>\n");
|
||||
for (Hash h : peerList) {
|
||||
out.write("<tr><td align=\"center\">");
|
||||
out.write(netDbLink(h));
|
||||
|
Reference in New Issue
Block a user