forked from I2P_Developers/i2p.i2p
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.
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
%>
|
||||
<jsp:useBean class="net.i2p.router.web.SummaryHelper" id="helper" scope="request" />
|
||||
<jsp:setProperty name="helper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||
<jsp:setProperty name="helper" property="action" value="<%=request.getParameter(\"action\")%>" />
|
||||
<table><tr><td align="left"><b><%=intl._("Version")%>:</b></td><td align="right">
|
||||
<jsp:getProperty name="helper" property="version" />
|
||||
</td></tr><tr><td align="left"><b><%=intl._("Uptime")%>:</b></td><td align="right">
|
||||
<jsp:getProperty name="helper" property="uptime" />
|
||||
</td></tr></table><hr>
|
||||
<jsp:setProperty name="helper" property="updateNonce" value="<%=request.getParameter(\"updateNonce\")%>" />
|
||||
<jsp:setProperty name="helper" property="consoleNonce" value="<%=request.getParameter(\"consoleNonce\")%>" />
|
||||
<%
|
||||
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.
|
||||
*/
|
||||
%>
|
||||
<jsp:getProperty name="newshelper" property="newsHeadings" /><hr>
|
||||
<jsp:useBean class="net.i2p.router.web.ReseedHandler" id="reseed" scope="request" />
|
||||
<jsp:setProperty name="reseed" property="*" />
|
||||
<%
|
||||
} // !shouldShowNews()
|
||||
/*
|
||||
* The following is required for the update buttons to work, although we probably
|
||||
* only need the updateNonce property.
|
||||
*/
|
||||
%>
|
||||
<jsp:useBean class="net.i2p.router.web.UpdateHandler" id="update" scope="request" />
|
||||
<jsp:setProperty name="update" property="*" />
|
||||
<jsp:setProperty name="update" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||
<%
|
||||
// moved to java for ease of translation
|
||||
helper.renderSummaryBar();
|
||||
%>
|
||||
<jsp:getProperty name="helper" property="updateStatus" />
|
||||
<h4><a href="/confignet#help" title="<%=intl._("Help with configuring your firewall and router for optimal I2P performance")%>"><%=intl._("Network")%>:
|
||||
<jsp:getProperty name="helper" property="reachability" /></a></h4>
|
||||
<hr>
|
||||
<jsp:getProperty name="helper" property="firewallAndReseedStatus" />
|
||||
<jsp:getProperty name="helper" property="destinations" />
|
||||
<hr>
|
||||
<jsp:getProperty name="helper" property="restartStatus" />
|
||||
|
Reference in New Issue
Block a user