From d6820634acca97fa5762e51ced707b3d4ceff6a8 Mon Sep 17 00:00:00 2001
From: z3d <z3d@mail.i2p>
Date: Sat, 1 Aug 2009 01:15:12 +0000
Subject: [PATCH] Further enhancements to the configuration pages.

---
 apps/routerconsole/jsp/config.jsp             | 10 ++++----
 apps/routerconsole/jsp/configadvanced.jsp     | 10 ++++----
 apps/routerconsole/jsp/configclients.jsp      | 13 +++++-----
 apps/routerconsole/jsp/configpeer.jsp         | 13 +++++-----
 apps/routerconsole/jsp/configservice.jsp      | 24 +++++++++++--------
 apps/routerconsole/jsp/configstats.jsp        |  4 +---
 apps/routerconsole/jsp/configtunnels.jsp      |  2 +-
 apps/routerconsole/jsp/configui.jsp           |  4 ++--
 apps/routerconsole/jsp/configupdate.jsp       | 24 ++++++++-----------
 .../resources/themes/console/dark/console.css | 11 +++++++++
 .../themes/console/light/console.css          |  4 ++++
 router/java/src/net/i2p/router/Blocklist.java |  6 ++---
 .../src/net/i2p/router/RouterVersion.java     |  4 ++--
 13 files changed, 71 insertions(+), 58 deletions(-)

diff --git a/apps/routerconsole/jsp/config.jsp b/apps/routerconsole/jsp/config.jsp
index d19742e140..8dad41943c 100644
--- a/apps/routerconsole/jsp/config.jsp
+++ b/apps/routerconsole/jsp/config.jsp
@@ -62,10 +62,9 @@
         out.print("The higher the share bandwidth the more you improve your anonymity and help the network.<hr />");
     }
  %>
- </p><p>
- <input type="submit" name="save" value="Save changes" /> <input type="reset" value="Cancel" /><br />
- </p>
-<!--
+ </p><div class="formaction">
+<input type="submit" name="save" value="Save changes" /> <input type="reset" value="Cancel" /></div>
+ <!--
  <b>Enable load testing: </b>
 <input type="checkbox" class="optbox" name="enableloadtesting" value="true" <jsp:getProperty name="nethelper" property="enableLoadTesting" /> />
  <p>If enabled, your router will periodically anonymously probe some of your peers
@@ -148,9 +147,10 @@
     Specify Port:
     <input name ="ntcpport" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="ntcpport" />" /><br />
  </p><p><b>Note: Changing these settings will restart your router.</b>
- </p><hr>
+ </p><hr><div class="formaction">
  <input type="submit" name="save" value="Save changes" /> <input type="reset" value="Cancel" />
 </div>
+</div>
 <h3><a name="chelp">Configuration Help:</a></h3>
  <div align="justify">
  <p>
diff --git a/apps/routerconsole/jsp/configadvanced.jsp b/apps/routerconsole/jsp/configadvanced.jsp
index c65d09d34a..f435c68a94 100644
--- a/apps/routerconsole/jsp/configadvanced.jsp
+++ b/apps/routerconsole/jsp/configadvanced.jsp
@@ -30,13 +30,11 @@
  <input type="hidden" name="action" value="blah" />
  <h3>Advanced I2P Configuration</h3>
  <textarea rows="32" cols="60" name="config" wrap="off"><jsp:getProperty name="advancedhelper" property="settings" /></textarea><br /><hr>
-      <p align="right"> 
+      <div class="formaction"> 
         <input type="submit" name="shouldsave" value="Apply" />
-        <input type="reset" value="Cancel" />
-      </p>
-      <p>
- NOTE: Some changes may require a restart to take effect.
-</p>
+        <input type="reset" value="Cancel" /><br />
+ <b>NOTE:</b> Some changes may require a restart to take effect.
+      </div>
  </form>
 </div>
 </div>
diff --git a/apps/routerconsole/jsp/configclients.jsp b/apps/routerconsole/jsp/configclients.jsp
index 256418108b..91a2dd8cb6 100644
--- a/apps/routerconsole/jsp/configclients.jsp
+++ b/apps/routerconsole/jsp/configclients.jsp
@@ -39,10 +39,9 @@ button span.hide{
  <jsp:getProperty name="clientshelper" property="form1" />
  </p><p>
  <i>All changes require restart to take effect. To change other client options, edit the clients.config file.</i>
- </p> <hr /><p>
+ </p> <hr /><div class="formaction">
  <input type="submit" name="action" value="Save Client Configuration" />
- </p>
-<hr />
+</div>
  <h3>WebApp Configuration</h3>
  <p>
  The Java web applications listed below are started by the webConsole client and run in the same JVM as the router.
@@ -56,11 +55,13 @@ button span.hide{
  so disabling the web app here is the preferred method.
  </p><p>
  <jsp:getProperty name="clientshelper" property="form2" />
- </p><p><hr>
- <input type="submit" name="action" value="Save WebApp Configuration" />
- </p><hr><p>
+ </p>
+ <p>
  <i>All changes require restart to take effect. To change other webapp options, edit the webapps.config file.</i>
  </p>
+ <hr><div class="formaction">
+ <input type="submit" name="action" value="Save WebApp Configuration" />
+ </div>
  </form>
 </div>
 </div>
diff --git a/apps/routerconsole/jsp/configpeer.jsp b/apps/routerconsole/jsp/configpeer.jsp
index f164628079..8264a95389 100644
--- a/apps/routerconsole/jsp/configpeer.jsp
+++ b/apps/routerconsole/jsp/configpeer.jsp
@@ -41,14 +41,15 @@
  <input type="text" size="55" name="peer" value="<%=peer%>" />
  <h3>Manually Shitlist / Unshitlist a Router</h3>
  Shitlisting will prevent the participation of this peer in tunnels you create. 
-      <p> 
+      <hr />      
+      <div class="formaction"> 
         <input type="submit" name="action" value="Shitlist peer until restart" />
         <input type="submit" name="action" value="Unshitlist peer" />
         <% if (! "".equals(peer)) { %>
-        <font color="blue">&lt;---- click to verify action</font> 
+        <!-- <font color="blue">&lt;---- click to verify action</font> -->
         <% } %>
-      </p>
-      <hr />
+      </div>
+
  <h3>Adjust Profile Bonuses</h3>
  Bonuses may be positive or negative, and affect the peer's inclusion in Fast 
       and High Capacity tiers. Fast peers are used for client tunnels, and High 
@@ -59,7 +60,8 @@
     if (! "".equals(peer)) {
         // get existing bonus values?
     }
- %>
+ %> 
+ <hr />
  Speed:
  <input type="text" size="8" name="speed" value="<%=speed%>" />
  Capacity:
@@ -68,7 +70,6 @@
  </p>
  </form>
 
- <hr />
  <a name="shitlist"> </a>
  <jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" />
  <jsp:setProperty name="profilesHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
diff --git a/apps/routerconsole/jsp/configservice.jsp b/apps/routerconsole/jsp/configservice.jsp
index 8ca0087c70..942aedf0d0 100644
--- a/apps/routerconsole/jsp/configservice.jsp
+++ b/apps/routerconsole/jsp/configservice.jsp
@@ -26,11 +26,11 @@
  <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
  router immediately, that option is available as well.</p>
- 
+  <hr><div class="formaction">
  <input type="submit" name="action" value="Shutdown gracefully" />
  <input type="submit" name="action" value="Shutdown immediately" />
  <input type="submit" name="action" value="Cancel graceful shutdown" />
- <hr>
+ </div>
  <% if (System.getProperty("wrapper.version") != null) { %>
  <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
@@ -38,30 +38,32 @@
  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
  the router, it will wait 1 minute before starting back up again.</p>
- 
+ <hr><div class="formaction">
  <input type="submit" name="action" value="Graceful restart" />
  <input type="submit" name="action" value="Hard restart" />
- <% } %>
- <hr>
+ <% } %></div>
+
  <% if ( (System.getProperty("os.name") != null) && (System.getProperty("os.name").startsWith("Win")) ) { %>
  <h3>Systray integration</h3>
  <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
  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>
+ <hr><div class="formaction">
  <input type="submit" name="action" value="Show systray icon" />
  <input type="submit" name="action" value="Hide systray icon" />
- <hr>
+</div>
  <h3>Run on startup</h3>
  <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
  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>
+ <hr><div class="formaction">
  <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" /></div>
  <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
- above, then running uninstall_i2p_service_winnt.bat.</p><hr>
+ above, then running uninstall_i2p_service_winnt.bat.</p>
  <% } %>
 
  <% if (System.getProperty("wrapper.version") != null) { %>
@@ -69,17 +71,19 @@
  <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 
  <a href="logs.jsp#servicelogs">wrapper.log</a>.</p>
+  <hr><div class="formaction">
  <input type="submit" name="action" value="Dump threads" />
- <% } %><hr>
+<% } %></div>
  
  <h3>Launch browser on router startup?</h3>
  <p>I2P's main configuration interface is this web console, so for your convenience
  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
  the router starts up.</p>
+ <hr><div class="formaction">
  <input type="submit" name="action" value="View console on startup" />
  <input type="submit" name="action" value="Do not view console on startup" />
- </form><hr>
+</form></div>
 </div>
 </div>
 </body>
diff --git a/apps/routerconsole/jsp/configstats.jsp b/apps/routerconsole/jsp/configstats.jsp
index a1298d444d..cf4bd8dc4f 100644
--- a/apps/routerconsole/jsp/configstats.jsp
+++ b/apps/routerconsole/jsp/configstats.jsp
@@ -101,9 +101,7 @@ function toggleAll(category)
  <tr><td align="center"><input type="checkbox" class="optbox" name="explicitFilter" /></td>
      <td colspan="2">Advanced filter: 
      <input type="text" name="explicitFilterValue" value="<%=statshelper.getExplicitFilter()%>" size="40" /></td></tr>
- <tr><td colspan="3"></td></tr>
- <tr class="tablefooter"><td><input type="submit" name="shouldsave" value="Save changes" /> </td>
-     <td><input type="reset" value="Cancel" /></td><td></td></tr></form>
+     <tr class="tablefooter"><td colspan="3" align="right"><input type="submit" name="shouldsave" value="Save changes" /><input type="reset" value="Cancel" /></td></tr></form>
  </table>
 </div>
 </div>
diff --git a/apps/routerconsole/jsp/configtunnels.jsp b/apps/routerconsole/jsp/configtunnels.jsp
index f7c4911ba3..6782ea1164 100644
--- a/apps/routerconsole/jsp/configtunnels.jsp
+++ b/apps/routerconsole/jsp/configtunnels.jsp
@@ -42,7 +42,7 @@
  <i>Note - Exploratory tunnel setting changes are stored in the router.config file.</i></br>
  <i>Client tunnel changes are temporary and are not saved.</i><br>
  <i>To make permanent client tunnel changes see the </i><a href="i2ptunnel/index.jsp">i2ptunnel page</a>.<br>
- <hr /> <input type="submit" name="shouldsave" value="Save changes" /> <input type="reset" value="Cancel" />
+ <hr /><div class="formaction><input type="submit" name="shouldsave" value="Save changes" /> <input type="reset" value="Cancel" /></div>
  </form>
 </div>
 </div>
diff --git a/apps/routerconsole/jsp/configui.jsp b/apps/routerconsole/jsp/configui.jsp
index 3835db33b7..c8a28956a4 100644
--- a/apps/routerconsole/jsp/configui.jsp
+++ b/apps/routerconsole/jsp/configui.jsp
@@ -34,9 +34,9 @@
  <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigUIHandler.nonce")%>" />
  <input type="hidden" name="action" value="blah" />
  <jsp:getProperty name="uihelper" property="settings" />
-<hr> 	
+<hr><div class="formaction> 	
 <input type="submit" name="shouldsave" value="Apply" /> <input type="reset" value="Cancel" />
-</form>
+</form></div>
 <% } else { %>
 Theme selection disabled for Internet Explorer, sorry.<hr>If you're not using IE, it's likely that 
 your browser is pretending to be IE; please configure your browser (or proxy) to use a different User Agent string if you'd like to access the console themes.
diff --git a/apps/routerconsole/jsp/configupdate.jsp b/apps/routerconsole/jsp/configupdate.jsp
index a8cfa33cd1..80cbbf04d0 100644
--- a/apps/routerconsole/jsp/configupdate.jsp
+++ b/apps/routerconsole/jsp/configupdate.jsp
@@ -32,44 +32,40 @@
         <tr>
           <td colspan="2"></tr>
         <tr>
-          <td><b>News:</b></td>
+          <td class= "mediumtags" align="right"><b>News:</b></td>
           <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>
         <tr>
           <td colspan="2"><hr /></td>
         </tr>
         <tr>
-          <td><b>News URL:</b></td>
+          <td class= "mediumtags" align="right"><b>News URL:</b></td>
           <td><input type="text" size="60" name="newsURL" value="<jsp:getProperty name="updatehelper" property="newsURL" />"></td>
         </tr>
         <tr>
-          <td><b>Refresh frequency:</b> 
+          <td class= "mediumtags" align="right"><b>Refresh frequency:</b> 
           <td><jsp:getProperty name="updatehelper" property="refreshFrequencySelectBox" /> 
         <tr>
-          <td><b>Update policy:</b> 
+          <td class= "mediumtags" align="right"><b>Update policy:</b> 
           <td><jsp:getProperty name="updatehelper" property="updatePolicySelectBox" /> 
         <tr>
-          <td><b>Update through the eepProxy?</b> 
+          <td class= "mediumtags" align="right"><b>Update through the eepProxy?</b> 
           <td><jsp:getProperty name="updatehelper" property="updateThroughProxy" /> 
         <tr>
-          <td><b>eepProxy host:</b> 
+          <td class= "mediumtags" align="right"><b>eepProxy host:</b> 
           <td><input type="text" size="10" name="proxyHost" value="<jsp:getProperty name="updatehelper" property="proxyHost" />" /> 
         <tr>
-          <td><b>eepProxy port:</b> 
+          <td class= "mediumtags" align="right"><b>eepProxy port:</b> 
           <td><input type="text" size="4" name="proxyPort" value="<jsp:getProperty name="updatehelper" property="proxyPort" />" /> 
         <tr>
-          <td><b>Update URLs:</b> 
+          <td class= "mediumtags" align="right"><b>Update URLs:</b> 
           <td><textarea name="updateURL" wrap="off"><jsp:getProperty name="updatehelper" property="updateURL" /></textarea> 
         <tr>
-          <td><b>Trusted keys:</b> 
+          <td class= "mediumtags" align="right"><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"> 
+          <td><div class="formaction"> 
               <input type="submit" name="action" value="Save" />
               <input type="reset" value="Cancel" />
             </div>
diff --git a/installer/resources/themes/console/dark/console.css b/installer/resources/themes/console/dark/console.css
index 60bc544def..8e0d75d607 100644
--- a/installer/resources/themes/console/dark/console.css
+++ b/installer/resources/themes/console/dark/console.css
@@ -536,6 +536,11 @@ input[type=text]:active, input[type=text]:hover {
      background: #001;
 }
 
+fieldset {
+overflow: hidden;
+position: relative;
+}
+
 select {
      background: #002;
      color: #eef;
@@ -636,6 +641,8 @@ form {}
      border: 0;
      margin: 5px 5px 5px 10px;
      padding: 2px;
+overflow: hidden;
+position: relative;
 }
 
 .optbox:hover {
@@ -662,4 +669,8 @@ form {}
      border-bottom: 1px solid #99f !important;     
      font-size: 7pt;
      line-height: 110%;
+}
+
+.formaction {
+     text-align: right;
 }
\ No newline at end of file
diff --git a/installer/resources/themes/console/light/console.css b/installer/resources/themes/console/light/console.css
index b8368bebf5..d87217c981 100644
--- a/installer/resources/themes/console/light/console.css
+++ b/installer/resources/themes/console/light/console.css
@@ -716,4 +716,8 @@ form {}
      padding: 8px 2px !important;
      font-size: 7pt;
      line-height: 110%;
+}
+
+.formaction {
+     text-align: right;
 }
\ No newline at end of file
diff --git a/router/java/src/net/i2p/router/Blocklist.java b/router/java/src/net/i2p/router/Blocklist.java
index 1ce5cb5e7d..a166939b43 100644
--- a/router/java/src/net/i2p/router/Blocklist.java
+++ b/router/java/src/net/i2p/router/Blocklist.java
@@ -767,10 +767,10 @@ public class Blocklist {
             out.write("</table>");
         }
         if (_blocklistSize > 0) {
-            out.write("<table><tr><td align=center colspan=2><b>IPs from Blocklist File</b></td></tr><tr><td align=center><b>From</b></td><td align=center><b>To</b></td></tr>");
+            out.write("<table><tr><th align=center colspan=2><b>IPs from Blocklist File</b></th></tr><tr><td align=center width=50%><b>From:</b></td><td align=center width=50%><b>To:</b></td></tr>");
             for (int i = 0; i < _blocklistSize; i++) {
                  int from = getFrom(_blocklist[i]);
-                 out.write("<tr><td align=right>"); out.write(toStr(from)); out.write("</td><td align=right>");
+                 out.write("<tr><td align=center width=50%>"); out.write(toStr(from)); out.write("</td><td align=center width=50%>");
                  int to = getTo(_blocklist[i]);
                  if (to != from) {
                      out.write(toStr(to)); out.write("</td></tr>\n");
@@ -779,7 +779,7 @@ public class Blocklist {
             }
             out.write("</table>");
         } else {
-            out.write("<br>No blocklist file entries");
+            out.write("<br><i>No blocklist file entries.</i>");
         }
         out.flush();
     }
diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java
index 326d2e1101..e74d70743c 100644
--- a/router/java/src/net/i2p/router/RouterVersion.java
+++ b/router/java/src/net/i2p/router/RouterVersion.java
@@ -18,9 +18,9 @@ public class RouterVersion {
     /** deprecated */
     public final static String ID = "Monotone";
     public final static String VERSION = CoreVersion.VERSION;
-    public final static long BUILD = 02;
+    public final static long BUILD = 03;
     /** for example "-test" */
-    public final static String EXTRA = "-zed";
+    public final static String EXTRA = "";
     public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
     public static void main(String args[]) {
         System.out.println("I2P Router version: " + FULL_VERSION);
-- 
GitLab