+<%
+ // skip the iframe if refresh disabled
+ String d = request.getParameter("refresh");
+ String newDelay = "";
+ if (d == null || "".equals(d))
+ d = System.getProperty("routerconsole.summaryRefresh");
+ else
+ // pass the new delay parameter to the iframe
+ newDelay = "?refresh=" + d;
+ if (!"0".equals(d))
+ out.print("\n");
+ } else {
+ // 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("
-
-
- Peers
- Active:/
- Fast:
- High capacity:
- Well integrated:
- Known: <%
- if (helper.getActivePeers() <= 0) {
- %>check your NAT/firewall <%
- }
- // If showing the reseed link is allowed
- if (helper.allowReseed()) {
- if ("true".equals(System.getProperty("net.i2p.router.web.ReseedHandler.reseedInProgress", "false"))) {
- // While reseed occurring, show status message instead
- out.print("" + System.getProperty("net.i2p.router.web.ReseedHandler.statusMessage","") + " ");
- } else {
- // While no reseed occurring, show reseed link
- long nonce = new java.util.Random().nextLong();
- String prev = System.getProperty("net.i2p.router.web.ReseedHandler.nonce");
- if (prev != null) System.setProperty("net.i2p.router.web.ReseedHandler.noncePrev", prev);
- System.setProperty("net.i2p.router.web.ReseedHandler.nonce", nonce+"");
- String uri = request.getRequestURI();
- out.print("
\n");
- }
- }
- // If a new reseed ain't running, and the last reseed had errors, show error message
- if ("false".equals(System.getProperty("net.i2p.router.web.ReseedHandler.reseedInProgress", "false"))) {
- String reseedErrorMessage = System.getProperty("net.i2p.router.web.ReseedHandler.errorMessage","");
- if (reseedErrorMessage.length() > 0) {
- out.print("" + reseedErrorMessage + " ");
- }
- }
- %>
-
- Bandwidth in/out
- 1s:/KBps
- 5m:/KBps
- Total:/KBps
- Used:/
-
-
-
-
- Tunnels in/out
- Exploratory:/
- Client:/
- Participating:
-
-
- Congestion
- Job lag:
- Message delay:
- Tunnel lag:
- Handle backlog:
-
-
+%>
diff --git a/apps/routerconsole/jsp/summaryframe.jsp b/apps/routerconsole/jsp/summaryframe.jsp
new file mode 100644
index 000000000..627fe328c
--- /dev/null
+++ b/apps/routerconsole/jsp/summaryframe.jsp
@@ -0,0 +1,68 @@
+<%@page contentType="text/html"%>
+<%@page pageEncoding="UTF-8"%>
+
+
+<%
+/*
+ * All links in the summary bar must have target="_top"
+ * so they don't load in the iframe
+ */
+%>
+
+
+Summary Bar
+
+<%
+ // try hard to avoid an error page in the iframe after shutdown
+ String action = request.getParameter("action");
+ String d = request.getParameter("refresh");
+ boolean shutdownSoon = "shutdownImmediate".equals(action) || "restartImmediate".equals(action);
+ if (!shutdownSoon) {
+ if (d == null || "".equals(d)) {
+ d = System.getProperty("routerconsole.summaryRefresh");
+ if (d == null || "".equals(d))
+ d = "60";
+ } else {
+ System.setProperty("routerconsole.summaryRefresh", d);
+ }
+ // we probably don't get here if d == "0" since caught in summary.jsp, but just
+ // to be sure...
+ if (!"0".equals(d)) {
+ // doesn't work for restart or shutdown with no expl. tunnels,
+ // since the call to ConfigRestartBean.renderStatus() hasn't happened yet...
+ long timeleft = net.i2p.router.web.ConfigRestartBean.getRestartTimeRemaining();
+ long delay = 60;
+ try { delay = Long.parseLong(d); } catch (NumberFormatException nfe) {}
+ if (delay*1000 < timeleft + 5000)
+ out.print("\n");
+ else
+ shutdownSoon = true;
+ }
+ }
+%>
+
+
+
+
+
+
+<%@include file="summarynoframe.jsp" %>
+<%
+ // d and shutdownSoon defined above
+ if (!shutdownSoon) {
+ out.print("\n");
+ }
+%>
+