Visual overhaul of config pages.

This commit is contained in:
z3d
2009-07-17 16:28:38 +00:00
parent ec49d9becf
commit 1bff5a7b9e
8 changed files with 500 additions and 452 deletions

View File

@ -1,41 +1,44 @@
<%@page contentType="text/html"%> <%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%> <%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head> <html><head>
<title>I2P Router Console - config advanced</title> <title>I2P Router Console - config advanced</title>
<%@include file="css.jsp" %> <%@include file="css.jsp" %>
</head><body> </head><body>
<%@include file="nav.jsp" %> <%@include file="nav.jsp" %>
<%@include file="summary.jsp" %> <%@include file="summary.jsp" %>
<jsp:useBean class="net.i2p.router.web.ConfigAdvancedHelper" id="advancedhelper" scope="request" /> <jsp:useBean class="net.i2p.router.web.ConfigAdvancedHelper" id="advancedhelper" scope="request" />
<jsp:setProperty name="advancedhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="advancedhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<h1>I2P Advanced Configuration</h1> <h1>I2P Advanced Configuration</h1>
<div class="main" id="main"> <div class="main" id="main">
<%@include file="confignav.jsp" %> <%@include file="confignav.jsp" %>
<jsp:useBean class="net.i2p.router.web.ConfigAdvancedHandler" id="formhandler" scope="request" /> <jsp:useBean class="net.i2p.router.web.ConfigAdvancedHandler" id="formhandler" scope="request" />
<jsp:setProperty name="formhandler" property="*" /> <jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:getProperty name="formhandler" property="allMessages" /> <jsp:getProperty name="formhandler" property="allMessages" />
<div class="configure">
<form action="configadvanced.jsp" method="POST"> <form action="configadvanced.jsp" method="POST">
<% String prev = System.getProperty("net.i2p.router.web.ConfigAdvancedHandler.nonce"); <% String prev = System.getProperty("net.i2p.router.web.ConfigAdvancedHandler.nonce");
if (prev != null) System.setProperty("net.i2p.router.web.ConfigAdvancedHandler.noncePrev", prev); if (prev != null) System.setProperty("net.i2p.router.web.ConfigAdvancedHandler.noncePrev", prev);
System.setProperty("net.i2p.router.web.ConfigAdvancedHandler.nonce", new java.util.Random().nextLong()+""); %> System.setProperty("net.i2p.router.web.ConfigAdvancedHandler.nonce", new java.util.Random().nextLong()+""); %>
<input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigAdvancedHandler.nonce")%>" /> <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigAdvancedHandler.nonce")%>" />
<input type="hidden" name="action" value="blah" /> <input type="hidden" name="action" value="blah" />
<textarea rows="32" cols="100" name="config" wrap="off"><jsp:getProperty name="advancedhelper" property="settings" /></textarea><br /> <textarea rows="32" cols="100" name="config" wrap="off"><jsp:getProperty name="advancedhelper" property="settings" /></textarea><br /><hr>
<p> <p align="right">
<input type="submit" name="shouldsave" value="Apply" /> <input type="reset" value="Cancel" /> <input type="submit" name="shouldsave" value="Apply" />
</p><p> <input type="reset" value="Cancel" />
NOTE: Some changes may require a restart to take effect. </p>
</p> <p>
</form> NOTE: Some changes may require a restart to take effect.
</div> </p>
</body> </form>
</html> </div>
</div>
</body>
</html>

View File

@ -1,69 +1,69 @@
<%@page contentType="text/html"%> <%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%> <%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head> <html><head>
<title>I2P Router Console - config clients</title> <title>I2P Router Console - config clients</title>
<%@include file="css.jsp" %> <%@include file="css.jsp" %>
<style type='text/css'> <style type='text/css'>
button span.hide{ button span.hide{
display:none; display:none;
} }
</style> </style>
</head><body> </head><body>
<%@include file="nav.jsp" %> <%@include file="nav.jsp" %>
<%@include file="summary.jsp" %> <%@include file="summary.jsp" %>
<jsp:useBean class="net.i2p.router.web.ConfigClientsHelper" id="clientshelper" scope="request" /> <jsp:useBean class="net.i2p.router.web.ConfigClientsHelper" id="clientshelper" scope="request" />
<jsp:setProperty name="clientshelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="clientshelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<h1>I2P Client Configuration</h1> <h1>I2P Client Configuration</h1>
<div class="main" id="main"> <div class="main" id="main">
<%@include file="confignav.jsp" %> <%@include file="confignav.jsp" %>
<jsp:useBean class="net.i2p.router.web.ConfigClientsHandler" id="formhandler" scope="request" /> <jsp:useBean class="net.i2p.router.web.ConfigClientsHandler" id="formhandler" scope="request" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:setProperty name="formhandler" property="action" value="<%=request.getParameter("action")%>" /> <jsp:setProperty name="formhandler" property="action" value="<%=request.getParameter("action")%>" />
<jsp:setProperty name="formhandler" property="nonce" value="<%=request.getParameter("nonce")%>" /> <jsp:setProperty name="formhandler" property="nonce" value="<%=request.getParameter("nonce")%>" />
<jsp:setProperty name="formhandler" property="settings" value="<%=request.getParameterMap()%>" /> <jsp:setProperty name="formhandler" property="settings" value="<%=request.getParameterMap()%>" />
<jsp:getProperty name="formhandler" property="allMessages" /> <jsp:getProperty name="formhandler" property="allMessages" />
<div class="configure">
<form action="configclients.jsp" method="POST"> <form action="configclients.jsp" method="POST">
<% String prev = System.getProperty("net.i2p.router.web.ConfigClientsHandler.nonce"); <% String prev = System.getProperty("net.i2p.router.web.ConfigClientsHandler.nonce");
if (prev != null) System.setProperty("net.i2p.router.web.ConfigClientsHandler.noncePrev", prev); if (prev != null) System.setProperty("net.i2p.router.web.ConfigClientsHandler.noncePrev", prev);
System.setProperty("net.i2p.router.web.ConfigClientsHandler.nonce", new java.util.Random().nextLong()+""); %> System.setProperty("net.i2p.router.web.ConfigClientsHandler.nonce", new java.util.Random().nextLong()+""); %>
<input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigClientsHandler.nonce")%>" /> <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigClientsHandler.nonce")%>" />
<h3>Client Configuration</h3> <h3>Client Configuration</h3>
<p> <p>
The Java clients listed below are started by the router and run in the same JVM. The Java clients listed below are started by the router and run in the same JVM.
</p><p> </p><p>
<jsp:getProperty name="clientshelper" property="form1" /> <jsp:getProperty name="clientshelper" property="form1" />
</p><p> </p><p>
<i>All changes require restart to take effect. To change other client options, edit the clients.config file.</i> <i>All changes require restart to take effect. To change other client options, edit the clients.config file.</i>
</p> <hr /><p> </p> <hr /><p>
<input type="submit" name="action" value="Save Client Configuration" /> <input type="submit" name="action" value="Save Client Configuration" />
</p> </p>
<hr /> <hr />
<h3>WebApp Configuration</h3> <h3>WebApp Configuration</h3>
<p> <p>
The Java web applications listed below are started by the webConsole client and run in the same JVM as the router. The Java web applications listed below are started by the webConsole client and run in the same JVM as the router.
They are usually web applications accessible through the router console. They are usually web applications accessible through the router console.
They may be complete applications (e.g. i2psnark), They may be complete applications (e.g. i2psnark),
front-ends to another client or application which must be separately enabled (e.g. susidns, i2ptunnel), front-ends to another client or application which must be separately enabled (e.g. susidns, i2ptunnel),
or have no web interface at all (e.g. addressbook). or have no web interface at all (e.g. addressbook).
</p><p> </p><p>
A web app may also be disabled by removing the .war file from the webapps directory; A web app may also be disabled by removing the .war file from the webapps directory;
however the .war file and web app will reappear when you update your router to a newer version, however the .war file and web app will reappear when you update your router to a newer version,
so disabling the web app here is the preferred method. so disabling the web app here is the preferred method.
</p><p> </p><p>
<jsp:getProperty name="clientshelper" property="form2" /> <jsp:getProperty name="clientshelper" property="form2" />
</p><p> </p><p><hr>
<input type="submit" name="action" value="Save WebApp Configuration" /> <input type="submit" name="action" value="Save WebApp Configuration" />
</p><p> </p><hr><p>
<i>All changes require restart to take effect. To change other webapp options, edit the webapps.config file.</i> <i>All changes require restart to take effect. To change other webapp options, edit the webapps.config file.</i>
</p> </p>
</form> </form>
</div> </div>
</div>
</body> </body>
</html> </html>

View File

@ -1,57 +1,63 @@
<%@page contentType="text/html"%> <%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%> <%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head> <html><head>
<title>I2P Router Console - config keyring</title> <title>I2P Router Console - config keyring</title>
<%@include file="css.jsp" %> <%@include file="css.jsp" %>
</head><body> </head><body>
<%@include file="nav.jsp" %> <%@include file="nav.jsp" %>
<%@include file="summary.jsp" %> <%@include file="summary.jsp" %>
<h1>I2P Keyring Configuration</h1> <h1>I2P Keyring Configuration</h1>
<div class="main" id="main"> <div class="main" id="main">
<%@include file="confignav.jsp" %> <%@include file="confignav.jsp" %>
<jsp:useBean class="net.i2p.router.web.ConfigKeyringHandler" id="formhandler" scope="request" /> <jsp:useBean class="net.i2p.router.web.ConfigKeyringHandler" id="formhandler" scope="request" />
<jsp:setProperty name="formhandler" property="*" /> <jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:getProperty name="formhandler" property="allMessages" /> <jsp:getProperty name="formhandler" property="allMessages" />
<jsp:useBean class="net.i2p.router.web.ConfigKeyringHelper" id="keyringhelper" scope="request" /> <jsp:useBean class="net.i2p.router.web.ConfigKeyringHelper" id="keyringhelper" scope="request" />
<jsp:setProperty name="keyringhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="keyringhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<div class="configure">
<p> <p>
<h2>Keyring</h2> <h2>Keyring</h2>
The router keyring is used to decrypt encrypted leaseSets. The router keyring is used to decrypt encrypted leaseSets.
The keyring may contain keys for local or remote encrypted destinations. The keyring may contain keys for local or remote encrypted destinations.
<p><jsp:getProperty name="keyringhelper" property="summary" /> <p><jsp:getProperty name="keyringhelper" property="summary" />
</p> </p>
<hr /> <hr />
<form action="configkeyring.jsp" method="POST"> <form action="configkeyring.jsp" method="POST">
<% String prev = System.getProperty("net.i2p.router.web.ConfigKeyringHandler.nonce"); <% String prev = System.getProperty("net.i2p.router.web.ConfigKeyringHandler.nonce");
if (prev != null) System.setProperty("net.i2p.router.web.ConfigKeyringHandler.noncePrev", prev); if (prev != null) System.setProperty("net.i2p.router.web.ConfigKeyringHandler.noncePrev", prev);
System.setProperty("net.i2p.router.web.ConfigKeyringHandler.nonce", new java.util.Random().nextLong()+""); %> System.setProperty("net.i2p.router.web.ConfigKeyringHandler.nonce", new java.util.Random().nextLong()+""); %>
<input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigKeyringHandler.nonce")%>" /> <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigKeyringHandler.nonce")%>" />
<h2>Manual Keyring Addition</h2> <h2>Manual Keyring Addition</h2>
Enter keys for encrypted remote destinations here. Enter keys for encrypted remote destinations here.
Keys for local destinations must be entered on the <a href="i2ptunnel/index.jsp">I2PTunnel page</a>. Keys for local destinations must be entered on the <a href="i2ptunnel/index.jsp">I2PTunnel page</a>.
<p> <p>
<table> <table>
<tr><td>Dest. name, hash, or full key: <tr>
<td><textarea name="peer" cols="44" rows="1" style="height: 3em;" wrap="off"></textarea> <td>Dest. name, hash, or full key:
<tr><td align="right">Session Key: <td><textarea name="peer" cols="44" rows="1" style="height: 3em;" wrap="off"></textarea>
<td><input type="text" size="55" name="key" /> <tr>
<tr><td><td><input type="submit" name="action" value="Add key" /> <td align="right">Session Key:
</table> <td><input type="text" size="55" name="key" />
</form> <tr>
<td>
<td><div align="right">
</div> <input type="submit" name="action" value="Add key" />
</div>
</body> </table>
</html> </form>
</div>
</div>
</body>
</html>

View File

@ -1,54 +1,68 @@
<%@page contentType="text/html"%> <%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%> <%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head> <html><head>
<title>I2P Router Console - config logging</title> <title>I2P Router Console - config logging</title>
<%@include file="css.jsp" %> <%@include file="css.jsp" %>
</head><body> </head><body>
<jsp:useBean class="net.i2p.router.web.ConfigLoggingHelper" id="logginghelper" scope="request" /> <jsp:useBean class="net.i2p.router.web.ConfigLoggingHelper" id="logginghelper" scope="request" />
<jsp:setProperty name="logginghelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="logginghelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<%@include file="nav.jsp" %> <%@include file="nav.jsp" %>
<%@include file="summary.jsp" %> <%@include file="summary.jsp" %>
<h1>I2P Logging Configuration</h1> <h1>I2P Logging Configuration</h1>
<div class="main" id="main"> <div class="main" id="main">
<%@include file="confignav.jsp" %> <%@include file="confignav.jsp" %>
<jsp:useBean class="net.i2p.router.web.ConfigLoggingHandler" id="formhandler" scope="request" /> <jsp:useBean class="net.i2p.router.web.ConfigLoggingHandler" id="formhandler" scope="request" />
<jsp:setProperty name="formhandler" property="*" /> <jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:getProperty name="formhandler" property="allMessages" /> <jsp:getProperty name="formhandler" property="allMessages" />
<div class="configure">
<form action="configlogging.jsp" method="POST"> <form action="configlogging.jsp" method="POST">
<% String prev = System.getProperty("net.i2p.router.web.ConfigLoggingHandler.nonce"); <% String prev = System.getProperty("net.i2p.router.web.ConfigLoggingHandler.nonce");
if (prev != null) System.setProperty("net.i2p.router.web.ConfigLoggingHandler.noncePrev", prev); if (prev != null) System.setProperty("net.i2p.router.web.ConfigLoggingHandler.noncePrev", prev);
System.setProperty("net.i2p.router.web.ConfigLoggingHandler.nonce", new java.util.Random().nextLong()+""); %> System.setProperty("net.i2p.router.web.ConfigLoggingHandler.nonce", new java.util.Random().nextLong()+""); %>
<input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigLoggingHandler.nonce")%>" /> <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigLoggingHandler.nonce")%>" />
<input type="hidden" name="action" value="blah" /> <input type="hidden" name="action" value="blah" />
<table border="0" cellspacing="5"> <table border="0" cellspacing="5">
<tr><td valign="top"><b>Logging filename:</b> <tr>
<td><input type="text" name="logfilename" size="40" value="<jsp:getProperty name="logginghelper" property="logFilePattern" />" /><br /> <td valign="top"><b>Logging filename:</b>
<i>(the symbol '@' will be replaced during log rotation)</i> <td><input type="text" name="logfilename" size="40" value="<jsp:getProperty name="logginghelper" property="logFilePattern" />" />
<tr><td valign="top"><b>Log record format:</b> <br /> <i>(the symbol '@' will be replaced during log rotation)</i>
<td><input type="text" name="logformat" size="20" value="<jsp:getProperty name="logginghelper" property="recordPattern" />" /><br /> <tr>
<i>(use 'd' = date, 'c' = class, 't' = thread, 'p' = priority, 'm' = message)</i> <td valign="top"><b>Log record format:</b>
<tr><td valign="top"><b>Log date format:</b> <td><input type="text" name="logformat" size="20" value="<jsp:getProperty name="logginghelper" property="recordPattern" />" />
<td><input type="text" name="logdateformat" size="20" value="<jsp:getProperty name="logginghelper" property="datePattern" />" /><br /> <br /> <i>(use 'd' = date, 'c' = class, 't' = thread, 'p' = priority,
<i>('MM' = month, 'dd' = day, 'HH' = hour, 'mm' = minute, 'ss' = second, 'SSS' = millisecond)</i> 'm' = message)</i>
<tr><td valign="top"><b>Max log file size:</b> <tr>
<td><input type="text" name="logfilesize" size="4" value="<jsp:getProperty name="logginghelper" property="maxFileSize" />" /><br /> <td valign="top"><b>Log date format:</b>
<tr><td valign="top"><b>Default log level:</b> <td><input type="text" name="logdateformat" size="20" value="<jsp:getProperty name="logginghelper" property="datePattern" />" />
<td><jsp:getProperty name="logginghelper" property="defaultLogLevelBox" /> <br /> <i>('MM' = month, 'dd' = day, 'HH' = hour, 'mm' = minute, 'ss'
<br /><i>(DEBUG and INFO are not recommended defaults, as they will drastically slow down your router)</i> = second, 'SSS' = millisecond)</i>
<tr><td valign="top"><b>Log level overrides:</b> <tr>
<td><jsp:getProperty name="logginghelper" property="logLevelTable" /> <td valign="top"><b>Max log file size:</b>
<tr><td><td> <td><input type="text" name="logfilesize" size="4" value="<jsp:getProperty name="logginghelper" property="maxFileSize" />" />
<input type="submit" name="shouldsave" value="Save changes" /> <br />
<input type="reset" value="Cancel" /> <tr>
</table> <td valign="top"><b>Default log level:</b>
</form> <td><jsp:getProperty name="logginghelper" property="defaultLogLevelBox" /> <br /> <i>(DEBUG and INFO are not recommended defaults,
</div> as they will drastically slow down your router)</i>
<tr>
</body> <td valign="top"><b>Log level overrides:</b>
</html> <td><jsp:getProperty name="logginghelper" property="logLevelTable" />
<tr>
<td colspan="2" valign="top"><hr>
<tr>
<td>
<td> <div align="right">
<input type="submit" name="shouldsave" value="Save changes" />
<input type="reset" value="Cancel" />
</div>
</table>
</form>
</div>
</div>
</body>
</html>

View File

@ -1,84 +1,87 @@
<%@page contentType="text/html"%> <%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%> <%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head> <html><head>
<title>I2P Router Console - config peers</title> <title>I2P Router Console - config peers</title>
<%@include file="css.jsp" %> <%@include file="css.jsp" %>
</head><body> </head><body>
<%@include file="nav.jsp" %> <%@include file="nav.jsp" %>
<%@include file="summary.jsp" %> <%@include file="summary.jsp" %>
<h1>I2P Peer Configuration</h1> <h1>I2P Peer Configuration</h1>
<div class="main" id="main"> <div class="main" id="main">
<%@include file="confignav.jsp" %> <%@include file="confignav.jsp" %>
<jsp:useBean class="net.i2p.router.web.ConfigPeerHandler" id="formhandler" scope="request" /> <jsp:useBean class="net.i2p.router.web.ConfigPeerHandler" id="formhandler" scope="request" />
<jsp:setProperty name="formhandler" property="*" /> <jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:getProperty name="formhandler" property="allMessages" /> <jsp:getProperty name="formhandler" property="allMessages" />
<jsp:useBean class="net.i2p.router.web.ConfigPeerHelper" id="peerhelper" scope="request" /> <jsp:useBean class="net.i2p.router.web.ConfigPeerHelper" id="peerhelper" scope="request" />
<jsp:setProperty name="peerhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="peerhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<% String peer = ""; <% String peer = "";
if (request.getParameter("peer") != null) if (request.getParameter("peer") != null)
peer = request.getParameter("peer"); peer = request.getParameter("peer");
%> %>
<div class="configure">
<form action="configpeer.jsp" method="POST"> <form action="configpeer.jsp" method="POST">
<% String prev = System.getProperty("net.i2p.router.web.ConfigPeerHandler.nonce"); <% String prev = System.getProperty("net.i2p.router.web.ConfigPeerHandler.nonce");
if (prev != null) System.setProperty("net.i2p.router.web.ConfigPeerHandler.noncePrev", prev); if (prev != null) System.setProperty("net.i2p.router.web.ConfigPeerHandler.noncePrev", prev);
System.setProperty("net.i2p.router.web.ConfigPeerHandler.nonce", new java.util.Random().nextLong()+""); %> System.setProperty("net.i2p.router.web.ConfigPeerHandler.nonce", new java.util.Random().nextLong()+""); %>
<input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigPeerHandler.nonce")%>" /> <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigPeerHandler.nonce")%>" />
<hr /> <hr />
<p> <p>
<a name="sh"> </a> <a name="sh"> </a>
<a name="unsh"> </a> <a name="unsh"> </a>
<a name="bonus"> </a> <a name="bonus"> </a>
<h2>Manual Peer Controls</h2> <h2>Manual Peer Controls</h2>
Router Hash: Router Hash:
<input type="text" size="55" name="peer" value="<%=peer%>" /> <input type="text" size="55" name="peer" value="<%=peer%>" />
<h3>Manually Shitlist / Unshitlist a Router</h3> <h3>Manually Shitlist / Unshitlist a Router</h3>
Shitlisting will prevent the participation of this peer in tunnels you create. Shitlisting will prevent the participation of this peer in tunnels you create.
<p> <hr />
<input type="submit" name="action" value="Shitlist peer until restart" /> <p>
<input type="submit" name="action" value="Unshitlist peer" /> <input type="submit" name="action" value="Shitlist peer until restart" />
<% if (! "".equals(peer)) { %> <input type="submit" name="action" value="Unshitlist peer" />
<font color="blue">&lt;---- click to verify action</font> <% if (! "".equals(peer)) { %>
<% } %> <font color="blue">&lt;---- click to verify action</font>
</p> <% } %>
</p>
<h3>Adjust Profile Bonuses</h3>
Bonuses may be positive or negative, and affect the peer's inclusion in Fast and High Capacity tiers. <h3>Adjust Profile Bonuses</h3>
Fast peers are used for client tunnels, and High Capacity peers are used for some exploratory tunnels. Bonuses may be positive or negative, and affect the peer's inclusion in Fast
Current bonuses are displayed on the <a href="profiles.jsp">profiles page</a>. and High Capacity tiers. Fast peers are used for client tunnels, and High
<p> Capacity peers are used for some exploratory tunnels. Current bonuses are
<% long speed = 0; long capacity = 0; displayed on the <a href="profiles.jsp">profiles page</a>.
if (! "".equals(peer)) { <hr />
// get existing bonus values? <p>
} <% long speed = 0; long capacity = 0;
%> if (! "".equals(peer)) {
Speed: // get existing bonus values?
<input type="text" size="8" name="speed" value="<%=speed%>" /> }
Capacity: %>
<input type="text" size="8" name="capacity" value="<%=capacity%>" /> Speed:
<input type="submit" name="action" value="Adjust peer bonuses" /> <input type="text" size="8" name="speed" value="<%=speed%>" />
</p> Capacity:
</form> <input type="text" size="8" name="capacity" value="<%=capacity%>" />
<input type="submit" name="action" value="Adjust peer bonuses" />
<hr /> </p>
<a name="shitlist"> </a> </form>
<jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" />
<jsp:setProperty name="profilesHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <hr />
<jsp:getProperty name="profilesHelper" property="shitlistSummary" /> <a name="shitlist"> </a>
<hr /> <jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" />
<jsp:getProperty name="peerhelper" property="blocklistSummary" /> <jsp:setProperty name="profilesHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:getProperty name="profilesHelper" property="shitlistSummary" />
<hr />
</div> <jsp:getProperty name="peerhelper" property="blocklistSummary" />
</body>
</html> </div>
</div>
</body>
</html>

View File

@ -1,87 +1,87 @@
<%@page contentType="text/html"%> <%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%> <%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head> <html><head>
<title>I2P Router Console - config service</title> <title>I2P Router Console - config service</title>
<%@include file="css.jsp" %> <%@include file="css.jsp" %>
</head><body> </head><body>
<%@include file="nav.jsp" %> <%@include file="nav.jsp" %>
<%@include file="summary.jsp" %> <%@include file="summary.jsp" %>
<h1>I2P Service Configuration</h1> <h1>I2P Service Configuration</h1>
<div class="main" id="main"> <div class="main" id="main">
<%@include file="confignav.jsp" %> <%@include file="confignav.jsp" %>
<jsp:useBean class="net.i2p.router.web.ConfigServiceHandler" id="formhandler" scope="request" /> <jsp:useBean class="net.i2p.router.web.ConfigServiceHandler" id="formhandler" scope="request" />
<jsp:setProperty name="formhandler" property="*" /> <jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:getProperty name="formhandler" property="allMessages" /> <jsp:getProperty name="formhandler" property="allMessages" />
<div class="configure">
<form action="configservice.jsp" method="POST"> <form action="configservice.jsp" method="POST">
<% String prev = System.getProperty("net.i2p.router.web.ConfigServiceHandler.nonce"); <% String prev = System.getProperty("net.i2p.router.web.ConfigServiceHandler.nonce");
if (prev != null) System.setProperty("net.i2p.router.web.ConfigServiceHandler.noncePrev", prev); if (prev != null) System.setProperty("net.i2p.router.web.ConfigServiceHandler.noncePrev", prev);
System.setProperty("net.i2p.router.web.ConfigServiceHandler.nonce", new java.util.Random().nextLong()+""); %> System.setProperty("net.i2p.router.web.ConfigServiceHandler.nonce", new java.util.Random().nextLong()+""); %>
<input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigServiceHandler.nonce")%>" /> <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigServiceHandler.nonce")%>" />
<h4>Shutdown the router</h4> <h4>Shutdown the router</h4>
<p>Graceful shutdown lets the router satisfy the agreements it has already made <p>Graceful shutdown lets the router satisfy the agreements it has already made
before shutting down, but may take a few minutes. If you need to kill the before shutting down, but may take a few minutes. If you need to kill the
router immediately, that option is available as well.</p> router immediately, that option is available as well.</p>
<input type="submit" name="action" value="Shutdown gracefully" /> <input type="submit" name="action" value="Shutdown gracefully" />
<input type="submit" name="action" value="Shutdown immediately" /> <input type="submit" name="action" value="Shutdown immediately" />
<input type="submit" name="action" value="Cancel graceful shutdown" /> <input type="submit" name="action" value="Cancel graceful shutdown" />
<hr> <hr>
<% if (System.getProperty("wrapper.version") != null) { %> <% if (System.getProperty("wrapper.version") != null) { %>
<p>If you want the router to restart itself after shutting down, you can choose one of <p>If you want the router to restart itself after shutting down, you can choose one of
the following. This is useful in some situations - for example, if you changed the following. This is useful in some situations - for example, if you changed
some settings that client applications only read at startup, such as the routerconsole password some settings that client applications only read at startup, such as the routerconsole password
or the interface it listens on. A graceful restart will take a few minutes (but your peers or the interface it listens on. A graceful restart will take a few minutes (but your peers
will appreciate your patience), while a hard restart does so immediately. After tearing down will appreciate your patience), while a hard restart does so immediately. After tearing down
the router, it will wait 1 minute before starting back up again.</p> the router, it will wait 1 minute before starting back up again.</p>
<input type="submit" name="action" value="Graceful restart" /> <input type="submit" name="action" value="Graceful restart" />
<input type="submit" name="action" value="Hard restart" /> <input type="submit" name="action" value="Hard restart" />
<% } %> <% } %>
<hr> <hr>
<% if ( (System.getProperty("os.name") != null) && (System.getProperty("os.name").startsWith("Win")) ) { %> <% if ( (System.getProperty("os.name") != null) && (System.getProperty("os.name").startsWith("Win")) ) { %>
<h4>Systray integration</h4> <h4>Systray integration</h4>
<p>On the windows platform, there is a small application to sit in the system <p>On the windows platform, there is a small application to sit in the system
tray, allowing you to view the router's status (later on, I2P client applications tray, allowing you to view the router's status (later on, I2P client applications
will be able to integrate their own functionality into the system tray as well). will be able to integrate their own functionality into the system tray as well).
If you are on windows, you can either enable or disable that icon here.</p> If you are on windows, you can either enable or disable that icon here.</p>
<input type="submit" name="action" value="Show systray icon" /> <input type="submit" name="action" value="Show systray icon" />
<input type="submit" name="action" value="Hide systray icon" /> <input type="submit" name="action" value="Hide systray icon" />
<hr> <hr>
<h4>Run on startup</h4> <h4>Run on startup</h4>
<p>You can control whether I2P is run on startup or not by selecting one of the <p>You can control whether I2P is run on startup or not by selecting one of the
following options - I2P will install (or remove) a service accordingly. You can following options - I2P will install (or remove) a service accordingly. You can
also run the <code>install_i2p_service_winnt.bat</code> (or also run the <code>install_i2p_service_winnt.bat</code> (or
<code>uninstall_i2p_service_winnt.bat</code>) from the command line, if you prefer.</p> <code>uninstall_i2p_service_winnt.bat</code>) from the command line, if you prefer.</p>
<input type="submit" name="action" value="Run I2P on startup" /> <input type="submit" name="action" value="Run I2P on startup" />
<input type="submit" name="action" value="Don't run I2P on startup" /><br /> <input type="submit" name="action" value="Don't run I2P on startup" /><br />
<p><b>Note:</b> If you are running I2P as service right now, removing it will shut <p><b>Note:</b> If you are running I2P as service right now, removing it will shut
down your router immediately. You may want to consider shutting down gracefully, as down your router immediately. You may want to consider shutting down gracefully, as
above, then running uninstall_i2p_service_winnt.bat.</p><hr> above, then running uninstall_i2p_service_winnt.bat.</p><hr>
<% } %> <% } %>
<% if (System.getProperty("wrapper.version") != null) { %> <% if (System.getProperty("wrapper.version") != null) { %>
<h4>Debugging</h4> <h4>Debugging</h4>
<p>At times, it may be helpful to debug I2P by getting a thread dump. To do so, <p>At times, it may be helpful to debug I2P by getting a thread dump. To do so,
please select the following option and review the thread dumped to please select the following option and review the thread dumped to
<a href="logs.jsp#servicelogs">wrapper.log</a>.</p> <a href="logs.jsp#servicelogs">wrapper.log</a>.</p>
<input type="submit" name="action" value="Dump threads" /> <input type="submit" name="action" value="Dump threads" />
<% } %><hr> <% } %><hr>
<h4>Launch browser on router startup?</h4> <h4>Launch browser on router startup?</h4>
<p>I2P's main configuration interface is this web console, so for your convenience <p>I2P's main configuration interface is this web console, so for your convenience
I2P can launch a web browser pointing at I2P can launch a web browser pointing at
<a href="http://127.0.0.1:7657/index.jsp">http://127.0.0.1:7657/index.jsp</a> whenever <a href="http://127.0.0.1:7657/index.jsp">http://127.0.0.1:7657/index.jsp</a> whenever
the router starts up.</p> the router starts up.</p>
<input type="submit" name="action" value="View console on startup" /> <input type="submit" name="action" value="View console on startup" />
<input type="submit" name="action" value="Do not view console on startup" /> <input type="submit" name="action" value="Do not view console on startup" />
</form><hr> </form><hr>
</div> </div>
</div>
</body> </body>
</html> </html>

View File

@ -65,7 +65,7 @@ function toggleAll(category)
<jsp:useBean class="net.i2p.router.web.ConfigStatsHelper" id="statshelper" scope="request" /> <jsp:useBean class="net.i2p.router.web.ConfigStatsHelper" id="statshelper" scope="request" />
<jsp:setProperty name="statshelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="statshelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<div class="caonfigure"> <div class="configure">
<form id="statsForm" name="statsForm" action="configstats.jsp" method="POST"> <form id="statsForm" name="statsForm" action="configstats.jsp" method="POST">
<% String prev = System.getProperty("net.i2p.router.web.ConfigStatsHandler.nonce"); <% String prev = System.getProperty("net.i2p.router.web.ConfigStatsHandler.nonce");
if (prev != null) System.setProperty("net.i2p.router.web.ConfigStatsHandler.noncePrev", prev); if (prev != null) System.setProperty("net.i2p.router.web.ConfigStatsHandler.noncePrev", prev);

View File

@ -1,59 +1,81 @@
<%@page contentType="text/html"%> <%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%> <%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head> <html><head>
<title>I2P Router Console - config update</title> <title>I2P Router Console - config update</title>
<%@include file="css.jsp" %> <%@include file="css.jsp" %>
</head><body> </head><body>
<%@include file="nav.jsp" %> <%@include file="nav.jsp" %>
<%@include file="summary.jsp" %> <%@include file="summary.jsp" %>
<h1>I2P Update Configuration</h1> <h1>I2P Update Configuration</h1>
<div class="main" id="main"> <div class="main" id="main">
<%@include file="confignav.jsp" %> <%@include file="confignav.jsp" %>
<jsp:useBean class="net.i2p.router.web.ConfigUpdateHandler" id="formhandler" scope="request" /> <jsp:useBean class="net.i2p.router.web.ConfigUpdateHandler" id="formhandler" scope="request" />
<jsp:setProperty name="formhandler" property="*" /> <jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:getProperty name="formhandler" property="allMessages" /> <jsp:getProperty name="formhandler" property="allMessages" />
<jsp:useBean class="net.i2p.router.web.ConfigUpdateHelper" id="updatehelper" scope="request" /> <jsp:useBean class="net.i2p.router.web.ConfigUpdateHelper" id="updatehelper" scope="request" />
<jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" /> <jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<div class="messages">
<br /><i><jsp:getProperty name="updatehelper" property="newsStatus" /></i><br />&nbsp;<br /> <i><jsp:getProperty name="updatehelper" property="newsStatus" /></i></div>
<form action="configupdate.jsp" method="POST"> <div class="configure">
<% String prev = System.getProperty("net.i2p.router.web.ConfigUpdateHandler.nonce"); <form action="configupdate.jsp" method="POST">
if (prev != null) System.setProperty("net.i2p.router.web.ConfigUpdateHandler.noncePrev", prev); <% String prev = System.getProperty("net.i2p.router.web.ConfigUpdateHandler.nonce");
System.setProperty("net.i2p.router.web.ConfigUpdateHandler.nonce", new java.util.Random().nextLong()+""); %> if (prev != null) System.setProperty("net.i2p.router.web.ConfigUpdateHandler.noncePrev", prev);
<input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigUpdateHandler.nonce")%>" /> System.setProperty("net.i2p.router.web.ConfigUpdateHandler.nonce", new java.util.Random().nextLong()+""); %>
<table border="0" cellspacing="5"><tr><td colspan="2"></tr><tr><td><b>News:</b></td><td> <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigUpdateHandler.nonce")%>" />
<% if ("true".equals(System.getProperty("net.i2p.router.web.UpdateHandler.updateInProgress", "false"))) { %> <table border="0" cellspacing="5">
<i>Update In Progress</i><br /> <tr>
<% } else { %> <td colspan="2"></tr>
<input type="submit" name="action" value="Check for update now" /> <tr>
<% } %></tr> <td><b>News:</b></td>
<tr><td colspan="2"><hr /></td></tr> <td> <% if ("true".equals(System.getProperty("net.i2p.router.web.UpdateHandler.updateInProgress", "false"))) { %> <i>Update In Progress</i><br /> <% } else { %> <input type="submit" name="action" value="Check for update now" />
<tr><td><b>News URL:</b></td> <% } %></tr>
<td><input type="text" size="60" name="newsURL" value="<jsp:getProperty name="updatehelper" property="newsURL" />"></td></tr> <tr>
<tr><td><b>Refresh frequency:</b> <td colspan="2"><hr /></td>
<td><jsp:getProperty name="updatehelper" property="refreshFrequencySelectBox" /> </tr>
<tr><td><b>Update policy:</b> <tr>
<td><jsp:getProperty name="updatehelper" property="updatePolicySelectBox" /> <td><b>News URL:</b></td>
<tr><td><b>Update through the eepProxy?</b> <td><input type="text" size="60" name="newsURL" value="<jsp:getProperty name="updatehelper" property="newsURL" />"></td>
<td><jsp:getProperty name="updatehelper" property="updateThroughProxy" /> </tr>
<tr><td><b>eepProxy host:</b> <tr>
<td><input type="text" size="10" name="proxyHost" value="<jsp:getProperty name="updatehelper" property="proxyHost" />" /> <td><b>Refresh frequency:</b>
<tr><td><b>eepProxy port:</b> <td><jsp:getProperty name="updatehelper" property="refreshFrequencySelectBox" />
<td><input type="text" size="4" name="proxyPort" value="<jsp:getProperty name="updatehelper" property="proxyPort" />" /> <tr>
<tr><td><b>Update URLs:</b> <td><b>Update policy:</b>
<td><textarea name="updateURL" wrap="off"><jsp:getProperty name="updatehelper" property="updateURL" /></textarea> <td><jsp:getProperty name="updatehelper" property="updatePolicySelectBox" />
<tr><td><b>Trusted keys:</b> <tr>
<td><textarea name="trustedKeys" wrap="off"><jsp:getProperty name="updatehelper" property="trustedKeys" /></textarea> <td><b>Update through the eepProxy?</b>
<tr><tr><td colspan="2"><hr /><tr> <td><jsp:getProperty name="updatehelper" property="updateThroughProxy" />
<tr><td><td><input type="submit" name="action" value="Save" /> <input type="reset" value="Cancel" /> <tr>
</table> <td><b>eepProxy host:</b>
</form> <td><input type="text" size="10" name="proxyHost" value="<jsp:getProperty name="updatehelper" property="proxyHost" />" />
</div> <tr>
</body> <td><b>eepProxy port:</b>
</html> <td><input type="text" size="4" name="proxyPort" value="<jsp:getProperty name="updatehelper" property="proxyPort" />" />
<tr>
<td><b>Update URLs:</b>
<td><textarea name="updateURL" wrap="off"><jsp:getProperty name="updatehelper" property="updateURL" /></textarea>
<tr>
<td><b>Trusted keys:</b>
<td><textarea name="trustedKeys" wrap="off"><jsp:getProperty name="updatehelper" property="trustedKeys" /></textarea>
<tr>
<tr>
<td colspan="2"><hr />
<tr>
<tr>
<td>
<td><div align="right">
<input type="submit" name="action" value="Save" />
<input type="reset" value="Cancel" />
</div>
</table>
</form>
</div>
</div>
</body>
</html>