source: apps/routerconsole/jsp/summarynoframe.jsp @ 66831c6

Last change on this file since 66831c6 was 66831c6, checked in by zzz <zzz@…>, 11 years ago

cleanups

  • Property mode set to 100644
File size: 10.2 KB
RevLine 
[48e544c]1<%@page import="net.i2p.router.web.SummaryHelper" %>
[cbde15b]2<%
3/*
4 * Note:
5 * This is included almost 30 times, so keep whitespace etc. to a minimum.
6 */
7%>
[48e544c]8<jsp:useBean class="net.i2p.router.web.SummaryHelper" id="helper" scope="request" />
9<jsp:setProperty name="helper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
10<jsp:useBean class="net.i2p.router.web.ReseedHandler" id="reseed" scope="request" />
11<jsp:setProperty name="reseed" property="*" />
12<jsp:useBean class="net.i2p.router.web.UpdateHandler" id="update" scope="request" />
13<jsp:setProperty name="update" property="*" />
14<jsp:setProperty name="update" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
[8ea279f]15<a href="index.jsp" target="_top"><img src="/themes/console/images/i2plogo.png" alt="I2P Router Console" title="I2P Router Console"/></a><hr />
[cbde15b]16<% java.io.File lpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getBaseDir(), "docs/toolbar.html");
[bc49f51]17    // you better have target="_top" for the links in there...
18    if (lpath.exists()) { %>
[cbde15b]19<jsp:useBean class="net.i2p.router.web.ContentHelper" id="linkhelper" scope="request" />
20<jsp:setProperty name="linkhelper" property="page" value="<%=lpath.getAbsolutePath()%>" />
21<jsp:setProperty name="linkhelper" property="maxLines" value="100" />
22<jsp:getProperty name="linkhelper" property="content" />
[bc49f51]23<% } else { %>
[e5eea47]24<h3><a href="/configclients.jsp" target="_top" title="Configure startup of clients and webapps (services); manually start dormant services.">I2P Services</a></h3><hr>
[43140d3]25<table>
26<tr>
[a12ae6e]27<td><a href="susidns/index.jsp" target="_blank" title="Manage your I2P hosts file here (I2P domain name resolution).">Addressbook</a> 
28<a href="i2psnark/" target="_blank" title="Built-in anonymous BitTorrent Client">Torrents</a>
29<a href="susimail/susimail" target="blank" title="Anonymous webmail client.">Webmail</a> 
30<a href="http://127.0.0.1:7658/" target="_blank" title="Anonymous resident webserver.">Webserver</a></td>
[43140d3]31</tr></table><hr> 
[a12ae6e]32<h3><a href="config.jsp" target="_top" title="Configure I2P Router.">I2P Internals</a></h3><hr>
[43140d3]33<table><tr>
34<td>
[a12ae6e]35<a href="tunnels.jsp" target="_top" title="View existing tunnels and tunnel build status.">Tunnels</a> 
36<a href="peers.jsp" target="_top" title="Show all current peer connections.">Peers</a> 
37<a href="profiles.jsp" target="_top" title="Show recent peer performance profiles.">Profiles</a> 
38<a href="netdb.jsp" target="_top" title="Show list of all known I2P routers.">NetDB</a> 
39<a href="logs.jsp" target="_top" title="Health Report.">Logs</a> 
40<a href="jobs.jsp" target="_top" title="Show the router's workload, and how it's performing.">Jobs</a>
41<a href="graphs.jsp" target="_top" title="Graph router performance.">Graphs</a> 
42<a href="oldstats.jsp" target="_top" title="Textual router performance statistics.">Stats</a>
[43140d3]43</td></tr></table>
[bc49f51]44<% } %>
[43140d3]45<hr>
[a12ae6e]46<h3><a href="help.jsp" target="_top" title="I2P Router Help.">General</a></h3><hr>
[43140d3]47<h4>
[a12ae6e]48<a title="Your unique I2P router identity is <jsp:getProperty name="helper" property="ident" />, never reveal it to anyone" href="netdb.jsp?r=." target="_top">Local Identity</a></h4>
[43140d3]49<hr>
50<table><tr>
51<td align="left">
52<b>Version:</b></td>
53<td align="right"><jsp:getProperty name="helper" property="version" /></td></tr>
[a12ae6e]54<tr title="How long we've been running for this session.">
[43140d3]55<td align="left">
56<b>Uptime:</b></td> 
57<td align="right"><jsp:getProperty name="helper" property="uptime" /></td></tr></table>
[a12ae6e]58<hr><h4><a href="config.jsp#help" target="_top" title="Help with configuring your firewall and router for optimal I2P performance."><jsp:getProperty name="helper" property="reachability" /></a></h4>
[43140d3]59<hr>
[cbde15b]60<%
[3febcf6]61    if (helper.updateAvailable() || helper.unsignedUpdateAvailable()) {
[48e544c]62        // display all the time so we display the final failure message
63        out.print("<br />" + update.getStatus());
[13e8c95]64        if ("true".equals(System.getProperty("net.i2p.router.web.UpdateHandler.updateInProgress"))) {
65        } else if((!update.isDone()) &&
66                  request.getParameter("action") == null &&
67                  request.getParameter("updateNonce") == null &&
68                  net.i2p.router.web.ConfigRestartBean.getRestartTimeRemaining() > 12*60*1000) {
[48e544c]69            long nonce = new java.util.Random().nextLong();
70            String prev = System.getProperty("net.i2p.router.web.UpdateHandler.nonce");
71            if (prev != null) System.setProperty("net.i2p.router.web.UpdateHandler.noncePrev", prev);
72            System.setProperty("net.i2p.router.web.UpdateHandler.nonce", nonce+"");
73            String uri = request.getRequestURI();
[43140d3]74            out.print("<p><form action=\"" + uri + "\" method=\"GET\">\n");
[48e544c]75            out.print("<input type=\"hidden\" name=\"updateNonce\" value=\"" + nonce + "\" />\n");
[3febcf6]76            if (helper.updateAvailable())
77                out.print("<button type=\"submit\" name=\"updateAction\" value=\"signed\" >Download " + helper.getUpdateVersion() + " Update</button>\n");
78            if (helper.unsignedUpdateAvailable())
79                out.print("<button type=\"submit\" name=\"updateAction\" value=\"Unsigned\" >Download Unsigned<br />" + helper.getUnsignedUpdateVersion() + " Update</button>\n");
[8ea279f]80            out.print("</form></p>\n");
[48e544c]81        }
82    }
[cbde15b]83%>
[43140d3]84<p>
[cbde15b]85<%=net.i2p.router.web.ConfigRestartBean.renderStatus(request.getRequestURI(), request.getParameter("action"), request.getParameter("consoleNonce"))%>
[43140d3]86</p>
[cbde15b]87<hr />
[a12ae6e]88<h3><a href="peers.jsp" target="_top" title="Show all current peer connections.">Peers</a></h3><hr><table>
[43140d3]89<tr><td align="left"><b>Active:</b></td><td align="right"><jsp:getProperty name="helper" property="activePeers" />/<jsp:getProperty name="helper" property="activeProfiles" /></td></tr>
90<tr><td align="left"><b>Fast:</b></td><td align="right"><jsp:getProperty name="helper" property="fastPeers" /></td></tr>
91<tr><td align="left"><b>High capacity:</b></td><td align="right"><jsp:getProperty name="helper" property="highCapacityPeers" /></td></tr>
92<tr><td align="left"><b>Integrated:</b></td><td align="right"><jsp:getProperty name="helper" property="wellIntegratedPeers" /></td></tr>
93<tr><td align="left"><b>Known:</b></td><td align="right"><jsp:getProperty name="helper" property="allPeers" /></td></tr></table><hr><%
[5decf3cd]94    if (helper.showFirewallWarning()) {
[a12ae6e]95        %><h4><a href="config.jsp" target="_top" title="Help with firewall configuration.">Check NAT/firewall</a></h4><%
[48e544c]96    }
[66831c6]97    boolean reseedInProgress = Boolean.valueOf(System.getProperty("net.i2p.router.web.ReseedHandler.reseedInProgress")).booleanValue();
[48e544c]98    // If showing the reseed link is allowed
99    if (helper.allowReseed()) {
[66831c6]100        if (reseedInProgress) {
[48e544c]101            // While reseed occurring, show status message instead
102            out.print("<i>" + System.getProperty("net.i2p.router.web.ReseedHandler.statusMessage","") + "</i><br />");
103        } else {
104            // While no reseed occurring, show reseed link
105            long nonce = new java.util.Random().nextLong();
106            String prev = System.getProperty("net.i2p.router.web.ReseedHandler.nonce");
107            if (prev != null) System.setProperty("net.i2p.router.web.ReseedHandler.noncePrev", prev);
108            System.setProperty("net.i2p.router.web.ReseedHandler.nonce", nonce+"");
109            String uri = request.getRequestURI();
110            out.print("<p><form action=\"" + uri + "\" method=\"GET\">\n");
111            out.print("<input type=\"hidden\" name=\"reseedNonce\" value=\"" + nonce + "\" />\n");
112            out.print("<button type=\"submit\" >Reseed</button></form></p>\n");
113        }
114    }
115    // If a new reseed ain't running, and the last reseed had errors, show error message
[66831c6]116    if (!reseedInProgress) {
[48e544c]117        String reseedErrorMessage = System.getProperty("net.i2p.router.web.ReseedHandler.errorMessage","");
118        if (reseedErrorMessage.length() > 0) {
119            out.print("<i>" + reseedErrorMessage + "</i><br />");
120        }
121    }
122 %><hr />
[a12ae6e]123<h3><a href="config.jsp" title="Configure router bandwidth allocation." target="_top">Bandwidth in/out</a></h3><hr>
[43140d3]124<table>
125<tr><td align="left"><b>1s:</b></td><td align="right"><jsp:getProperty name="helper" property="inboundSecondKBps" />/<jsp:getProperty name="helper" property="outboundSecondKBps" />K/s</td></tr>
126<tr><td align="left"><b>5m:</b></td><td align="right"><jsp:getProperty name="helper" property="inboundFiveMinuteKBps" />/<jsp:getProperty name="helper" property="outboundFiveMinuteKBps" />K/s</td></tr>
127<tr><td align="left"><b>Total:</b></td><td align="right"><jsp:getProperty name="helper" property="inboundLifetimeKBps" />/<jsp:getProperty name="helper" property="outboundLifetimeKBps" />K/s</td></tr>
128<tr><td align="left"><b>Used:</b></td><td align="right"><jsp:getProperty name="helper" property="inboundTransferred" />/<jsp:getProperty name="helper" property="outboundTransferred" /></td></tr></table>
[a12ae6e]129<hr>
130<h3><a href="tunnels.jsp" target="_blank" title="View existing tunnels and tunnel build status.">Tunnels in/out</a></h3><hr>
[43140d3]131<table><tr>
132<td align="left"><b>Exploratory:</b></td><td align="right"><jsp:getProperty name="helper" property="inboundTunnels" />/<jsp:getProperty name="helper" property="outboundTunnels" /></td></tr>
133<tr><td align="left"><b>Client:</b></td><td align="right"><jsp:getProperty name="helper" property="inboundClientTunnels" />/<jsp:getProperty name="helper" property="outboundClientTunnels" /></td></tr>
134<tr><td align="left"><b>Participating:</b></td><td align="right"><jsp:getProperty name="helper" property="participatingTunnels" /></td></tr></table>
135<hr>
[a12ae6e]136<h3><a href="/oldstats.jsp#JobQueue" target="_top" title="What's in the router's job queue?">Congestion</a></h3><hr>
[43140d3]137<table><tr>
138<td align="left"><b>Job lag:</b></td><td align="right"><jsp:getProperty name="helper" property="jobLag" /></td></tr>
139<tr><td align="left"><b>Message delay:</b></td><td align="right"><jsp:getProperty name="helper" property="messageDelay" /></td></tr>
140<tr><td align="left"><b>Tunnel lag:</b></td><td align="right"><jsp:getProperty name="helper" property="tunnelLag" /></td></tr>
[a12ae6e]141<tr><td align="left"><b>Backlog:</b></td><td align="right"><jsp:getProperty name="helper" property="inboundBacklog" /></td></tr><table  align="center" title="Router tunnel build status.">
[43140d3]142<hr><h4><jsp:getProperty name="helper" property="tunnelStatus" /></h4>
143<hr>
[cbde15b]144<jsp:getProperty name="helper" property="destinations" />
Note: See TracBrowser for help on using the repository browser.