propagate from branch 'i2p.i2p' (head 2c491226853de4521d10d68da3a0a8e4db33293d)

to branch 'i2p.i2p.str4d.ui' (head bbdfdd2b3941cfa3c2c5cab8f3c78069c865c54d)
This commit is contained in:
str4d
2016-07-09 23:20:31 +00:00
102 changed files with 1270 additions and 885 deletions

View File

@ -916,7 +916,7 @@ public class Blocklist {
Set<Integer> singles = new TreeSet<Integer>();
singles.addAll(_singleIPBlocklist);
if (!(singles.isEmpty() && _singleIPv6Blocklist.isEmpty())) {
out.write("<table><tr><th align=\"center\" colspan=\"2\"><b>");
out.write("<table id=\"banneduntilrestart\"><tr><th align=\"center\" colspan=\"2\"><b>");
out.write(_t("IPs Banned Until Restart"));
out.write("</b></td></tr>");
// first 0 - 127
@ -953,7 +953,7 @@ public class Blocklist {
out.write("</table>");
}
if (_blocklistSize > 0) {
out.write("<table><tr><th align=\"center\" colspan=\"2\"><b>");
out.write("<table id=\"permabanned\"><tr><th align=\"center\" colspan=\"2\"><b>");
out.write(_t("IPs Permanently Banned"));
out.write("</b></th></tr><tr><td align=\"center\" width=\"50%\"><b>");
out.write(_t("From"));

View File

@ -64,7 +64,7 @@ public class PersistentKeyRing extends KeyRing {
@Override
public void renderStatusHTML(Writer out) throws IOException {
StringBuilder buf = new StringBuilder(1024);
buf.append("\n<table><tr><th align=\"left\">Destination Hash<th align=\"left\">Name or Dest.<th align=\"left\">Encryption Key</tr>");
buf.append("\n<table class=\"configtable\"><tr><th align=\"left\">Destination Hash<th align=\"left\">Name or Dest.<th align=\"left\">Encryption Key</tr>");
for (Entry<Hash, SessionKey> e : entrySet()) {
buf.append("\n<tr><td>");
Hash h = e.getKey();

View File

@ -683,7 +683,7 @@ public class TransportManager implements TransportEventListener {
*/
public void renderStatusHTML(Writer out, String urlBase, int sortFlags) throws IOException {
if (_context.getBooleanProperty(PROP_ADVANCED)) {
out.write("<p><b>");
out.write("<p id=\"upnpstatus\"><b>");
out.write(_t("Status"));
out.write(": ");
out.write(_t(getReachabilityStatus().toStatusString()));
@ -702,7 +702,7 @@ public class TransportManager implements TransportEventListener {
}
StringBuilder buf = new StringBuilder(4*1024);
buf.append("<h3>").append(_t("Router Transport Addresses")).append("</h3><pre>\n");
buf.append("<h3 id=\"transports\">").append(_t("Router Transport Addresses")).append("</h3><pre id=\"transports\">\n");
for (Transport t : _transports.values()) {
if (t.hasCurrentAddress()) {
for (RouterAddress ra : t.getCurrentAddresses()) {
@ -721,7 +721,7 @@ public class TransportManager implements TransportEventListener {
} else if (_upnpManager != null) {
out.write(_upnpManager.renderStatusHTML());
} else {
out.write("<h3><a name=\"upnp\"></a>" + _t("UPnP is not enabled") + "</h3>\n");
out.write("<h3 id=\"upnpstatus\"><a name=\"upnp\"></a>" + _t("UPnP is not enabled") + "</h3>\n");
}
out.write("</p>\n");
out.flush();
@ -730,39 +730,36 @@ public class TransportManager implements TransportEventListener {
private final String getTransportsLegend() {
StringBuilder buf = new StringBuilder(1024);
buf.append("<h3 id=\"help\">").append(_t("Help")).append("</h3><div class=\"configure\"><p>")
buf.append("<p class=\"infohelp\">")
.append(_t("Your transport connection limits are automatically set based on your configured bandwidth."))
.append('\n')
.append(_t("To override these limits, add the settings i2np.ntcp.maxConnections=nnn and i2np.udp.maxConnections=nnn on the advanced configuration page."))
.append("</p></div>\n");
buf.append("<h3>").append(_t("Definitions")).append("</h3><div class=\"configure\">" +
"<p><b id=\"def.peer\">").append(_t("Peer")).append("</b>: ").append(_t("The remote peer, identified by router hash")).append("<br>\n" +
"<b id=\"def.dir\">").append(_t("Dir")).append("</b>: " +
"<img alt=\"Inbound\" src=\"/themes/console/images/inbound.png\"> ").append(_t("Inbound connection")).append("<br>\n" +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
"<img alt=\"Outbound\" src=\"/themes/console/images/outbound.png\"> ").append(_t("Outbound connection")).append("<br>\n" +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
"<img src=\"/themes/console/images/inbound.png\" alt=\"V\" height=\"8\" width=\"12\"> ").append(_t("They offered to introduce us (help other peers traverse our firewall)")).append("<br>\n" +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
"<img src=\"/themes/console/images/outbound.png\" alt=\"^\" height=\"8\" width=\"12\"> ").append(_t("We offered to introduce them (help other peers traverse their firewall)")).append("<br>\n" +
"<b id=\"def.idle\">").append(_t("Idle")).append("</b>: ").append(_t("How long since a packet has been received / sent")).append("<br>\n" +
"<b id=\"def.rate\">").append(_t("In/Out")).append("</b>: ").append(_t("The smoothed inbound / outbound transfer rate (KBytes per second)")).append("<br>\n" +
"<b id=\"def.up\">").append(_t("Up")).append("</b>: ").append(_t("How long ago this connection was established")).append("<br>\n" +
"<b id=\"def.skew\">").append(_t("Skew")).append("</b>: ").append(_t("The difference between the peer's clock and your own")).append("<br>\n" +
"<b id=\"def.cwnd\">CWND</b>: ").append(_t("The congestion window, which is how many bytes can be sent without an acknowledgement")).append(" / <br>\n" +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ").append(_t("The number of sent messages awaiting acknowledgement")).append(" /<br>\n" +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ").append(_t("The maximum number of concurrent messages to send")).append(" /<br>\n"+
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ").append(_t("The number of pending sends which exceed congestion window")).append("<br>\n" +
"<b id=\"def.ssthresh\">SST</b>: ").append(_t("The slow start threshold")).append("<br>\n" +
"<b id=\"def.rtt\">RTT</b>: ").append(_t("The round trip time in milliseconds")).append("<br>\n" +
//"<b id=\"def.dev\">").append(_t("Dev")).append("</b>: ").append(_t("The standard deviation of the round trip time in milliseconds")).append("<br>\n" +
"<b id=\"def.rto\">RTO</b>: ").append(_t("The retransmit timeout in milliseconds")).append("<br>\n" +
"<b id=\"def.mtu\">MTU</b>: ").append(_t("Current maximum send packet size / estimated maximum receive packet size (bytes)")).append("<br>\n" +
"<b id=\"def.send\">").append(_t("TX")).append("</b>: ").append(_t("The total number of messages sent to the peer")).append("<br>\n" +
"<b id=\"def.recv\">").append(_t("RX")).append("</b>: ").append(_t("The total number of messages received from the peer")).append("<br>\n" +
"<b id=\"def.resent\">").append(_t("Dup TX")).append("</b>: ").append(_t("The total number of packets retransmitted to the peer")).append("<br>\n" +
"<b id=\"def.dupRecv\">").append(_t("Dup RX")).append("</b>: ").append(_t("The total number of duplicate packets received from the peer")).append("</p>" +
"</div>\n");
.append("</p>\n");
buf.append("<h3 class=\"tabletitle\">").append(_t("Definitions")).append("</h3>")
.append("<table id=\"peerdefs\">\n")
.append("<tr><td><b id=\"def.peer\">").append(_t("Peer")).append("</b></td><td>").append(_t("The remote peer, identified by router hash")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.dir\">").append(_t("Dir")).append("</b></td><td><img alt=\"Inbound\" src=\"/themes/console/images/inbound.png\"> ").append(_t("Inbound connection")).append("</td></tr>\n")
.append("<tr><td></td><td><img alt=\"Outbound\" src=\"/themes/console/images/outbound.png\"> ").append(_t("Outbound connection")).append("</td></tr>\n")
.append("<tr><td></td><td><img src=\"/themes/console/images/inbound.png\" alt=\"V\" height=\"8\" width=\"12\"> ").append(_t("They offered to introduce us (help other peers traverse our firewall)")).append("</td></tr>\n")
.append("<tr><td></td><td><img src=\"/themes/console/images/outbound.png\" alt=\"^\" height=\"8\" width=\"12\"> ").append(_t("We offered to introduce them (help other peers traverse their firewall)")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.idle\">").append(_t("Idle")).append("</b></td><td>").append(_t("How long since a packet has been received / sent")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.rate\">").append(_t("In/Out")).append("</b></td><td>").append(_t("The smoothed inbound / outbound transfer rate (KBytes per second)")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.up\">").append(_t("Up")).append("</b></td><td>").append(_t("How long ago this connection was established")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.skew\">").append(_t("Skew")).append("</b></td><td>").append(_t("The difference between the peer's clock and your own")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.cwnd\">CWND</b></td><td>").append(_t("The congestion window, which is how many bytes can be sent without an acknowledgement")).append(" / </td></tr>\n")
.append("<tr><td></td><td>").append(_t("The number of sent messages awaiting acknowledgement")).append(" /</td></tr>\n")
.append("<tr><td></td><td>").append(_t("The maximum number of concurrent messages to send")).append(" /</td></tr>\n")
.append("<tr><td></td><td>").append(_t("The number of pending sends which exceed congestion window")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.ssthresh\">SST</b></td><td>").append(_t("The slow start threshold")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.rtt\">RTT</b></td><td>").append(_t("The round trip time in milliseconds")).append("</td></tr>\n")
//.append("<tr><td><b id=\"def.dev\">").append(_t("Dev")).append("</b></td><td>").append(_t("The standard deviation of the round trip time in milliseconds")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.rto\">RTO</b></td><td>").append(_t("The retransmit timeout in milliseconds")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.mtu\">MTU</b></td><td>").append(_t("Current maximum send packet size / estimated maximum receive packet size (bytes)")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.send\">").append(_t("TX")).append("</b></td><td>").append(_t("The total number of messages sent to the peer")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.recv\">").append(_t("RX")).append("</b></td><td>").append(_t("The total number of messages received from the peer")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.resent\">").append(_t("Dup TX")).append("</b></td><td>").append(_t("The total number of packets retransmitted to the peer")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.dupRecv\">").append(_t("Dup RX")).append("</b></td><td>").append(_t("The total number of duplicate packets received from the peer")).append("</td></tr>\n")
.append("</table>");
return buf.toString();
}

View File

@ -1363,7 +1363,7 @@ public class NTCPTransport extends TransportImpl {
buf.append(". ").append(_t("Status")).append(": ").append(_t(getReachabilityStatus().toStatusString()));
}
buf.append(".</h3>\n" +
"<table>\n" +
"<table id=\"ntcpconnections\">\n" +
"<tr><th><a href=\"#def.peer\">").append(_t("Peer")).append("</a></th>" +
"<th>").append(_t("Dir")).append("</th>" +
"<th>").append(_t("IPv6")).append("</th>" +

View File

@ -2651,7 +2651,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
buf.append(". ").append(_t("Status")).append(": ").append(_t(_reachabilityStatus.toStatusString()));
}
buf.append(".</h3>\n");
buf.append("<table>\n");
buf.append("<div class=\"widescroll\"><table id=\"udpconnections\">\n");
buf.append("<tr><th class=\"smallhead\" nowrap><a href=\"#def.peer\">").append(_t("Peer")).append("</a><br>");
if (sortFlags != FLAG_ALPHA)
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by peer hash"), FLAG_ALPHA);
@ -2915,7 +2915,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
buf.append("</td></tr>");
}
} // numPeers > 0
buf.append("</table>\n");
buf.append("</table></div>\n");
/*****
long bytesTransmitted = _context.bandwidthLimiter().getTotalAllocatedOutboundBytes();