From ef06fc758cce6aee0cdfd44d912da72c0fd40e8e Mon Sep 17 00:00:00 2001 From: str4d Date: Thu, 31 May 2012 09:30:30 +0000 Subject: [PATCH 01/11] Show news headings in the /home sidebar when the main news div is hidden Note: this now refreshes along with the rest of the sidebar, so the news.xml file is read once every 15s - it may be better to cache the headings somewhere, though it's debatable whether reading the cache file is better than reading the news.xml file... --- .../src/net/i2p/router/web/NewsHelper.java | 41 ++++++++++++++++++- apps/routerconsole/jsp/home.jsp | 16 +++----- apps/routerconsole/jsp/xhr1.jsi | 7 ++++ apps/routerconsole/jsp/xhr1.jsp | 7 ++++ .../resources/themes/console/dark/console.css | 9 ++++ 5 files changed, 68 insertions(+), 12 deletions(-) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java index 709c4505ff..3e4bfc19f7 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java @@ -16,7 +16,46 @@ public class NewsHelper extends ContentHelper { if (!news.exists()) _page = (new File(_context.getBaseDir(), "docs/initialNews/initialNews.xml")).getAbsolutePath(); return super.getContent(); - } + } + + /** @since 0.9.1 */ + public String getNewsHeadings() { + StringBuilder buf = new StringBuilder(512); + String consoleNonce = System.getProperty("router.consoleNonce"); + if (consoleNonce != null) { + // Set up string containing to show news. + String newsUrl = ""; + // Set up title and pre-headings stuff. + buf.append("

").append(_("News & Updates")) + .append("


\n"); + // Get news content. + String newsContent = getContent(); + if (newsContent != "") { + buf.append("\n"); + buf.append(newsUrl).append(Messages.getString("Show news", _context)).append("\n"); + } else { + buf.append("
").append(_("none")).append("
"); + } + // Add post-headings stuff. + buf.append("
\n"); + } + return buf.toString(); + } /** @since 0.8.12 */ public boolean shouldShowNews() { diff --git a/apps/routerconsole/jsp/home.jsp b/apps/routerconsole/jsp/home.jsp index 21b4f6d3cc..f4088cc031 100644 --- a/apps/routerconsole/jsp/home.jsp +++ b/apps/routerconsole/jsp/home.jsp @@ -20,6 +20,11 @@ %> " /> +<% + java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml"); +%> + + " /> @@ -33,14 +38,6 @@ <%@include file="xhr1.jsi" %> -<% - if (!newshelper.shouldShowNews()) { -%> -

<%=intl._("News")%>


- -<% - } // !shouldShowNews() -%> @@ -48,11 +45,8 @@ <% if (newshelper.shouldShowNews()) { - java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml"); %>
- -

diff --git a/apps/routerconsole/jsp/xhr1.jsi b/apps/routerconsole/jsp/xhr1.jsi index a171d0c852..c75ec3eace 100644 --- a/apps/routerconsole/jsp/xhr1.jsi +++ b/apps/routerconsole/jsp/xhr1.jsi @@ -17,6 +17,13 @@

"><%=intl._("Network")%>:


+<% + if (!newshelper.shouldShowNews()) { +%> +
+<% + } // !shouldShowNews() +%>
diff --git a/apps/routerconsole/jsp/xhr1.jsp b/apps/routerconsole/jsp/xhr1.jsp index 95c27683b7..b48e824421 100644 --- a/apps/routerconsole/jsp/xhr1.jsp +++ b/apps/routerconsole/jsp/xhr1.jsp @@ -11,4 +11,11 @@ %> " /> + +" /> +<% + java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml"); +%> + + <%@include file="xhr1.jsi" %> diff --git a/installer/resources/themes/console/dark/console.css b/installer/resources/themes/console/dark/console.css index acc5d6b9b5..2c32a68f34 100644 --- a/installer/resources/themes/console/dark/console.css +++ b/installer/resources/themes/console/dark/console.css @@ -170,6 +170,10 @@ div.routersummary h4 { line-height: 100%; } +div.routersummary ul { + text-align: left !important; +} + div.routersummary table { border: 0; text-align: center !important; @@ -227,6 +231,11 @@ div routersummary hr:last-child { margin-bottom: -5px !important; } +div.newsheadings { + text-align: right; + margin: 0 0 0 10px; +} + div.tunnels { padding-top: 3px !important; margin-left: -4px; From b23414eab1c17e9150541ad1a2b7f86d9482e52d Mon Sep 17 00:00:00 2001 From: str4d Date: Fri, 1 Jun 2012 01:21:57 +0000 Subject: [PATCH 02/11] Reordered /home summarybar, added
after update download button --- .../java/src/net/i2p/router/web/SummaryHelper.java | 2 +- apps/routerconsole/jsp/xhr1.jsi | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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 4e7d2f23fb..80456d6044 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java @@ -651,7 +651,7 @@ public class SummaryHelper extends HelperBase { .append(_("Download Unsigned
Update {0}", getUnsignedUpdateVersion())) .append("
\n"); } - buf.append("\n"); + buf.append("
\n"); } } return buf.toString(); diff --git a/apps/routerconsole/jsp/xhr1.jsi b/apps/routerconsole/jsp/xhr1.jsi index c75ec3eace..4a646c7590 100644 --- a/apps/routerconsole/jsp/xhr1.jsi +++ b/apps/routerconsole/jsp/xhr1.jsi @@ -14,9 +14,6 @@ reqURI = reqURI.replace("/xhr1.jsp", "/home"); helper.setRequestURI(reqURI); %> -

"><%=intl._("Network")%>: -

-
<% if (!newshelper.shouldShowNews()) { %> @@ -25,7 +22,10 @@ } // !shouldShowNews() %> - +

"><%=intl._("Network")%>: +


+
+ From 69d909d3eb2bf35f6e7fa314ce53f0de71840518 Mon Sep 17 00:00:00 2001 From: str4d Date: Sun, 3 Jun 2012 00:22:03 +0000 Subject: [PATCH 03/11] Added
s to separate the various logs on /logs --- apps/routerconsole/jsp/logs.jsp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/routerconsole/jsp/logs.jsp b/apps/routerconsole/jsp/logs.jsp index 373e386ebd..0f470e7c9d 100644 --- a/apps/routerconsole/jsp/logs.jsp +++ b/apps/routerconsole/jsp/logs.jsp @@ -33,8 +33,10 @@

<%=intl._("Note that system information, log timestamps, and log messages may provide clues to your location; please review everything you include in a bug report.")%>

<%=intl._("Critical Logs")%>

+

<%=intl._("Router Logs")%> (<%=intl._("configure")%>)

+

<%=intl._("Service (Wrapper) Logs")%>


From 910001e3a141dc9f9a33802f51b87c39a69b1e31 Mon Sep 17 00:00:00 2001 From: str4d Date: Mon, 4 Jun 2012 13:10:12 +0000 Subject: [PATCH 04/11] Split HTML rendering of summary bar into separate methods This solidifies the summary bar design pattern of modular sections separated by
s which in future could be reordered or hidden without affecting the theme. --- .../i2p/router/web/SummaryBarRenderer.java | 346 +++++++++++------- 1 file changed, 204 insertions(+), 142 deletions(-) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java index a61e543cc8..435388dca9 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java @@ -39,13 +39,10 @@ public class SummaryBarRenderer { .append(_("I2P Router Console")) .append("\" title=\"") .append(_("I2P Router Console")) - .append("\">
") - - .append("

") - .append(_("Help & FAQ")) - .append("


"); + .append("\">\n") + .append("
\n") + .append(renderHelpAndFAQHTML()) + .append("
\n"); File lpath = new File(_context.getBaseDir(), "docs/toolbar.html"); // you better have target="_top" for the links in there... @@ -55,118 +52,172 @@ public class SummaryBarRenderer { linkhelper.setMaxLines("100"); buf.append(linkhelper.getContent()); } else { - buf.append("

") - .append(_("I2P Services")) - .append("

\n" + - - "
" + - - "") - .append(_("Email")) - .append("\n" + - - "") - .append(_("Torrents")) - .append("\n" + - - "") - .append(_("Website")) - .append("\n") - - .append(NavHelper.getClientAppLinks(_context)) - - .append("
\n" + - - "

") - .append(_("I2P Internals")) - .append("


\n" + - - "
\n" + - - "") - .append(_("Tunnels")) - .append("\n" + - - "") - .append(_("Peers")) - .append("\n" + - - "") - .append(_("Profiles")) - .append("\n" + - - "") - .append(_("NetDB")) - .append("\n" + - - "") - .append(_("Logs")) - .append("\n"); - - // "") - // .append(_("Jobs")) - // .append("\n" + - - if (!StatSummarizer.isDisabled()) { - buf.append("") - .append(_("Graphs")) - .append("\n"); - } - - buf.append("") - .append(_("Stats")) - .append("\n" + - - "") - .append(_("I2PTunnel")) - .append("\n" + - - "") - .append(_("Addressbook")) - .append("\n"); - - File javadoc = new File(_context.getBaseDir(), "docs/javadoc/index.html"); - if (javadoc.exists()) - buf.append("Javadoc\n"); - buf.append("
\n"); + buf.append(renderI2PServicesHTML()) + .append("
\n") + .append(renderI2PInternalsHTML()); out.write(buf.toString()); buf.setLength(0); } + buf.append("
\n") + .append(renderGeneralHTML()) + .append("
\n") + .append(renderNetworkReachabilityHTML()) + .append("
\n") + .append(_helper.getUpdateStatus()) + .append(_helper.getRestartStatus()) + .append("
\n") + .append(renderPeersHTML()) + .append("
\n"); + + out.write(buf.toString()); + buf.setLength(0); + + buf.append(_helper.getFirewallAndReseedStatus()); + + buf.append(renderBandwidthHTML()) + .append("
\n") + .append(renderTunnelsHTML()) + .append("
\n") + .append(renderCongestionHTML()) + .append("
\n") + .append(renderTunnelStatusHTML()) + .append("
\n") + .append(_helper.getDestinations()) + .append("
\n"); - buf.append("

") + .append(_("Help & FAQ")) + .append("

"); + return buf.toString(); + } + + public String renderI2PServicesHTML() { + StringBuilder buf = new StringBuilder(512); + buf.append("

") + .append(_("I2P Services")) + .append("

\n" + + + "
" + + + "") + .append(_("Email")) + .append("\n" + + + "") + .append(_("Torrents")) + .append("\n" + + + "") + .append(_("Website")) + .append("\n") + + .append(NavHelper.getClientAppLinks(_context)) + + .append("
\n"); + return buf.toString(); + } + + public String renderI2PInternalsHTML() { + StringBuilder buf = new StringBuilder(512); + buf.append("

") + .append(_("I2P Internals")) + .append("


\n" + + + "
\n" + + + "") + .append(_("Tunnels")) + .append("\n" + + + "") + .append(_("Peers")) + .append("\n" + + + "") + .append(_("Profiles")) + .append("\n" + + + "") + .append(_("NetDB")) + .append("\n" + + + "") + .append(_("Logs")) + .append("\n"); + + // "") + // .append(_("Jobs")) + // .append("\n" + + + if (!StatSummarizer.isDisabled()) { + buf.append("") + .append(_("Graphs")) + .append("\n"); + } + + buf.append("") + .append(_("Stats")) + .append("\n" + + + "") + .append(_("I2PTunnel")) + .append("\n" + + + "") + .append(_("Addressbook")) + .append("\n"); + + File javadoc = new File(_context.getBaseDir(), "docs/javadoc/index.html"); + if (javadoc.exists()) + buf.append("Javadoc\n"); + buf.append("
\n"); + return buf.toString(); + } + + public String renderGeneralHTML() { + StringBuilder buf = new StringBuilder(512); + buf.append("

") .append(_("General")) @@ -202,24 +253,25 @@ public class SummaryBarRenderer { .append(":" + "") .append(_helper.getUptime()) - .append("\n" + + .append("\n"); + return buf.toString(); + } - "

") .append(_("Network")) .append(": ") .append(_helper.getReachability()) - .append("


\n") + .append("

\n"); + return buf.toString(); + } - - .append(_helper.getUpdateStatus()) - - - .append(_helper.getRestartStatus()) - - - .append("

") .append(_("Peers")) @@ -260,14 +312,12 @@ public class SummaryBarRenderer { .append(_helper.getAllPeers()) .append("\n" + - "
\n"); - - - out.write(buf.toString()); - buf.setLength(0); - - buf.append(_helper.getFirewallAndReseedStatus()); + "\n"); + return buf.toString(); + } + public String renderBandwidthHTML() { + StringBuilder buf = new StringBuilder(512); buf.append("

") @@ -303,9 +353,15 @@ public class SummaryBarRenderer { .append(_helper.getInboundTransferred()) .append(SummaryHelper.THINSP) .append(_helper.getOutboundTransferred()) - .append("\n" + + .append("\n" + - "

\n"); + return buf.toString(); + } + + public String renderTunnelsHTML() { + StringBuilder buf = new StringBuilder(512); + buf.append("

") .append(_("Tunnels")) @@ -336,7 +392,13 @@ public class SummaryBarRenderer { .append(_helper.getShareRatio()) .append("\n" + - "

\n"); + return buf.toString(); + } + + public String renderCongestionHTML() { + StringBuilder buf = new StringBuilder(512); + buf.append("

") .append(_("Congestion")) @@ -369,16 +431,16 @@ public class SummaryBarRenderer { .append(_helper.getInboundBacklog()) .append("\n" + - "

") + "\n"); + return buf.toString(); + } + + public String renderTunnelStatusHTML() { + StringBuilder buf = new StringBuilder(50); + buf.append("

") .append(_(_helper.getTunnelStatus())) - .append("


\n") - - .append(_helper.getDestinations()) - .append("
\n"); - - - - out.write(buf.toString()); + .append("

\n"); + return buf.toString(); } /** translate a string */ From 9333cd56f96e61d3fc870e62fa8ec920e872300f Mon Sep 17 00:00:00 2001 From: str4d Date: Mon, 4 Jun 2012 13:28:52 +0000 Subject: [PATCH 05/11] Moved calls to external renderers into separate methods to match the rest --- .../i2p/router/web/SummaryBarRenderer.java | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java index 435388dca9..86ad131419 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java @@ -65,8 +65,8 @@ public class SummaryBarRenderer { .append("
\n") .append(renderNetworkReachabilityHTML()) .append("
\n") - .append(_helper.getUpdateStatus()) - .append(_helper.getRestartStatus()) + .append(renderUpdateStatusHTML()) + .append(renderRestartStatusHTML()) .append("
\n") .append(renderPeersHTML()) .append("
\n"); @@ -74,9 +74,8 @@ public class SummaryBarRenderer { out.write(buf.toString()); buf.setLength(0); - buf.append(_helper.getFirewallAndReseedStatus()); - - buf.append(renderBandwidthHTML()) + buf.append(renderFirewallAndReseedStatusHTML()) + .append(renderBandwidthHTML()) .append("
\n") .append(renderTunnelsHTML()) .append("
\n") @@ -87,8 +86,6 @@ public class SummaryBarRenderer { .append(_helper.getDestinations()) .append("
\n"); - - out.write(buf.toString()); } @@ -269,6 +266,18 @@ public class SummaryBarRenderer { return buf.toString(); } + public String renderUpdateStatusHTML() { + StringBuilder buf = new StringBuilder(512); + buf.append(_helper.getUpdateStatus()); + return buf.toString(); + } + + public String renderRestartStatusHTML() { + StringBuilder buf = new StringBuilder(512); + buf.append(_helper.getRestartStatus()); + return buf.toString(); + } + public String renderPeersHTML() { StringBuilder buf = new StringBuilder(512); buf.append("

Date: Mon, 4 Jun 2012 23:46:03 +0000 Subject: [PATCH 06/11] Moved rendering of news headings into SummaryBarRenderer An instance of NewsHelper needs to be passed in to get output. --- .../src/net/i2p/router/web/NewsHelper.java | 37 +-------- .../i2p/router/web/SummaryBarRenderer.java | 77 ++++++++++++++++++- 2 files changed, 78 insertions(+), 36 deletions(-) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java index 3e4bfc19f7..833e197a04 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java @@ -20,41 +20,8 @@ public class NewsHelper extends ContentHelper { /** @since 0.9.1 */ public String getNewsHeadings() { - StringBuilder buf = new StringBuilder(512); - String consoleNonce = System.getProperty("router.consoleNonce"); - if (consoleNonce != null) { - // Set up string containing to show news. - String newsUrl = ""; - // Set up title and pre-headings stuff. - buf.append("

").append(_("News & Updates")) - .append("


\n"); - // Get news content. - String newsContent = getContent(); - if (newsContent != "") { - buf.append("
    \n"); - // Parse news content for headings. - int start = newsContent.indexOf("

    "); - while (start >= 0) { - // Add offset to start: - // 4 - gets rid of

    - // 16 - gets rid of the date as well (assuming form "

    yyyy-mm-dd: Foobarbaz...") - newsContent = newsContent.substring(start+16, newsContent.length()); - int end = newsContent.indexOf("

    "); - if (end >= 0) { - String heading = newsContent.substring(0, end); - buf.append("
  • ").append(heading).append("
  • \n"); - } - start = newsContent.indexOf("

    "); - } - buf.append("

\n"); - buf.append(newsUrl).append(Messages.getString("Show news", _context)).append("\n"); - } else { - buf.append("
").append(_("none")).append("
"); - } - // Add post-headings stuff. - buf.append("
\n"); - } - return buf.toString(); + SummaryBarRenderer renderer = new SummaryBarRenderer(_context, this); + return renderer.renderNewsHeadingsHTML(); } /** @since 0.8.12 */ diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java index 86ad131419..2fd6c80732 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java @@ -14,10 +14,20 @@ import net.i2p.router.RouterContext; public class SummaryBarRenderer { private final RouterContext _context; private final SummaryHelper _helper; + private final NewsHelper _newshelper; public SummaryBarRenderer(RouterContext context, SummaryHelper helper) { + this(context, helper, null); + } + + public SummaryBarRenderer(RouterContext context, NewsHelper newshelper) { + this(context, null, newshelper); + } + + public SummaryBarRenderer(RouterContext context, SummaryHelper helper, NewsHelper newshelper) { _context = context; _helper = helper; + _newshelper = newshelper; } /** @@ -83,7 +93,7 @@ public class SummaryBarRenderer { .append("
\n") .append(renderTunnelStatusHTML()) .append("
\n") - .append(_helper.getDestinations()) + .append(renderDestinationsHTML()) .append("
\n"); out.write(buf.toString()); @@ -213,6 +223,7 @@ public class SummaryBarRenderer { } public String renderGeneralHTML() { + if (_helper == null) return ""; StringBuilder buf = new StringBuilder(512); buf.append("

") .append(_(_helper.getTunnelStatus())) @@ -458,6 +478,61 @@ public class SummaryBarRenderer { return buf.toString(); } + public String renderDestinationsHTML() { + if (_helper == null) return ""; + StringBuilder buf = new StringBuilder(512); + buf.append(_helper.getDestinations()); + return buf.toString(); + } + + /** @since 0.9.1 */ + public String renderNewsHeadingsHTML() { + if (_newshelper == null) return ""; + StringBuilder buf = new StringBuilder(512); + String consoleNonce = System.getProperty("router.consoleNonce"); + if (consoleNonce != null) { + // Set up title and pre-headings stuff. + buf.append("

") + .append(_("News & Updates")) + .append("


\n"); + // Get news content. + String newsContent = _newshelper.getContent(); + if (newsContent != "") { + buf.append("
    \n"); + // Parse news content for headings. + int start = newsContent.indexOf("

    "); + while (start >= 0) { + // Add offset to start: + // 4 - gets rid of

    + // 16 - gets rid of the date as well (assuming form "

    yyyy-mm-dd: Foobarbaz...") + newsContent = newsContent.substring(start+16, newsContent.length()); + int end = newsContent.indexOf("

    "); + if (end >= 0) { + String heading = newsContent.substring(0, end); + buf.append("
  • ") + .append(heading) + .append("
  • \n"); + } + start = newsContent.indexOf("

    "); + } + buf.append("

\n"); + // Set up string containing to show news. + buf.append("") + .append(_("Show news")) + .append("\n"); + } else { + buf.append("
") + .append(_("none")) + .append("
"); + } + // Add post-headings stuff. + buf.append("
\n"); + } + return buf.toString(); + } + /** translate a string */ private String _(String s) { return Messages.getString(s, _context); From 5699b4515b593b0b4fa33f01063f753d949008d1 Mon Sep 17 00:00:00 2001 From: str4d Date: Tue, 5 Jun 2012 02:12:30 +0000 Subject: [PATCH 07/11] Preparations for making the summary bar customisable --- .../i2p/router/web/SummaryBarRenderer.java | 53 ++++++++++++++++++- .../src/net/i2p/router/web/SummaryHelper.java | 29 ++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java index 2fd6c80732..fa04bccad9 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java @@ -3,6 +3,9 @@ package net.i2p.router.web; import java.io.File; import java.io.IOException; import java.io.Writer; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import net.i2p.data.DataHelper; import net.i2p.router.RouterContext; @@ -12,6 +15,31 @@ import net.i2p.router.RouterContext; * */ public class SummaryBarRenderer { + static final Map sections; + static { + Map aMap = new HashMap();; + try { + aMap.put("HelpAndFAQ", SummaryBarRenderer.class.getMethod("renderHelpAndFAQHTML")); + aMap.put("I2PServices", SummaryBarRenderer.class.getMethod("renderI2PServicesHTML")); + aMap.put("I2PInternals", SummaryBarRenderer.class.getMethod("renderI2PInternalsHTML")); + aMap.put("General", SummaryBarRenderer.class.getMethod("renderGeneralHTML")); + aMap.put("ShortGeneral", SummaryBarRenderer.class.getMethod("renderShortGeneralHTML")); + aMap.put("NetworkReachability", SummaryBarRenderer.class.getMethod("renderNetworkReachabilityHTML")); + aMap.put("UpdateStatus", SummaryBarRenderer.class.getMethod("renderUpdateStatusHTML")); + aMap.put("RestartStatus", SummaryBarRenderer.class.getMethod("renderRestartStatusHTMLHTML")); + aMap.put("Peers", SummaryBarRenderer.class.getMethod("renderPeersHTML")); + aMap.put("FirewallAndReseedStatus", SummaryBarRenderer.class.getMethod("renderFirewallAndReseedStatusHTML")); + aMap.put("Bandwidth", SummaryBarRenderer.class.getMethod("renderBandwidthHTML")); + aMap.put("Tunnels", SummaryBarRenderer.class.getMethod("renderTunnelsHTML")); + aMap.put("Congestion", SummaryBarRenderer.class.getMethod("renderCongestionHTML")); + aMap.put("TunnelStatus", SummaryBarRenderer.class.getMethod("renderTunnelStatusHTML")); + aMap.put("Destinations", SummaryBarRenderer.class.getMethod("renderDestinationsHTML")); + aMap.put("NewsHeadings", SummaryBarRenderer.class.getMethod("renderNewsHeadingsHTML")); + } catch (java.lang.NoSuchMethodException e) { + } + sections = Collections.unmodifiableMap(aMap); + } + private final RouterContext _context; private final SummaryHelper _helper; private final NewsHelper _newshelper; @@ -265,6 +293,29 @@ public class SummaryBarRenderer { return buf.toString(); } + public String renderShortGeneralHTML() { + if (_helper == null) return ""; + StringBuilder buf = new StringBuilder(512); + buf.append("" + + "" + + "\n" + + + "" + + "" + + "
") + .append(_("Version")) + .append(":") + .append(_helper.getVersion()) + .append("
") + .append(_("Uptime")) + .append(":") + .append(_helper.getUptime()) + .append("
\n"); + return buf.toString(); + } + public String renderNetworkReachabilityHTML() { if (_helper == null) return ""; StringBuilder buf = new StringBuilder(512); @@ -487,7 +538,7 @@ public class SummaryBarRenderer { /** @since 0.9.1 */ public String renderNewsHeadingsHTML() { - if (_newshelper == null) return ""; + if (_newshelper == null || _newshelper.shouldShowNews()) return ""; StringBuilder buf = new StringBuilder(512); String consoleNonce = System.getProperty("router.consoleNonce"); if (consoleNonce != null) { 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 80456d6044..282c1be1ee 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java @@ -35,6 +35,35 @@ public class SummaryHelper extends HelperBase { // Opera 10.63 doesn't have the char, TODO check UA //static final String THINSP = " / "; static final String THINSP = " / "; + private static final char S = ','; + static final String PROP_SUMMARYBAR = "routerconsole.summarybar"; + + static final String PRESET_FULL = + "HelpAndFAQ" + S + + "I2PServices" + S + + "I2PInternals" + S + + "General" + S + + "NetworkReachability" + S + + "UpdateStatus" + S + + "RestartStatus" + S + + "Peers" + S + + "FirewallAndReseedStatus" + S + + "Bandwidth" + S + + "Tunnels" + S + + "Congestion" + S + + "TunnelStatus" + S + + "Destinations" + S + + ""; + + static final String PRESET_SHORT = + "ShortGeneral" + S + + "NewsHeadings" + S + + "UpdateStatus" + S + + "NetworkReachability" + S + + "FirewallAndReseedStatus" + S + + "Destinations" + S + + "RestartStatus" + S + + ""; /** * Retrieve the shortened 4 character ident for the router located within From 531c6c0f4c4e8cea259e42550da58a419345b951 Mon Sep 17 00:00:00 2001 From: str4d Date: Tue, 5 Jun 2012 07:36:24 +0000 Subject: [PATCH 08/11] Implementation of customisable summary bar via routerconsole.summaryBar property The initial attempt using mapping of strings to methods is shorter and neater, but also doesn't work so is commented out. --- .../i2p/router/web/SummaryBarRenderer.java | 102 ++++++++++-------- .../src/net/i2p/router/web/SummaryHelper.java | 14 ++- apps/routerconsole/jsp/summaryframe.jsp | 2 +- 3 files changed, 69 insertions(+), 49 deletions(-) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java index fa04bccad9..756126895f 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java @@ -15,7 +15,7 @@ import net.i2p.router.RouterContext; * */ public class SummaryBarRenderer { - static final Map sections; + /*static final Map ALL_SECTIONS; static { Map aMap = new HashMap();; try { @@ -37,8 +37,8 @@ public class SummaryBarRenderer { aMap.put("NewsHeadings", SummaryBarRenderer.class.getMethod("renderNewsHeadingsHTML")); } catch (java.lang.NoSuchMethodException e) { } - sections = Collections.unmodifiableMap(aMap); - } + ALL_SECTIONS = Collections.unmodifiableMap(aMap); + }*/ private final RouterContext _context; private final SummaryHelper _helper; @@ -77,54 +77,62 @@ public class SummaryBarRenderer { .append(_("I2P Router Console")) .append("\" title=\"") .append(_("I2P Router Console")) - .append("\">\n") - .append("
\n") - .append(renderHelpAndFAQHTML()) - .append("
\n"); + .append("\">\n"); - File lpath = new File(_context.getBaseDir(), "docs/toolbar.html"); - // you better have target="_top" for the links in there... - if (lpath.exists()) { - ContentHelper linkhelper = new ContentHelper(); - linkhelper.setPage(lpath.getAbsolutePath()); - linkhelper.setMaxLines("100"); - buf.append(linkhelper.getContent()); - } else { - buf.append(renderI2PServicesHTML()) - .append("
\n") - .append(renderI2PInternalsHTML()); + out.write(buf.toString()); - out.write(buf.toString()); + String[] sections = _helper.getSummaryBarSections(); + for (int i = 0; i < sections.length; i++) { + /*try { + String section = (String)ALL_SECTIONS.get(sections[i]).invoke(this); + if (section != null && section != "") { + out.write("
" + i + "
\n" + section); + } + } catch (Exception e) { + out.write("
" +i + " - Exception
\n" + e); + }*/ buf.setLength(0); + + String section = sections[i]; + + buf.append("
\n"); + if ("HelpAndFAQ".equals(section)) + buf.append(renderHelpAndFAQHTML()); + else if ("I2PServices".equals(section)) + buf.append(renderI2PServicesHTML()); + else if ("I2PInternals".equals(section)) + buf.append(renderI2PInternalsHTML()); + else if ("General".equals(section)) + buf.append(renderGeneralHTML()); + else if ("ShortGeneral".equals(section)) + buf.append(renderShortGeneralHTML()); + else if ("NetworkReachability".equals(section)) + buf.append(renderNetworkReachabilityHTML()); + else if ("UpdateStatus".equals(section)) + buf.append(renderUpdateStatusHTML()); + else if ("RestartStatus".equals(section)) + buf.append(renderRestartStatusHTML()); + else if ("Peers".equals(section)) + buf.append(renderPeersHTML()); + else if ("FirewallAndReseedStatus".equals(section)) + buf.append(renderFirewallAndReseedStatusHTML()); + else if ("Bandwidth".equals(section)) + buf.append(renderBandwidthHTML()); + else if ("Tunnels".equals(section)) + buf.append(renderTunnelsHTML()); + else if ("Congestion".equals(section)) + buf.append(renderCongestionHTML()); + else if ("TunnelStatus".equals(section)) + buf.append(renderTunnelStatusHTML()); + else if ("Destinations".equals(section)) + buf.append(renderDestinationsHTML()); + else if ("NewsHeadings".equals(section)) + buf.append(renderNewsHeadingsHTML()); + + // Only output section if there's more than the
to print + if (buf.length() > 5) + out.write(buf.toString()); } - - buf.append("
\n") - .append(renderGeneralHTML()) - .append("
\n") - .append(renderNetworkReachabilityHTML()) - .append("
\n") - .append(renderUpdateStatusHTML()) - .append(renderRestartStatusHTML()) - .append("
\n") - .append(renderPeersHTML()) - .append("
\n"); - - out.write(buf.toString()); - buf.setLength(0); - - buf.append(renderFirewallAndReseedStatusHTML()) - .append(renderBandwidthHTML()) - .append("
\n") - .append(renderTunnelsHTML()) - .append("
\n") - .append(renderCongestionHTML()) - .append("
\n") - .append(renderTunnelStatusHTML()) - .append("
\n") - .append(renderDestinationsHTML()) - .append("
\n"); - - out.write(buf.toString()); } public String renderHelpAndFAQHTML() { 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 282c1be1ee..46c6d58af6 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java @@ -36,7 +36,7 @@ public class SummaryHelper extends HelperBase { //static final String THINSP = " / "; static final String THINSP = " / "; private static final char S = ','; - static final String PROP_SUMMARYBAR = "routerconsole.summarybar"; + static final String PROP_SUMMARYBAR = "routerconsole.summaryBar"; static final String PRESET_FULL = "HelpAndFAQ" + S + @@ -739,6 +739,18 @@ public class SummaryHelper extends HelperBase { return buf.toString(); } + public String[] getSummaryBarSections() { + String config = _context.getProperty(PROP_SUMMARYBAR, PRESET_FULL); + return config.split("" + S); + } + + public void saveSummaryBarSections(String[] sections) { + StringBuilder buf = new StringBuilder(512); + for(int i = 0; i < sections.length; i++) + buf.append(sections[i]).append(S); + _context.router().saveConfig(PROP_SUMMARYBAR, buf.toString()); + } + /** output the summary bar to _out */ public void renderSummaryBar() throws IOException { SummaryBarRenderer renderer = new SummaryBarRenderer(_context, this); diff --git a/apps/routerconsole/jsp/summaryframe.jsp b/apps/routerconsole/jsp/summaryframe.jsp index bdd4a8cbc1..5822c9f64d 100644 --- a/apps/routerconsole/jsp/summaryframe.jsp +++ b/apps/routerconsole/jsp/summaryframe.jsp @@ -56,7 +56,7 @@ <% // d and shutdownSoon defined above if (!shutdownSoon) { - out.print("
\n"); + out.print("
\n
\n"); if ("0".equals(d)) { out.print(""); out.print(intl._("Refresh (s)")); From 52a38607175b7ae22c3d5723f218d65cf843514b Mon Sep 17 00:00:00 2001 From: str4d Date: Tue, 5 Jun 2012 12:44:17 +0000 Subject: [PATCH 09/11] Rearrange summary bar code to consolidate Ajax and IFrame, and /home and /console Now, Ajax will be used first, and will fall back to IFrame if JS is disabled, and a separate page if on a text or mobile browser. Also, /home and /console (and everywhere) now all have the same summary bar content, which currently defaults to the original full listing. --- .../src/net/i2p/router/web/NewsHelper.java | 6 --- .../i2p/router/web/SummaryBarRenderer.java | 35 +++------------ .../src/net/i2p/router/web/SummaryHelper.java | 4 ++ apps/routerconsole/jsp/console.jsp | 17 ++++--- apps/routerconsole/jsp/home.jsp | 3 +- apps/routerconsole/jsp/summary.jsi | 15 +++++-- apps/routerconsole/jsp/summaryframe.jsp | 7 +++ apps/routerconsole/jsp/summarynoframe.jsi | 44 ++++++------------- apps/routerconsole/jsp/xhr1.jsi | 44 ++++++++++++------- 9 files changed, 79 insertions(+), 96 deletions(-) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java index 833e197a04..d5d702e8ff 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java @@ -18,12 +18,6 @@ public class NewsHelper extends ContentHelper { return super.getContent(); } - /** @since 0.9.1 */ - public String getNewsHeadings() { - SummaryBarRenderer renderer = new SummaryBarRenderer(_context, this); - return renderer.renderNewsHeadingsHTML(); - } - /** @since 0.8.12 */ public boolean shouldShowNews() { return NewsFetcher.getInstance(_context).shouldShowNews(); diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java index 756126895f..84f1401021 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java @@ -15,6 +15,7 @@ import net.i2p.router.RouterContext; * */ public class SummaryBarRenderer { + // Commented out because broken. Replaced by if-elseif blob below. /*static final Map ALL_SECTIONS; static { Map aMap = new HashMap();; @@ -42,20 +43,10 @@ public class SummaryBarRenderer { private final RouterContext _context; private final SummaryHelper _helper; - private final NewsHelper _newshelper; public SummaryBarRenderer(RouterContext context, SummaryHelper helper) { - this(context, helper, null); - } - - public SummaryBarRenderer(RouterContext context, NewsHelper newshelper) { - this(context, null, newshelper); - } - - public SummaryBarRenderer(RouterContext context, SummaryHelper helper, NewsHelper newshelper) { _context = context; _helper = helper; - _newshelper = newshelper; } /** @@ -64,25 +55,9 @@ public class SummaryBarRenderer { */ public void renderSummaryHTML(Writer out) throws IOException { StringBuilder buf = new StringBuilder(8*1024); - String theme = _context.getProperty(CSSHelper.PROP_THEME_NAME, CSSHelper.DEFAULT_THEME); - - // TODO - the bar would render more cleanly if we specified the img height and width here, - // but unfortunately the images in the different themes are different sizes. - // They range in height from 37 to 43 px. But there's a -2 bottom margin... - // So put it in a div. - buf.append("
\"")
\n"); - - out.write(buf.toString()); - String[] sections = _helper.getSummaryBarSections(); for (int i = 0; i < sections.length; i++) { + // Commented out because broken. Replaced by if-elseif blob below. /*try { String section = (String)ALL_SECTIONS.get(sections[i]).invoke(this); if (section != null && section != "") { @@ -546,7 +521,9 @@ public class SummaryBarRenderer { /** @since 0.9.1 */ public String renderNewsHeadingsHTML() { - if (_newshelper == null || _newshelper.shouldShowNews()) return ""; + if (_helper == null) return ""; + NewsHelper newshelper = _helper.getNewsHelper(); + if (newshelper == null || newshelper.shouldShowNews()) return ""; StringBuilder buf = new StringBuilder(512); String consoleNonce = System.getProperty("router.consoleNonce"); if (consoleNonce != null) { @@ -555,7 +532,7 @@ public class SummaryBarRenderer { .append(_("News & Updates")) .append("


\n"); // Get news content. - String newsContent = _newshelper.getContent(); + String newsContent = newshelper.getContent(); if (newsContent != "") { buf.append("
    \n"); // Parse news content for headings. 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 46c6d58af6..32d3b2bbc6 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java @@ -739,6 +739,10 @@ public class SummaryHelper extends HelperBase { return buf.toString(); } + private NewsHelper _newshelper; + public void storeNewsHelper(NewsHelper n) { _newshelper = n; } + public NewsHelper getNewsHelper() { return _newshelper; } + public String[] getSummaryBarSections() { String config = _context.getProperty(PROP_SUMMARYBAR, PRESET_FULL); return config.split("" + S); diff --git a/apps/routerconsole/jsp/console.jsp b/apps/routerconsole/jsp/console.jsp index c02b64b9a8..7a080d2b98 100644 --- a/apps/routerconsole/jsp/console.jsp +++ b/apps/routerconsole/jsp/console.jsp @@ -6,7 +6,13 @@ <%@include file="css.jsi" %> <%=intl.title("home")%> - + + + <% String consoleNonce = System.getProperty("router.consoleNonce"); if (consoleNonce == null) { @@ -15,16 +21,13 @@ } %> -<%@include file="summary.jsi" %>

    <%=intl._("I2P Router Console")%>

    +<%@include file="summary.jsi" %> + +

    <%=intl._("I2P Router Console")%>

    - - " /> <% if (newshelper.shouldShowNews()) { - java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml"); %> - -
    <% diff --git a/apps/routerconsole/jsp/home.jsp b/apps/routerconsole/jsp/home.jsp index f4088cc031..5183f64a80 100644 --- a/apps/routerconsole/jsp/home.jsp +++ b/apps/routerconsole/jsp/home.jsp @@ -6,7 +6,7 @@ <%=intl.title("home")%> @@ -33,7 +33,6 @@ -
    <%@include file="xhr1.jsi" %> diff --git a/apps/routerconsole/jsp/summary.jsi b/apps/routerconsole/jsp/summary.jsi index 847e42d523..0eb9d77b0b 100644 --- a/apps/routerconsole/jsp/summary.jsi +++ b/apps/routerconsole/jsp/summary.jsi @@ -1,3 +1,10 @@ + +" /> +<% + java.io.File newspath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml"); +%> + +
    <% // The refresh delay, 0 to disable @@ -15,7 +22,7 @@ newDelay = "?refresh=" + d; } if (!"0".equals(d)) - out.print("\n"); + out.print("
    \n"); } else if (allowIFrame) { // since we don't have an iframe this will reload the base page, and // the new delay will be passed to the iframe above - out.print("
    \n" + + out.print("
    \n"); + "
    \n"); } else { out.print("
\n"); } diff --git a/apps/routerconsole/jsp/summaryframe.jsp b/apps/routerconsole/jsp/summaryframe.jsp index 5822c9f64d..218e78ba6a 100644 --- a/apps/routerconsole/jsp/summaryframe.jsp +++ b/apps/routerconsole/jsp/summaryframe.jsp @@ -52,6 +52,13 @@ } %>
+ +" /> +<% + java.io.File newspath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml"); +%> + + <%@include file="summarynoframe.jsi" %> <% // d and shutdownSoon defined above diff --git a/apps/routerconsole/jsp/summarynoframe.jsi b/apps/routerconsole/jsp/summarynoframe.jsi index 63c39e6e54..6fae7c9016 100644 --- a/apps/routerconsole/jsp/summarynoframe.jsi +++ b/apps/routerconsole/jsp/summarynoframe.jsi @@ -1,35 +1,17 @@ -<%@page import="net.i2p.router.web.SummaryHelper" %> <% /* - * Note: - * This is included almost 30 times, so keep whitespace etc. to a minimum. + * TODO - the bar would render more cleanly if we specified the img height and width here, + * but unfortunately the images in the different themes are different sizes. + * They range in height from 37 to 43 px. But there's a -2 bottom margin... + * So put it in a div. */ %> - -" /> -" /> -" /> -" /> - -<% helper.storeWriter(out); %> -<% -/* - * The following is required for the reseed button to work, although we probably - * only need the reseedNonce property. - */ -%> - - -<% -/* - * The following is required for the update buttons to work, although we probably - * only need the updateNonce property. - */ -%> - - -" /> -<% - // moved to java for ease of translation and to avoid 30 copies - helper.renderSummaryBar(); -%> + +
+ +<%@include file="xhr1.jsi" %> +
diff --git a/apps/routerconsole/jsp/xhr1.jsi b/apps/routerconsole/jsp/xhr1.jsi index 4a646c7590..1362cca1f7 100644 --- a/apps/routerconsole/jsp/xhr1.jsi +++ b/apps/routerconsole/jsp/xhr1.jsi @@ -1,31 +1,41 @@ +<%@page import="net.i2p.router.web.SummaryHelper" %> +<% +/* + * Note: + * This is included on every refresh, so keep whitespace etc. to a minimum. + */ +%> " /> " /> -
<%=intl._("Version")%>: - -
<%=intl._("Uptime")%>: - -

" /> " /> <% String reqURI = request.getRequestURI(); if (reqURI != null) - reqURI = reqURI.replace("/xhr1.jsp", "/home"); + reqURI = reqURI.replace("/xhr1.jsp", "/"); helper.setRequestURI(reqURI); %> +<% helper.storeWriter(out); %> +<% helper.storeNewsHelper(newshelper); %> <% - if (!newshelper.shouldShowNews()) { +/* + * The following is required for the reseed button to work, although we probably + * only need the reseedNonce property. + */ %> -
+ + <% - } // !shouldShowNews() +/* + * The following is required for the update buttons to work, although we probably + * only need the updateNonce property. + */ +%> + + +" /> +<% + // moved to java for ease of translation + helper.renderSummaryBar(); %> - -

"><%=intl._("Network")%>: -

-
- - -
- From 83c82338127a8fd52e9176538813460d7999992b Mon Sep 17 00:00:00 2001 From: str4d Date: Tue, 5 Jun 2012 13:00:40 +0000 Subject: [PATCH 10/11] Insert routerconsole.summaryRefresh config value into Ajax script This way, both Ajax and IFrame get their refresh time from config (though IFrame one can still be modified live). --- apps/routerconsole/jsp/console.jsp | 4 ++-- apps/routerconsole/jsp/home.jsp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/routerconsole/jsp/console.jsp b/apps/routerconsole/jsp/console.jsp index 7a080d2b98..96c255fc9d 100644 --- a/apps/routerconsole/jsp/console.jsp +++ b/apps/routerconsole/jsp/console.jsp @@ -9,8 +9,8 @@ <% diff --git a/apps/routerconsole/jsp/home.jsp b/apps/routerconsole/jsp/home.jsp index 5183f64a80..c9379fb3ad 100644 --- a/apps/routerconsole/jsp/home.jsp +++ b/apps/routerconsole/jsp/home.jsp @@ -7,8 +7,8 @@ <% From 420bf851b536374989ab1ff75a38ae9f0d6e2a52 Mon Sep 17 00:00:00 2001 From: str4d Date: Tue, 5 Jun 2012 13:37:10 +0000 Subject: [PATCH 11/11] Added Ajax script to every routerconsole page that includes summary.jsi --- apps/routerconsole/jsp/config.jsp | 8 +++++++- apps/routerconsole/jsp/configadvanced.jsp | 8 +++++++- apps/routerconsole/jsp/configclients.jsp | 9 ++++++++- apps/routerconsole/jsp/confighome.jsp | 8 +++++++- apps/routerconsole/jsp/configkeyring.jsp | 8 +++++++- apps/routerconsole/jsp/configlogging.jsp | 8 +++++++- apps/routerconsole/jsp/confignet.jsp | 8 +++++++- apps/routerconsole/jsp/configpeer.jsp | 8 +++++++- apps/routerconsole/jsp/configreseed.jsp | 8 +++++++- apps/routerconsole/jsp/configservice.jsp | 8 +++++++- apps/routerconsole/jsp/configstats.jsp | 7 +++++++ apps/routerconsole/jsp/configtunnels.jsp | 8 +++++++- apps/routerconsole/jsp/configui.jsp | 8 +++++++- apps/routerconsole/jsp/configupdate.jsp | 8 +++++++- apps/routerconsole/jsp/debug.jsp | 8 +++++++- apps/routerconsole/jsp/error.jsp | 8 +++++++- apps/routerconsole/jsp/graph.jsp | 8 +++++++- apps/routerconsole/jsp/graphs.jsp | 8 +++++++- apps/routerconsole/jsp/help.jsp | 8 +++++++- apps/routerconsole/jsp/help_ar.jsp | 8 +++++++- apps/routerconsole/jsp/help_fr.jsp | 8 +++++++- apps/routerconsole/jsp/help_nl.jsp | 8 +++++++- apps/routerconsole/jsp/help_ru.jsp | 8 +++++++- apps/routerconsole/jsp/jars.jsp | 8 +++++++- apps/routerconsole/jsp/jobs.jsp | 8 +++++++- apps/routerconsole/jsp/logs.jsp | 8 +++++++- apps/routerconsole/jsp/netdb.jsp | 8 +++++++- apps/routerconsole/jsp/nowebapp.jsp | 8 +++++++- apps/routerconsole/jsp/oldconsole.jsp | 8 +++++++- apps/routerconsole/jsp/peers.jsp | 8 +++++++- apps/routerconsole/jsp/profiles.jsp | 9 ++++++++- apps/routerconsole/jsp/stats.jsp | 8 +++++++- apps/routerconsole/jsp/tunnels.jsp | 8 +++++++- apps/routerconsole/jsp/viewprofile.jsp | 8 +++++++- 34 files changed, 240 insertions(+), 33 deletions(-) diff --git a/apps/routerconsole/jsp/config.jsp b/apps/routerconsole/jsp/config.jsp index 70c0e64f00..9cc6f81a4d 100644 --- a/apps/routerconsole/jsp/config.jsp +++ b/apps/routerconsole/jsp/config.jsp @@ -6,7 +6,13 @@ <%@include file="css.jsi" %> <%=intl.title("configure bandwidth")%> - + + + <%@include file="summary.jsi" %> diff --git a/apps/routerconsole/jsp/configadvanced.jsp b/apps/routerconsole/jsp/configadvanced.jsp index 1dbf23e7d4..27405c0c4c 100644 --- a/apps/routerconsole/jsp/configadvanced.jsp +++ b/apps/routerconsole/jsp/configadvanced.jsp @@ -6,7 +6,13 @@ <%@include file="css.jsi" %> <%=intl.title("config advanced")%> - + + + <%@include file="summary.jsi" %> diff --git a/apps/routerconsole/jsp/configclients.jsp b/apps/routerconsole/jsp/configclients.jsp index c8575b490f..0662afffef 100644 --- a/apps/routerconsole/jsp/configclients.jsp +++ b/apps/routerconsole/jsp/configclients.jsp @@ -10,7 +10,14 @@ button span.hide{ display:none; } input.default { width: 1px; height: 1px; visibility: hidden; } - + + + + <%@include file="summary.jsi" %> diff --git a/apps/routerconsole/jsp/confighome.jsp b/apps/routerconsole/jsp/confighome.jsp index ca0dbdc6c3..5ddf6f2005 100644 --- a/apps/routerconsole/jsp/confighome.jsp +++ b/apps/routerconsole/jsp/confighome.jsp @@ -12,7 +12,13 @@ input.default { visibility: hidden; } - + + + <%@include file="summary.jsi" %>

<%=intl._("I2P Home Page Configuration")%>

diff --git a/apps/routerconsole/jsp/configkeyring.jsp b/apps/routerconsole/jsp/configkeyring.jsp index 7acdf1126f..2719fe3335 100644 --- a/apps/routerconsole/jsp/configkeyring.jsp +++ b/apps/routerconsole/jsp/configkeyring.jsp @@ -5,7 +5,13 @@ <%@include file="css.jsi" %> <%=intl.title("config keyring")%> - + + + <%@include file="summary.jsi" %>

<%=intl._("I2P Keyring Configuration")%>

diff --git a/apps/routerconsole/jsp/configlogging.jsp b/apps/routerconsole/jsp/configlogging.jsp index 8274fcb438..d00d34321e 100644 --- a/apps/routerconsole/jsp/configlogging.jsp +++ b/apps/routerconsole/jsp/configlogging.jsp @@ -6,7 +6,13 @@ <%@include file="css.jsi" %> <%=intl.title("config logging")%> - + + + " /> diff --git a/apps/routerconsole/jsp/confignet.jsp b/apps/routerconsole/jsp/confignet.jsp index 6e340a6592..e85c9e6df9 100644 --- a/apps/routerconsole/jsp/confignet.jsp +++ b/apps/routerconsole/jsp/confignet.jsp @@ -5,7 +5,13 @@ <%@include file="css.jsi" %> <%=intl.title("config networking")%> - + + + <%@include file="summary.jsi" %> diff --git a/apps/routerconsole/jsp/configpeer.jsp b/apps/routerconsole/jsp/configpeer.jsp index b5968abedc..0f9b98a21b 100644 --- a/apps/routerconsole/jsp/configpeer.jsp +++ b/apps/routerconsole/jsp/configpeer.jsp @@ -5,7 +5,13 @@ <%@include file="css.jsi" %> <%=intl.title("config peers")%> - + + + <%@include file="summary.jsi" %>

<%=intl._("I2P Peer Configuration")%>

diff --git a/apps/routerconsole/jsp/configreseed.jsp b/apps/routerconsole/jsp/configreseed.jsp index 67d2334c91..c0f3faaaed 100644 --- a/apps/routerconsole/jsp/configreseed.jsp +++ b/apps/routerconsole/jsp/configreseed.jsp @@ -5,7 +5,13 @@ <%@include file="css.jsi" %> <%=intl.title("config reseeding")%> - + + + <%@include file="summary.jsi" %> diff --git a/apps/routerconsole/jsp/configservice.jsp b/apps/routerconsole/jsp/configservice.jsp index 3ee1ef7967..21ae39a6bf 100644 --- a/apps/routerconsole/jsp/configservice.jsp +++ b/apps/routerconsole/jsp/configservice.jsp @@ -5,7 +5,13 @@ <%@include file="css.jsi" %> <%=intl.title("config service")%> - + + + <%@include file="summary.jsi" %>

<%=intl._("I2P Service Configuration")%>

diff --git a/apps/routerconsole/jsp/configstats.jsp b/apps/routerconsole/jsp/configstats.jsp index d380d77839..6d75d673cc 100644 --- a/apps/routerconsole/jsp/configstats.jsp +++ b/apps/routerconsole/jsp/configstats.jsp @@ -6,10 +6,17 @@ <%@include file="css.jsi" %> <%=intl.title("config stats")%> + + + + <%@include file="summary.jsi" %> diff --git a/apps/routerconsole/jsp/configui.jsp b/apps/routerconsole/jsp/configui.jsp index 4a214c8524..c5b8c4d81a 100644 --- a/apps/routerconsole/jsp/configui.jsp +++ b/apps/routerconsole/jsp/configui.jsp @@ -6,7 +6,13 @@ <%@include file="css.jsi" %> <%=intl.title("config UI")%> - + + + <%@include file="summary.jsi" %> diff --git a/apps/routerconsole/jsp/configupdate.jsp b/apps/routerconsole/jsp/configupdate.jsp index e2bd49ab27..dafac8d45e 100644 --- a/apps/routerconsole/jsp/configupdate.jsp +++ b/apps/routerconsole/jsp/configupdate.jsp @@ -6,7 +6,13 @@ <%@include file="css.jsi" %> <%=intl.title("config update")%> - + + + <%@include file="summary.jsi" %>

<%=intl._("I2P Update Configuration")%>

diff --git a/apps/routerconsole/jsp/debug.jsp b/apps/routerconsole/jsp/debug.jsp index b9e66345f6..191d73e185 100644 --- a/apps/routerconsole/jsp/debug.jsp +++ b/apps/routerconsole/jsp/debug.jsp @@ -9,7 +9,13 @@ %> I2P Router Console - Debug <%@include file="css.jsi" %> - + + + <%@include file="summary.jsi" %>

Router SKM

diff --git a/apps/routerconsole/jsp/error.jsp b/apps/routerconsole/jsp/error.jsp index 69f9fbfa31..95218cc535 100644 --- a/apps/routerconsole/jsp/error.jsp +++ b/apps/routerconsole/jsp/error.jsp @@ -16,7 +16,13 @@ <%@include file="css.jsi" %> <%=intl.title("Page Not Found")%> - + + + <%@include file="summary.jsi" %>

<%=ERROR_CODE%> <%=ERROR_MESSAGE%>

diff --git a/apps/routerconsole/jsp/graph.jsp b/apps/routerconsole/jsp/graph.jsp index 6147fd96d0..4be37b3394 100644 --- a/apps/routerconsole/jsp/graph.jsp +++ b/apps/routerconsole/jsp/graph.jsp @@ -12,7 +12,13 @@ <% graphHelper.storeWriter(out); %> - + + + <%@include file="summary.jsi" %>

<%=intl._("I2P Performance Graphs")%>

diff --git a/apps/routerconsole/jsp/graphs.jsp b/apps/routerconsole/jsp/graphs.jsp index 4b65cca75c..e3287e98c8 100644 --- a/apps/routerconsole/jsp/graphs.jsp +++ b/apps/routerconsole/jsp/graphs.jsp @@ -19,7 +19,13 @@ out.print(graphHelper.getRefreshMeta()); } %> - + + + <%@include file="summary.jsi" %>

<%=intl._("I2P Performance Graphs")%>

diff --git a/apps/routerconsole/jsp/help.jsp b/apps/routerconsole/jsp/help.jsp index 265bbfb628..8c68cb5e9a 100644 --- a/apps/routerconsole/jsp/help.jsp +++ b/apps/routerconsole/jsp/help.jsp @@ -9,7 +9,13 @@ %> I2P Router Console - help <%@include file="css.jsi" %> - + + + <%@include file="summary.jsi" %>

I2P Router Help & Support

diff --git a/apps/routerconsole/jsp/help_ar.jsp b/apps/routerconsole/jsp/help_ar.jsp index 4b471f594f..7e058678fa 100644 --- a/apps/routerconsole/jsp/help_ar.jsp +++ b/apps/routerconsole/jsp/help_ar.jsp @@ -9,7 +9,13 @@ %> I2P مساعدة لوحة التحكم <%@include file="css.jsi" %> - + + + <%@include file="summary.jsi" %>

I2P مساعدة لوحة التحكم

diff --git a/apps/routerconsole/jsp/help_fr.jsp b/apps/routerconsole/jsp/help_fr.jsp index fd0f8bc268..01b000ac9b 100644 --- a/apps/routerconsole/jsp/help_fr.jsp +++ b/apps/routerconsole/jsp/help_fr.jsp @@ -9,7 +9,13 @@ %> Console du routeur I2P - Aide <%@include file="css.jsi" %> - + + + <%@include file="summary.jsi" %> Traduction de mars 2011 (magma@mail.i2p)

Aide et assistance du routeur I2P

diff --git a/apps/routerconsole/jsp/help_nl.jsp b/apps/routerconsole/jsp/help_nl.jsp index 944e65e7b9..20defacaa9 100644 --- a/apps/routerconsole/jsp/help_nl.jsp +++ b/apps/routerconsole/jsp/help_nl.jsp @@ -9,7 +9,13 @@ %> I2P Router Console - help <%@include file="css.jsi" %> - + + + <%@include file="summary.jsi" %>

I2P Router Help & Support

diff --git a/apps/routerconsole/jsp/help_ru.jsp b/apps/routerconsole/jsp/help_ru.jsp index d14da01386..55ea530c7d 100644 --- a/apps/routerconsole/jsp/help_ru.jsp +++ b/apps/routerconsole/jsp/help_ru.jsp @@ -9,7 +9,13 @@ %> Консоль маршрутизатора I2P - справка <%@include file="css.jsi" %> - + + + <%@include file="summary.jsi" %>

Справка маршрутизатора I2P

diff --git a/apps/routerconsole/jsp/jars.jsp b/apps/routerconsole/jsp/jars.jsp index 4fa200b70b..dacd3d93fa 100644 --- a/apps/routerconsole/jsp/jars.jsp +++ b/apps/routerconsole/jsp/jars.jsp @@ -5,7 +5,13 @@ <%@include file="css.jsi" %> <%=intl.title("Jar File Dump")%> - + + + <%@include file="summary.jsi" %>

Jar File Dump

diff --git a/apps/routerconsole/jsp/jobs.jsp b/apps/routerconsole/jsp/jobs.jsp index 2e2e712484..247fa298ef 100644 --- a/apps/routerconsole/jsp/jobs.jsp +++ b/apps/routerconsole/jsp/jobs.jsp @@ -6,7 +6,13 @@ <%@include file="css.jsi" %> <%=intl.title("job queue")%> - + + + <%@include file="summary.jsi" %>

<%=intl._("I2P Router Job Queue")%>

diff --git a/apps/routerconsole/jsp/logs.jsp b/apps/routerconsole/jsp/logs.jsp index 0f470e7c9d..ed4b5c1216 100644 --- a/apps/routerconsole/jsp/logs.jsp +++ b/apps/routerconsole/jsp/logs.jsp @@ -5,7 +5,13 @@ <%@include file="css.jsi" %> <%=intl.title("logs")%> - + + + <%@include file="summary.jsi" %>

<%=intl._("I2P Router Logs")%>

diff --git a/apps/routerconsole/jsp/netdb.jsp b/apps/routerconsole/jsp/netdb.jsp index cfbd3b2ac1..52ccd1b0c2 100644 --- a/apps/routerconsole/jsp/netdb.jsp +++ b/apps/routerconsole/jsp/netdb.jsp @@ -6,7 +6,13 @@ <%@include file="css.jsi" %> <%=intl.title("network database summary")%> - + + + <%@include file="summary.jsi" %>

<%=intl._("I2P Network Database Summary")%>

diff --git a/apps/routerconsole/jsp/nowebapp.jsp b/apps/routerconsole/jsp/nowebapp.jsp index 1bbec502dd..03ad771b98 100644 --- a/apps/routerconsole/jsp/nowebapp.jsp +++ b/apps/routerconsole/jsp/nowebapp.jsp @@ -8,7 +8,13 @@ <%@include file="css.jsi" %> <%=intl.title("WebApp Not Found")%> - + + + <%@include file="summary.jsi" %>

<%=intl._("Web Application Not Running")%>

diff --git a/apps/routerconsole/jsp/oldconsole.jsp b/apps/routerconsole/jsp/oldconsole.jsp index 7edb762409..cb0c186630 100644 --- a/apps/routerconsole/jsp/oldconsole.jsp +++ b/apps/routerconsole/jsp/oldconsole.jsp @@ -9,7 +9,13 @@ %> I2P Router Console - internals <%@include file="css.jsi" %> - + + + <%@include file="summary.jsi" %> " /> diff --git a/apps/routerconsole/jsp/peers.jsp b/apps/routerconsole/jsp/peers.jsp index 6b0ed6b67b..e23e4f73b9 100644 --- a/apps/routerconsole/jsp/peers.jsp +++ b/apps/routerconsole/jsp/peers.jsp @@ -6,7 +6,13 @@ <%@include file="css.jsi" %> <%=intl.title("peer connections")%> - + + + <%@include file="summary.jsi" %>

<%=intl._("I2P Network Peers")%>

diff --git a/apps/routerconsole/jsp/profiles.jsp b/apps/routerconsole/jsp/profiles.jsp index 8441838e2d..6f81b857b3 100644 --- a/apps/routerconsole/jsp/profiles.jsp +++ b/apps/routerconsole/jsp/profiles.jsp @@ -6,7 +6,14 @@ <%@include file="css.jsi" %> <%=intl.title("peer profiles")%> -<%@include file="summary.jsi" %> + + + +<%@include file="summary.jsi" %>

<%=intl._("I2P Network Peer Profiles")%>

diff --git a/apps/routerconsole/jsp/stats.jsp b/apps/routerconsole/jsp/stats.jsp index c0596f7961..5750fae1c1 100644 --- a/apps/routerconsole/jsp/stats.jsp +++ b/apps/routerconsole/jsp/stats.jsp @@ -6,7 +6,13 @@ <%@include file="css.jsi" %> <%=intl.title("statistics")%> - + + + <%@include file="summary.jsi" %> " /> diff --git a/apps/routerconsole/jsp/tunnels.jsp b/apps/routerconsole/jsp/tunnels.jsp index 32f86475ae..332381a95a 100644 --- a/apps/routerconsole/jsp/tunnels.jsp +++ b/apps/routerconsole/jsp/tunnels.jsp @@ -6,7 +6,13 @@ <%@include file="css.jsi" %> <%=intl.title("tunnel summary")%> - + + + <%@include file="summary.jsi" %>

<%=intl._("I2P Tunnel Summary")%>

diff --git a/apps/routerconsole/jsp/viewprofile.jsp b/apps/routerconsole/jsp/viewprofile.jsp index 8747a6d88b..635aafb348 100644 --- a/apps/routerconsole/jsp/viewprofile.jsp +++ b/apps/routerconsole/jsp/viewprofile.jsp @@ -6,7 +6,13 @@ <%@include file="css.jsi" %> <%=intl.title("Peer Profile")%> - + + + <%@include file="summary.jsi" %>

<%=intl._("Peer Profile")%>