diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java
index 1ce5ceb59..0d7a17754 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java
@@ -707,6 +707,8 @@ class NetDbRenderer {
int rapCount = 0;
BigInteger median = null;
int c = 0;
+ boolean linkSusi = _context.portMapper().isRegistered("susidns");
+ long now = _context.clock().now();
// Summary
if (debug) {
@@ -721,59 +723,10 @@ class NetDbRenderer {
TunnelPoolSettings in = _context.tunnelManager().getInboundSettings(myLeaseSet.getHash());
if (in != null && in.getDestinationNickname() != null)
buf.append(" - ").append(DataHelper.escapeHTML(in.getDestinationNickname()));
- buf.append("
| \n");
- boolean unpublished = ! _context.clientManager().shouldPublishLeaseSet(myLeaseSet.getHash());
- if (unpublished) {
- buf.append("| ").append(_t("Local")).append(" ");
- if (myLeaseSet.getType() == DatabaseEntry.KEY_TYPE_ENCRYPTED_LS2 || _context.keyRing().get(myLeaseSet.getHash()) != null)
- buf.append(" (").append(_t("Encrypted")).append(")");
- buf.append(_t("Unpublished")).append(" ");
- } else {
- buf.append(" |
|---|
| ").append(_t("Local")).append(" ");
- if (myLeaseSet.getType() == DatabaseEntry.KEY_TYPE_ENCRYPTED_LS2 || _context.keyRing().get(myLeaseSet.getHash()) != null)
- buf.append(" (").append(_t("Encrypted")).append(")");
- buf.append(_t("Published")).append(" ");
- long exp = 0;
- long now = _context.clock().now();
- if (myLeaseSet.getType() != DatabaseEntry.KEY_TYPE_LEASESET) {
- LeaseSet2 ls2 = (LeaseSet2) myLeaseSet;
- long pub = now - ls2.getPublished();
- buf.append(_t("{0} ago", DataHelper.formatDuration2(pub)));
- exp = ls2.getExpires()-now;
- buf.append(" - ");
- } else {
- exp = myLeaseSet.getLatestLeaseDate() - now;
- }
- if (exp > 0)
- buf.append(_t("Expires in {0}", DataHelper.formatDuration2(exp)));
- else
- buf.append(_t("Expired {0} ago", DataHelper.formatDuration2(0-exp)));
- }
- buf.append(" | |
\n");
- buf.append("\n");
- boolean isMeta = myLeaseSet.getType() == DatabaseEntry.KEY_TYPE_META_LS2;
- for (int i = 0; i < myLeaseSet.getLeaseCount(); i++) {
- Lease lease = myLeaseSet.getLease(i);
- buf.append("- ").append(_t("Lease")).append(' ').append(i + 1).append(": ");
- buf.append(_context.commSystem().renderPeerHTML(lease.getGateway()));
- buf.append(" ");
- if (!isMeta) {
- buf.append("").append(_t("Tunnel")).append(" ")
- .append(lease.getTunnelId().getTunnelId()).append(" ");
- }
- if (debug) {
- long now = _context.clock().now();
- long exl = lease.getEndTime() - now;
- buf.append("");
- if (exl > 0)
- buf.append(_t("Expires in {0}", DataHelper.formatDuration2(exl)));
- else
- buf.append(_t("Expired {0} ago", DataHelper.formatDuration2(0-exl)));
- buf.append("");
- }
- buf.append("
");
- }
- buf.append(" |
\n");
+ buf.append(" | \n" +
+ "| \n");
+ renderLeaseSet(buf, myLeaseSet, true, now, linkSusi, null);
+ buf.append(" |
\n");
}
buf.append("| Total Known Remote Leasesets: | ").append(leases.size()-1).append(" |
\n");
} else {
@@ -817,8 +770,6 @@ class NetDbRenderer {
medianCount = rapCount / 2;
}
- boolean linkSusi = _context.portMapper().isRegistered("susidns");
- long now = _context.clock().now();
buf.append("");
boolean ldebug = debug || client != null;
for (LeaseSet ls : leases) {