I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 33a7f335 authored by z3d's avatar z3d
Browse files

Start of validation cleanup.

parent f7af5e13
No related branches found
No related tags found
No related merge requests found
...@@ -347,9 +347,9 @@ public class SummaryHelper extends HelperBase { ...@@ -347,9 +347,9 @@ public class SummaryHelper extends HelperBase {
buf.append("<tr><td align=\"right\"><img src=\"/themes/console/images/"); buf.append("<tr><td align=\"right\"><img src=\"/themes/console/images/");
if (_context.clientManager().shouldPublishLeaseSet(h)) if (_context.clientManager().shouldPublishLeaseSet(h))
buf.append("server.png\" alt=\"Server\" title=\"Server\" />"); buf.append("server.png\" alt=\"Server\" title=\"Server\">");
else else
buf.append("client.png\" alt=\"Client\" title=\"Client\" />"); buf.append("client.png\" alt=\"Client\" title=\"Client\">");
buf.append("</td><td align=\"left\"><b><a href=\"tunnels.jsp#").append(h.toBase64().substring(0,4)); buf.append("</td><td align=\"left\"><b><a href=\"tunnels.jsp#").append(h.toBase64().substring(0,4));
buf.append("\" target=\"_top\" title=\"Show tunnels\">"); buf.append("\" target=\"_top\" title=\"Show tunnels\">");
if (name.length() < 16) if (name.length() < 16)
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// pass the new delay parameter to the iframe // pass the new delay parameter to the iframe
newDelay = "?refresh=" + d; newDelay = "?refresh=" + d;
if (!"0".equals(d)) if (!"0".equals(d))
out.print("<iframe src=\"summaryframe.jsp" + newDelay + "\" height=\"1500\" width=\"200\" scrolling=\"auto\" frameborder=\"0\" allowtransparency=\"true\">\n"); out.print("<iframe src=\"summaryframe.jsp" + newDelay + "\" height=\"1500\" width=\"200\" scrolling=\"auto\" frameborder=\"0\" title=\"sidepanel\">\n");
%> %>
<div class="routersummary"> <div class="routersummary">
<%@include file="summarynoframe.jsp" %> <%@include file="summarynoframe.jsp" %>
...@@ -28,4 +28,4 @@ ...@@ -28,4 +28,4 @@
out.print("</form></div>\n"); out.print("</form></div>\n");
} }
%> %>
</div></div> </div>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<% <%
// d and shutdownSoon defined above // d and shutdownSoon defined above
if (!shutdownSoon) { if (!shutdownSoon) {
out.print("<hr><p><form action=\"summaryframe.jsp\" method=\"GET\">\n"); out.print("<hr><form action=\"summaryframe.jsp\" method=\"GET\">\n");
if ("0".equals(d)) { if ("0".equals(d)) {
out.print("<b>Refresh (s):<b> <input size=\"3\" type=\"text\" name=\"refresh\" value=\"60\" align=\"right\" />\n"); out.print("<b>Refresh (s):<b> <input size=\"3\" type=\"text\" name=\"refresh\" value=\"60\" align=\"right\" />\n");
out.print("<button type=\"submit\">Enable</button>\n"); out.print("<button type=\"submit\">Enable</button>\n");
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
out.print("<input type=\"hidden\" name=\"refresh\" value=\"0\" />\n"); out.print("<input type=\"hidden\" name=\"refresh\" value=\"0\" />\n");
out.print("<button type=\"submit\">Disable " + d + "s Refresh</button>\n"); out.print("<button type=\"submit\">Disable " + d + "s Refresh</button>\n");
} }
out.print("</form></p><hr>\n"); out.print("</form><hr>\n");
} }
%> %>
</div></body></html> </div></body></html>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<jsp:useBean class="net.i2p.router.web.UpdateHandler" id="update" scope="request" /> <jsp:useBean class="net.i2p.router.web.UpdateHandler" id="update" scope="request" />
<jsp:setProperty name="update" property="*" /> <jsp:setProperty name="update" property="*" />
<jsp:setProperty name="update" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="update" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<a href="index.jsp" target="_top"><img src="/themes/console/images/i2plogo.png" alt="I2P Router Console" title="I2P Router Console"/></a><hr> <a href="index.jsp" target="_top"><img src="/themes/console/images/i2plogo.png" alt="I2P Router Console" title="I2P Router Console"></a><hr>
<% java.io.File lpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getBaseDir(), "docs/toolbar.html"); <% java.io.File lpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getBaseDir(), "docs/toolbar.html");
// you better have target="_top" for the links in there... // you better have target="_top" for the links in there...
if (lpath.exists()) { %> if (lpath.exists()) { %>
...@@ -98,9 +98,9 @@ ...@@ -98,9 +98,9 @@
if (prev != null) System.setProperty("net.i2p.router.web.ReseedHandler.noncePrev", prev); if (prev != null) System.setProperty("net.i2p.router.web.ReseedHandler.noncePrev", prev);
System.setProperty("net.i2p.router.web.ReseedHandler.nonce", nonce+""); System.setProperty("net.i2p.router.web.ReseedHandler.nonce", nonce+"");
String uri = request.getRequestURI(); String uri = request.getRequestURI();
out.print("<p><form action=\"" + uri + "\" method=\"GET\">\n"); out.print("<form action=\"" + uri + "\" method=\"GET\">\n");
out.print("<input type=\"hidden\" name=\"reseedNonce\" value=\"" + nonce + "\" />\n"); out.print("<input type=\"hidden\" name=\"reseedNonce\" value=\"" + nonce + "\" />\n");
out.print("<button type=\"submit\" >Reseed</button></form></p>\n"); out.print("<button type=\"submit\" >Reseed</button></form>\n");
} }
} }
// If a new reseed ain't running, and the last reseed had errors, show error message // If a new reseed ain't running, and the last reseed had errors, show error message
......
...@@ -775,7 +775,7 @@ public class Blocklist { ...@@ -775,7 +775,7 @@ public class Blocklist {
if (to != from) { if (to != from) {
out.write(toStr(to)); out.write("</td></tr>\n"); out.write(toStr(to)); out.write("</td></tr>\n");
} else } else
out.write("&nbsp</td></tr>\n"); out.write("&nbsp;</td></tr>\n");
} }
out.write("</table>"); out.write("</table>");
} else { } else {
......
...@@ -149,7 +149,7 @@ class ProfileOrganizerRenderer { ...@@ -149,7 +149,7 @@ class ProfileOrganizerRenderer {
if (total / fails <= 10) // hide if < 10% if (total / fails <= 10) // hide if < 10%
buf.append(' ').append(fails).append('/').append(total).append(" Test Fails"); buf.append(' ').append(fails).append('/').append(total).append(" Test Fails");
} }
buf.append("&nbsp</td>"); buf.append("&nbsp;</td>");
buf.append("<td nowrap align=\"center\"><a target=\"_blank\" href=\"dumpprofile.jsp?peer=").append(peer.toBase64().substring(0,6)).append("\">profile</a>"); buf.append("<td nowrap align=\"center\"><a target=\"_blank\" href=\"dumpprofile.jsp?peer=").append(peer.toBase64().substring(0,6)).append("\">profile</a>");
buf.append("&nbsp;<a href=\"configpeer.jsp?peer=").append(peer.toBase64()).append("\">+-</a></td>\n"); buf.append("&nbsp;<a href=\"configpeer.jsp?peer=").append(peer.toBase64()).append("\">+-</a></td>\n");
buf.append("</tr>"); buf.append("</tr>");
......
...@@ -483,7 +483,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade { ...@@ -483,7 +483,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
buf.append(h); buf.append(h);
if (found) if (found)
buf.append("</a>"); buf.append("</a>");
buf.append("</font></tt>"); buf.append("</tt>");
return buf.toString(); return buf.toString();
} }
} }
...@@ -493,8 +493,8 @@ public class TunnelPoolManager implements TunnelManagerFacade { ...@@ -493,8 +493,8 @@ public class TunnelPoolManager implements TunnelManagerFacade {
processed += cfg.getProcessedMessagesCount(); processed += cfg.getProcessedMessagesCount();
} }
out.write("</table>\n"); out.write("</table>\n");
out.write("<div class=\"statusnotes\"><center><b>Inactive participating tunnels: " + inactive + "</b></div>\n"); out.write("<div class=\"statusnotes\"><b>Inactive participating tunnels: " + inactive + "</b></div>\n");
out.write("<div class=\"statusnotes\"><b>Lifetime bandwidth usage: " + DataHelper.formatSize(processed*1024) + "B</b></center></div>\n"); out.write("<div class=\"statusnotes\"><b>Lifetime bandwidth usage: " + DataHelper.formatSize(processed*1024) + "B</b></div>\n");
renderPeers(out); renderPeers(out);
} }
...@@ -542,9 +542,9 @@ public class TunnelPoolManager implements TunnelManagerFacade { ...@@ -542,9 +542,9 @@ public class TunnelPoolManager implements TunnelManagerFacade {
continue; // don't display tunnels in their grace period continue; // don't display tunnels in their grace period
live++; live++;
if (info.isInbound()) if (info.isInbound())
out.write("<tr> <td class=\"cells\" align=\"center\"><img src=\"/themes/console/images/inbound.png\" alt=\"Inbound\" title=\"Inbound\"/></td>"); out.write("<tr> <td class=\"cells\" align=\"center\"><img src=\"/themes/console/images/inbound.png\" alt=\"Inbound\" title=\"Inbound\"></td>");
else else
out.write("<tr> <td class=\"cells\" align=\"center\"><img src=\"/themes/console/images/outbound.png\" alt=\"Outbound\" title=\"Outbound\"/></td>"); out.write("<tr> <td class=\"cells\" align=\"center\"><img src=\"/themes/console/images/outbound.png\" alt=\"Outbound\" title=\"Outbound\"></td>");
out.write(" <td class=\"cells\" align=\"center\">" + DataHelper.formatDuration(timeLeft) + "</td>\n"); out.write(" <td class=\"cells\" align=\"center\">" + DataHelper.formatDuration(timeLeft) + "</td>\n");
out.write(" <td class=\"cells\" align=\"center\">" + info.getProcessedMessagesCount() + "KB</td>\n"); out.write(" <td class=\"cells\" align=\"center\">" + info.getProcessedMessagesCount() + "KB</td>\n");
for (int j = 0; j < info.getLength(); j++) { for (int j = 0; j < info.getLength(); j++) {
...@@ -558,7 +558,7 @@ public class TunnelPoolManager implements TunnelManagerFacade { ...@@ -558,7 +558,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
} }
if (info.getLength() < maxLength && (info.getLength() == 1 || j == info.getLength() - 2)) { if (info.getLength() < maxLength && (info.getLength() == 1 || j == info.getLength() - 2)) {
for (int k = info.getLength(); k < maxLength; k++) for (int k = info.getLength(); k < maxLength; k++)
out.write(" <td class=\"cells\" align=\"center\">&nbsp</td>"); out.write(" <td class=\"cells\" align=\"center\">&nbsp;</td>");
} }
} }
out.write("</tr>\n"); out.write("</tr>\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment