More UI layout enhancements to the config pages.
This commit is contained in:
@ -55,7 +55,7 @@ public class ConfigClientsHandler extends FormHandler {
|
||||
else
|
||||
startWebApp(app);
|
||||
} else {
|
||||
addFormError("Unsupported " + _action);
|
||||
addFormError("Unsupported " + _action + ".");
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,18 +70,18 @@ public class ConfigClientsHandler extends FormHandler {
|
||||
ca.disabled = val == null;
|
||||
}
|
||||
ClientAppConfig.writeClientAppConfig(_context, clients);
|
||||
addFormNotice("Client configuration saved successfully - restart required to take effect");
|
||||
addFormNotice("Client configuration saved successfully - restart required to take effect.");
|
||||
}
|
||||
|
||||
private void startClient(int i) {
|
||||
List clients = ClientAppConfig.getClientApps(_context);
|
||||
if (i >= clients.size()) {
|
||||
addFormError("Bad client index");
|
||||
addFormError("Bad client index.");
|
||||
return;
|
||||
}
|
||||
ClientAppConfig ca = (ClientAppConfig) clients.get(i);
|
||||
LoadClientAppsJob.runClient(ca.className, ca.clientName, LoadClientAppsJob.parseArgs(ca.args), _log);
|
||||
addFormNotice("Client " + ca.clientName + " started");
|
||||
addFormNotice("Client " + ca.clientName + " started.");
|
||||
}
|
||||
|
||||
private void saveWebAppChanges() {
|
||||
@ -98,7 +98,7 @@ public class ConfigClientsHandler extends FormHandler {
|
||||
props.setProperty(name, "" + (val != null));
|
||||
}
|
||||
RouterConsoleRunner.storeWebAppProperties(props);
|
||||
addFormNotice("WebApp configuration saved successfully - restart required to take effect");
|
||||
addFormNotice("WebApp configuration saved successfully - restart required to take effect.");
|
||||
}
|
||||
|
||||
// Big hack for the moment, not using properties for directory and port
|
||||
@ -116,14 +116,14 @@ public class ConfigClientsHandler extends FormHandler {
|
||||
path = new File(path, app + ".war");
|
||||
s.addWebApplication("/"+ app, path.getAbsolutePath()).start();
|
||||
// no passwords... initialize(wac);
|
||||
addFormNotice("WebApp <a href=\"/" + app + "/\">" + app + "</a> started");
|
||||
addFormNotice("WebApp <a href=\"/" + app + "/\">" + app + "</a> started.");
|
||||
} catch (Exception ioe) {
|
||||
addFormError("Failed to start " + app + " " + ioe);
|
||||
addFormError("Failed to start " + app + " " + ioe + ".");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
addFormError("Failed to find server");
|
||||
addFormError("Failed to find server.");
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ public class ConfigClientsHelper extends HelperBase {
|
||||
public String getForm1() {
|
||||
StringBuilder buf = new StringBuilder(1024);
|
||||
buf.append("<table>\n");
|
||||
buf.append("<tr><th>Client</th><th>Run at Startup?</th><th>Start Now</th><th>Class and arguments</th></tr>\n");
|
||||
buf.append("<tr><th align=\"right\">Client</th><th>Run at Startup?</th><th>Start Now</th><th align=\"left\">Class and arguments</th></tr>\n");
|
||||
|
||||
List clients = ClientAppConfig.getClientApps(_context);
|
||||
for (int cur = 0; cur < clients.size(); cur++) {
|
||||
@ -31,7 +31,7 @@ public class ConfigClientsHelper extends HelperBase {
|
||||
public String getForm2() {
|
||||
StringBuilder buf = new StringBuilder(1024);
|
||||
buf.append("<table>\n");
|
||||
buf.append("<tr><th>WebApp</th><th>Run at Startup?</th><th>Start Now</th><th>Description</th></tr>\n");
|
||||
buf.append("<tr><th align=\"right\">WebApp</th><th>Run at Startup?</th><th>Start Now</th><th align=\"left\">Description</th></tr>\n");
|
||||
Properties props = RouterConsoleRunner.webAppProperties();
|
||||
Set keys = new TreeSet(props.keySet());
|
||||
for (Iterator iter = keys.iterator(); iter.hasNext(); ) {
|
||||
@ -47,7 +47,7 @@ public class ConfigClientsHelper extends HelperBase {
|
||||
}
|
||||
|
||||
private void renderForm(StringBuilder buf, String index, String name, boolean urlify, boolean enabled, boolean ro, String desc) {
|
||||
buf.append("<tr><td>");
|
||||
buf.append("<tr><td class=\"mediumtags\" align=\"right\" width=\"25%\">");
|
||||
if (urlify && enabled) {
|
||||
String link = "/";
|
||||
if (! RouterConsoleRunner.ROUTERCONSOLE.equals(name))
|
||||
@ -56,16 +56,16 @@ public class ConfigClientsHelper extends HelperBase {
|
||||
} else {
|
||||
buf.append(name);
|
||||
}
|
||||
buf.append("</td><td align=\"center\"><input type=\"checkbox\" class=\"optbox\" name=\"").append(index).append(".enabled\" value=\"true\" ");
|
||||
buf.append("</td><td align=\"center\" width=\"10%\"><input type=\"checkbox\" class=\"optbox\" name=\"").append(index).append(".enabled\" value=\"true\" ");
|
||||
if (enabled) {
|
||||
buf.append("checked=\"true\" ");
|
||||
if (ro)
|
||||
buf.append("disabled=\"true\" ");
|
||||
}
|
||||
buf.append("/></td><td> ");
|
||||
buf.append("/></td><td align=\"center\" width=\"15%\">");
|
||||
if (!enabled) {
|
||||
buf.append("<button type=\"submit\" name=\"action\" value=\"Start ").append(index).append("\" >Start<span class=hide> ").append(index).append("</span></button>");
|
||||
}
|
||||
buf.append(" </td><td>").append(desc).append("</td></tr>\n");
|
||||
buf.append("</td><td align=\"left\" width=\"50%\">").append(desc).append("</td></tr>\n");
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ package net.i2p.router.web;
|
||||
public class ConfigUIHelper extends HelperBase {
|
||||
public ConfigUIHelper() {}
|
||||
|
||||
private static final String themes[] = {"classic", "dark", "light"};
|
||||
private static final String themes[] = {"Classic", "Dark", "Light"};
|
||||
|
||||
public String getSettings() {
|
||||
StringBuilder buf = new StringBuilder(512);
|
||||
|
@ -42,16 +42,15 @@
|
||||
<p>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Dest. name, hash, or full key:
|
||||
<td><textarea name="peer" cols="44" rows="1" style="height: 3em;" wrap="off"></textarea>
|
||||
<td class="mediumtags" align="right">Dest. name, hash, or full key:</td>
|
||||
<td><textarea name="peer" cols="44" rows="1" style="height: 3em;" wrap="off"></textarea></td>
|
||||
<tr>
|
||||
<td align="right">Session Key:
|
||||
<td><input type="text" size="55" name="key" />
|
||||
<td class="mediumtags" align="right">Session Key:</td>
|
||||
<td><input type="text" size="55" name="key" /></td>
|
||||
<tr>
|
||||
<td>
|
||||
<td><div align="right">
|
||||
<input type="submit" name="action" value="Add key" />
|
||||
</div>
|
||||
<td align="right">
|
||||
<input type="submit" name="action" value="Add key" /></td>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
|
@ -28,32 +28,32 @@
|
||||
<h3>Configure I2P Logging Options</h3>
|
||||
<table border="0" cellspacing="5">
|
||||
<tr>
|
||||
<td valign="top"><b>Logging filename:</b>
|
||||
<td class="mediumtags" align="right"><b>Logging filename:</b>
|
||||
<td><input type="text" name="logfilename" size="40" value="<jsp:getProperty name="logginghelper" property="logFilePattern" />" />
|
||||
<br /> <i>(the symbol '@' will be replaced during log rotation)</i>
|
||||
<tr>
|
||||
<td valign="top"><b>Log record format:</b>
|
||||
<td class="mediumtags" align="right"><b>Log record format:</b>
|
||||
<td><input type="text" name="logformat" size="20" value="<jsp:getProperty name="logginghelper" property="recordPattern" />" />
|
||||
<br /> <i>(use 'd' = date, 'c' = class, 't' = thread, 'p' = priority,
|
||||
'm' = message)</i>
|
||||
<tr>
|
||||
<td valign="top"><b>Log date format:</b>
|
||||
<td class="mediumtags" align="right"><b>Log date format:</b>
|
||||
<td><input type="text" name="logdateformat" size="20" value="<jsp:getProperty name="logginghelper" property="datePattern" />" />
|
||||
<br /> <i>('MM' = month, 'dd' = day, 'HH' = hour, 'mm' = minute, 'ss'
|
||||
= second, 'SSS' = millisecond)</i>
|
||||
<tr>
|
||||
<td valign="top"><b>Max log file size:</b>
|
||||
<td class="mediumtags" align="right"><b>Max log file size:</b>
|
||||
<td><input type="text" name="logfilesize" size="4" value="<jsp:getProperty name="logginghelper" property="maxFileSize" />" />
|
||||
<br />
|
||||
<tr>
|
||||
<td valign="top"><b>Default log level:</b>
|
||||
<td class="mediumtags" align="right"><b>Default log level:</b>
|
||||
<td><jsp:getProperty name="logginghelper" property="defaultLogLevelBox" /> <br /> <i>(DEBUG and INFO are not recommended defaults,
|
||||
as they will drastically slow down your router)</i>
|
||||
<tr>
|
||||
<td valign="top"><b>Log level overrides:</b>
|
||||
<td class="mediumtags" align="right"><b>Log level overrides:</b>
|
||||
<td><jsp:getProperty name="logginghelper" property="logLevelTable" />
|
||||
<tr>
|
||||
<td colspan="2" valign="top"><hr>
|
||||
<td colspan="2"><hr>
|
||||
<tr>
|
||||
<td>
|
||||
<td> <div align="right">
|
||||
|
@ -37,7 +37,7 @@
|
||||
<a name="unsh"> </a>
|
||||
<a name="bonus"> </a>
|
||||
<h2>Manual Peer Controls</h2>
|
||||
Router Hash:
|
||||
<div class="mediumtags">Router Hash:</div>
|
||||
<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.
|
||||
@ -62,9 +62,9 @@
|
||||
}
|
||||
%>
|
||||
<hr />
|
||||
Speed:
|
||||
<div class="mediumtags">Speed:</div>
|
||||
<input type="text" size="8" name="speed" value="<%=speed%>" />
|
||||
Capacity:
|
||||
<div class="mediumtags">Capacity:</div>
|
||||
<input type="text" size="8" name="capacity" value="<%=capacity%>" />
|
||||
<input type="submit" name="action" value="Adjust peer bonuses" />
|
||||
</p>
|
||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 03;
|
||||
public final static long BUILD = 04;
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
||||
|
Reference in New Issue
Block a user