diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/BanlistRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/BanlistRenderer.java index 29e1c482bff7ca53d97aa42c3a469ca2de14474b..8ab9a643ee96d7a4bba2c86bedf96eb4f833ded1 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/BanlistRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/BanlistRenderer.java @@ -43,15 +43,16 @@ class BanlistRenderer { public void renderStatusHTML(Writer out) throws IOException { StringBuilder buf = new StringBuilder(1024); - // move to the jsp - //buf.append("<h2>Banned Peers</h2>"); Map<Hash, Banlist.Entry> entries = new TreeMap<Hash, Banlist.Entry>(new HashComparator()); entries.putAll(_context.banlist().getEntries()); + buf.append("<h3 id=\"bannedpeers\">").append(_t("Banned Peers")); if (entries.isEmpty()) { - buf.append("<i>").append(_t("none")).append("</i>"); + buf.append("</h3><i>").append(_t("none")).append("</i>"); out.write(buf.toString()); return; + } else { + buf.append(" (").append(entries.size()).append(")</h3>"); } buf.append("<ul id=\"banlist\">"); diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigPeerHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigPeerHelper.java index 67815308de921c382e8fc14b89dd42cc58932e3b..e18819d5341b3827cba7fda4b3f9eb747152fbe5 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigPeerHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigPeerHelper.java @@ -21,9 +21,12 @@ public class ConfigPeerHelper extends HelperBase { out.write("<table id=\"bannedips\"><tr><td>" + "<table id=\"banneduntilrestart\"><tr><th align=\"center\"><b>"); out.write(_t("IPs Banned Until Restart")); - out.write("</b></th></tr>"); List<Integer> singles = bl.getTransientIPv4Blocks(); List<BigInteger> s6 = bl.getTransientIPv6Blocks(); + int sz = singles.size() + s6.size(); + if (sz > 0) + out.write(" (" + sz + ')'); + out.write("</b></th></tr>"); if (!(singles.isEmpty() && s6.isEmpty())) { if (!singles.isEmpty()) { Collections.sort(singles); diff --git a/apps/routerconsole/jsp/configpeer.jsp b/apps/routerconsole/jsp/configpeer.jsp index a65d5b0696ad6899ea219dfb81e654420806d7c5..2ff2a2d410690921eb15f9c717970baacbcb9cd7 100644 --- a/apps/routerconsole/jsp/configpeer.jsp +++ b/apps/routerconsole/jsp/configpeer.jsp @@ -82,7 +82,7 @@ </tr> </table> </form> - <a name="banlist"> </a><h3 id="bannedpeers"><%=intl._t("Banned Peers")%></h3> +<%-- h3 in BanlistRenderer --%> <jsp:useBean class="net.i2p.router.web.helpers.ProfilesHelper" id="profilesHelper" scope="request" /> <jsp:setProperty name="profilesHelper" property="contextId" value="<%=i2pcontextId%>" /> <% profilesHelper.storeWriter(out); %>