Ongoing UI enhancements; peers.jsp gets some love.

This commit is contained in:
z3d
2009-07-30 23:10:48 +00:00
parent 6e7ad3ecdb
commit 4de0b73cd8
17 changed files with 192 additions and 170 deletions

View File

@ -14,7 +14,7 @@ public class ConfigClientsHelper extends HelperBase {
public String getForm1() {
StringBuilder buf = new StringBuilder(1024);
buf.append("<table border=\"1\">\n");
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");
List clients = ClientAppConfig.getClientApps(_context);
@ -30,7 +30,7 @@ public class ConfigClientsHelper extends HelperBase {
public String getForm2() {
StringBuilder buf = new StringBuilder(1024);
buf.append("<table border=\"1\">\n");
buf.append("<table>\n");
buf.append("<tr><th>WebApp</th><th>Run at Startup?</th><th>Start Now</th><th>Description</th></tr>\n");
Properties props = RouterConsoleRunner.webAppProperties();
Set keys = new TreeSet(props.keySet());
@ -56,7 +56,7 @@ public class ConfigClientsHelper extends HelperBase {
} else {
buf.append(name);
}
buf.append("</td><td align=\"center\"><input type=\"checkbox\" name=\"").append(index).append(".enabled\" value=\"true\" ");
buf.append("</td><td align=\"center\"><input type=\"checkbox\" class=\"optbox\" name=\"").append(index).append(".enabled\" value=\"true\" ");
if (enabled) {
buf.append("checked=\"true\" ");
if (ro)

View File

@ -9,7 +9,7 @@ public class ConfigUIHelper extends HelperBase {
StringBuilder buf = new StringBuilder(512);
String current = _context.getProperty(CSSHelper.PROP_THEME_NAME, CSSHelper.DEFAULT_THEME);
for (String theme : themes) {
buf.append("<input type=\"radio\" name=\"theme\" ");
buf.append("<input type=\"radio\" class=\"optbox\" name=\"theme\" ");
if (theme.equals(current))
buf.append("checked=\"true\" ");
buf.append("value=\"").append(theme).append("\"/>").append(theme).append("<br />\n");

View File

@ -42,10 +42,10 @@ public class ConfigUpdateHelper extends HelperBase {
public String getUpdateThroughProxy() {
String proxy = _context.getProperty(ConfigUpdateHandler.PROP_SHOULD_PROXY, ConfigUpdateHandler.DEFAULT_SHOULD_PROXY);
if (Boolean.valueOf(proxy).booleanValue())
return "<input type=\"checkbox\" value=\"true\" name=\"updateThroughProxy\" checked=\"true\" >";
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateThroughProxy\" checked=\"true\" >";
else
return "<input type=\"checkbox\" value=\"true\" name=\"updateThroughProxy\" >";
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateThroughProxy\" >";
}
private static final long PERIODS[] = new long[] { 12*60*60*1000l, 24*60*60*1000l, 48*60*60*1000l, -1l };

View File

@ -109,8 +109,8 @@ public class GraphHelper extends HelperBase {
_out.write("<p />[<a href=\"configstats.jsp\">Select Stats to Graph</a>]<p />");
_out.write("<form action=\"graphs.jsp\" method=\"GET\">");
_out.write("Periods: <input size=\"3\" type=\"text\" name=\"periodCount\" value=\"" + _periodCount + "\" /><br />\n");
_out.write("Plot averages: <input type=\"radio\" name=\"showEvents\" value=\"false\" " + (_showEvents ? "" : "checked=\"true\" ") + " /> ");
_out.write("or plot events: <input type=\"radio\" name=\"showEvents\" value=\"true\" "+ (_showEvents ? "checked=\"true\" " : "") + " /><br />\n");
_out.write("Plot averages: <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"false\" " + (_showEvents ? "" : "checked=\"true\" ") + " /> ");
_out.write("or plot events: <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"true\" "+ (_showEvents ? "checked=\"true\" " : "") + " /><br />\n");
_out.write("Image sizes: width: <input size=\"4\" type=\"text\" name=\"width\" value=\"" + _width
+ "\" /> pixels, height: <input size=\"4\" type=\"text\" name=\"height\" value=\"" + _height
+ "\" /><br />\n");