forked from I2P_Developers/i2p.i2p
* Console: Sort plugin links in summary bar
This commit is contained in:
@ -1,6 +1,8 @@
|
|||||||
package net.i2p.router.web;
|
package net.i2p.router.web;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
@ -31,9 +33,12 @@ public class NavHelper {
|
|||||||
if (_apps.isEmpty())
|
if (_apps.isEmpty())
|
||||||
return "";
|
return "";
|
||||||
StringBuilder buf = new StringBuilder(256);
|
StringBuilder buf = new StringBuilder(256);
|
||||||
for (Iterator<String> iter = _apps.keySet().iterator(); iter.hasNext(); ) {
|
List<String> l = new ArrayList(_apps.keySet());
|
||||||
String name = iter.next();
|
Collections.sort(l);
|
||||||
|
for (String name : l) {
|
||||||
String path = _apps.get(name);
|
String path = _apps.get(name);
|
||||||
|
if (path == null)
|
||||||
|
continue;
|
||||||
buf.append(" <a target=\"_top\" href=\"").append(path).append("\">");
|
buf.append(" <a target=\"_top\" href=\"").append(path).append("\">");
|
||||||
buf.append(name).append("</a>");
|
buf.append(name).append("</a>");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user