forked from I2P_Developers/i2p.i2p
/tunnels:
- Indicate that no participating tunnels will be built when shared bw is too low - Replace <a name> with id attribute for anchor links
This commit is contained in:
@ -54,8 +54,8 @@ class TunnelRenderer {
|
|||||||
name = outPool.getSettings().getDestinationNickname();
|
name = outPool.getSettings().getDestinationNickname();
|
||||||
if (name == null)
|
if (name == null)
|
||||||
name = client.toBase64().substring(0,4);
|
name = client.toBase64().substring(0,4);
|
||||||
out.write("<h3 class=\"tabletitle\"><a name=\"" + client.toBase64().substring(0,4)
|
out.write("<h3 class=\"tabletitle\" id=\"" + client.toBase64().substring(0,4)
|
||||||
+ "\" ></a>" + _t("Client tunnels for") + ' ' + DataHelper.escapeHTML(_t(name)));
|
+ "\" >" + _t("Client tunnels for") + ' ' + DataHelper.escapeHTML(_t(name)));
|
||||||
if (isLocal)
|
if (isLocal)
|
||||||
out.write(" <a href=\"/configtunnels#" + client.toBase64().substring(0,4) +"\" title=\"" + _t("Configure tunnels for session") + "\">[" + _t("configure") + "]</a></h3>\n");
|
out.write(" <a href=\"/configtunnels#" + client.toBase64().substring(0,4) +"\" title=\"" + _t("Configure tunnels for session") + "\">[" + _t("configure") + "]</a></h3>\n");
|
||||||
else
|
else
|
||||||
@ -64,7 +64,10 @@ class TunnelRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<HopConfig> participating = _context.tunnelDispatcher().listParticipatingTunnels();
|
List<HopConfig> participating = _context.tunnelDispatcher().listParticipatingTunnels();
|
||||||
out.write("<h3 class=\"tabletitle\"><a name=\"participating\"></a>" + _t("Participating tunnels") + "</h3>\n");
|
out.write("<h3 class=\"tabletitle\" id=\"participating\">" + _t("Participating tunnels") + "</h3>\n");
|
||||||
|
int bwShare = _context.bandwidthLimiter().getOutboundKBytesPerSecond();
|
||||||
|
if (bwShare > 12) {
|
||||||
|
// Don't bother re-indenting
|
||||||
if (!participating.isEmpty()) {
|
if (!participating.isEmpty()) {
|
||||||
Collections.sort(participating, new TunnelComparator());
|
Collections.sort(participating, new TunnelComparator());
|
||||||
out.write("<table class=\"tunneldisplay tunnels_participating\"><tr><th>" + _t("Receive on") + "</th><th>" + _t("From") + "</th><th>"
|
out.write("<table class=\"tunneldisplay tunnels_participating\"><tr><th>" + _t("Receive on") + "</th><th>" + _t("From") + "</th><th>"
|
||||||
@ -136,6 +139,10 @@ class TunnelRenderer {
|
|||||||
else if (displayed <= 0)
|
else if (displayed <= 0)
|
||||||
out.write("<div class=\"statusnotes\"><b>" + _t("none") + "</b></div>\n");
|
out.write("<div class=\"statusnotes\"><b>" + _t("none") + "</b></div>\n");
|
||||||
out.write("<div class=\"statusnotes\"><b>" + _t("Lifetime bandwidth usage") + ": " + DataHelper.formatSize2(processed*1024) + "B</b></div>\n");
|
out.write("<div class=\"statusnotes\"><b>" + _t("Lifetime bandwidth usage") + ": " + DataHelper.formatSize2(processed*1024) + "B</b></div>\n");
|
||||||
|
} else {
|
||||||
|
out.write("<div class=\"statusnotes noparticipate\"><b>" + _t("Not enough shared bandwidth to build participating tunnels.") +
|
||||||
|
"</b> <a href=\"config\">[" + _t("Configure") + "]</a></div>\n");
|
||||||
|
}
|
||||||
//renderPeers(out);
|
//renderPeers(out);
|
||||||
|
|
||||||
//out.write("<h3 class=\"tabletitle\">" + "Bandwidth Tiers" + "</h3>\n"); TODO: replace "definitions" with tagged "bandwidth tiers" post 0.9.31 release
|
//out.write("<h3 class=\"tabletitle\">" + "Bandwidth Tiers" + "</h3>\n"); TODO: replace "definitions" with tagged "bandwidth tiers" post 0.9.31 release
|
||||||
|
@ -28,6 +28,9 @@
|
|||||||
- /help:
|
- /help:
|
||||||
- Update sidebar help section (en)
|
- Update sidebar help section (en)
|
||||||
- Remove redundant CSS class from all help section files (li.tidylist)
|
- Remove redundant CSS class from all help section files (li.tidylist)
|
||||||
|
- /tunnels:
|
||||||
|
- Indicate that no participating tunnels will be built when shared bw is too low
|
||||||
|
- Replace <a name> with id attribute for anchor links
|
||||||
* I2PTunnel: Add hostname / destination (b32) information to server section on
|
* I2PTunnel: Add hostname / destination (b32) information to server section on
|
||||||
index page (for parity with client tunnels section)
|
index page (for parity with client tunnels section)
|
||||||
* I2PSnark
|
* I2PSnark
|
||||||
|
Reference in New Issue
Block a user