diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java
index 2e56e858b..47a07c374 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java
@@ -1,11 +1,15 @@
package net.i2p.router.web;
+import java.text.Collator;
import java.text.DateFormat;
import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.Date;
import java.util.Iterator;
+import java.util.List;
import java.util.Locale;
-import java.util.Set;
import net.i2p.data.DataHelper;
import net.i2p.data.Destination;
@@ -346,20 +350,16 @@ public class SummaryHelper extends HelperBase {
* @return html section summary
*/
public String getDestinations() {
- Set clients = _context.clientManager().listClients();
+ // covert the set to a list so we can sort by name and not lose duplicates
+ List clients = new ArrayList(_context.clientManager().listClients());
+ Collections.sort(clients, new AlphaComparator());
StringBuffer buf = new StringBuffer(512);
buf.append("Local destinations
");
for (Iterator iter = clients.iterator(); iter.hasNext(); ) {
Destination client = (Destination)iter.next();
- TunnelPoolSettings in = _context.tunnelManager().getInboundSettings(client.calculateHash());
- TunnelPoolSettings out = _context.tunnelManager().getOutboundSettings(client.calculateHash());
- String name = (in != null ? in.getDestinationNickname() : null);
- if (name == null)
- name = (out != null ? out.getDestinationNickname() : null);
- if (name == null)
- name = client.calculateHash().toBase64().substring(0,6);
+ String name = getName(client);
buf.append("* ").append(name).append("
\n");
LeaseSet ls = _context.netDb().lookupLeaseSetLocally(client.calculateHash());
@@ -373,14 +373,38 @@ public class SummaryHelper extends HelperBase {
buf.append("No leases
\n");
}
buf.append("Details ");
+ buf.append("\" target=\"_top\">Details ");
buf.append("Config
\n");
+ buf.append("\" target=\"_top\">Config
\n");
}
buf.append("