forked from I2P_Developers/i2p.i2p
Console: Hide dead tunnel pools on /tunnels
This commit is contained in:
@ -14,7 +14,7 @@ public class ConfigTunnelsHelper extends HelperBase {
|
|||||||
private static final String HOPS = ngettext("1 hop", "{0} hops");
|
private static final String HOPS = ngettext("1 hop", "{0} hops");
|
||||||
private static final String TUNNELS = ngettext("1 tunnel", "{0} tunnels");
|
private static final String TUNNELS = ngettext("1 tunnel", "{0} tunnels");
|
||||||
|
|
||||||
private static final String PROP_ADVANCED = "routerconsole.advanced";
|
static final String PROP_ADVANCED = "routerconsole.advanced";
|
||||||
|
|
||||||
public String getForm() {
|
public String getForm() {
|
||||||
StringBuilder buf = new StringBuilder(1024);
|
StringBuilder buf = new StringBuilder(1024);
|
||||||
|
@ -39,8 +39,12 @@ public class TunnelRenderer {
|
|||||||
Map<Hash, TunnelPool> clientInboundPools = _context.tunnelManager().getInboundClientPools();
|
Map<Hash, TunnelPool> clientInboundPools = _context.tunnelManager().getInboundClientPools();
|
||||||
Map<Hash, TunnelPool> clientOutboundPools = _context.tunnelManager().getOutboundClientPools();
|
Map<Hash, TunnelPool> clientOutboundPools = _context.tunnelManager().getOutboundClientPools();
|
||||||
destinations = new ArrayList(clientInboundPools.keySet());
|
destinations = new ArrayList(clientInboundPools.keySet());
|
||||||
|
boolean debug = _context.getBooleanProperty(ConfigTunnelsHelper.PROP_ADVANCED);
|
||||||
for (int i = 0; i < destinations.size(); i++) {
|
for (int i = 0; i < destinations.size(); i++) {
|
||||||
Hash client = destinations.get(i);
|
Hash client = destinations.get(i);
|
||||||
|
boolean isLocal = _context.clientManager().isLocal(client);
|
||||||
|
if ((!isLocal) && (!debug))
|
||||||
|
continue;
|
||||||
TunnelPool in = null;
|
TunnelPool in = null;
|
||||||
TunnelPool outPool = null;
|
TunnelPool outPool = null;
|
||||||
in = clientInboundPools.get(client);
|
in = clientInboundPools.get(client);
|
||||||
@ -53,7 +57,7 @@ public class TunnelRenderer {
|
|||||||
name = client.toBase64().substring(0,4);
|
name = client.toBase64().substring(0,4);
|
||||||
out.write("<h2><a name=\"" + client.toBase64().substring(0,4)
|
out.write("<h2><a name=\"" + client.toBase64().substring(0,4)
|
||||||
+ "\" ></a>" + _("Client tunnels for") + ' ' + _(name));
|
+ "\" ></a>" + _("Client tunnels for") + ' ' + _(name));
|
||||||
if (_context.clientManager().isLocal(client))
|
if (isLocal)
|
||||||
out.write(" (<a href=\"/configtunnels#" + client.toBase64().substring(0,4) +"\">" + _("configure") + "</a>)</h2>\n");
|
out.write(" (<a href=\"/configtunnels#" + client.toBase64().substring(0,4) +"\">" + _("configure") + "</a>)</h2>\n");
|
||||||
else
|
else
|
||||||
out.write(" (" + _("dead") + ")</h2>\n");
|
out.write(" (" + _("dead") + ")</h2>\n");
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
2013-07-03 zzz
|
2013-07-03 zzz
|
||||||
|
* Console: Hide dead tunnel pools on /tunnels
|
||||||
* Updater: Fix plugin update checker (ticket #897)
|
* Updater: Fix plugin update checker (ticket #897)
|
||||||
* Utils: Reduce logging in wrapper log when extracting zip files
|
* Utils: Reduce logging in wrapper log when extracting zip files
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 15;
|
public final static long BUILD = 16;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "-rc";
|
public final static String EXTRA = "-rc";
|
||||||
|
Reference in New Issue
Block a user