Tidy up jobs.jsp a little and other to various ui elements.
This commit is contained in:
@ -608,29 +608,29 @@ public class JobQueue {
|
||||
|
||||
StringBuilder buf = new StringBuilder(32*1024);
|
||||
buf.append("<h2>JobQueue</h2>");
|
||||
buf.append("# runners: ").append(numRunners).append(" [states=");
|
||||
buf.append("<b><div class=\"joblog\"># runners: ").append(numRunners).append(" [states=");
|
||||
if (states != null)
|
||||
for (int i = 0; i < states.length; i++)
|
||||
buf.append(states[i]).append(" ");
|
||||
buf.append("]<br />\n");
|
||||
buf.append("]</b><br />\n");
|
||||
|
||||
long now = _context.clock().now();
|
||||
|
||||
buf.append("# active jobs: ").append(activeJobs.size()).append("<ol>\n");
|
||||
buf.append("<hr><b># active jobs: ").append(activeJobs.size()).append("</b><ol>\n");
|
||||
for (int i = 0; i < activeJobs.size(); i++) {
|
||||
Job j = (Job)activeJobs.get(i);
|
||||
buf.append("<li> [started ").append(now-j.getTiming().getStartAfter()).append("ms ago]: ");
|
||||
buf.append(j.toString()).append("</li>\n");
|
||||
}
|
||||
buf.append("</ol>\n");
|
||||
buf.append("# just finished jobs: ").append(justFinishedJobs.size()).append("<ol>\n");
|
||||
buf.append("<hr><b># just finished jobs: ").append(justFinishedJobs.size()).append("</b><ol>\n");
|
||||
for (int i = 0; i < justFinishedJobs.size(); i++) {
|
||||
Job j = (Job)justFinishedJobs.get(i);
|
||||
buf.append("<li> [finished ").append(now-j.getTiming().getActualEnd()).append("ms ago]: ");
|
||||
buf.append(j.toString()).append("</li>\n");
|
||||
}
|
||||
buf.append("</ol>\n");
|
||||
buf.append("# ready/waiting jobs: ").append(readyJobs.size()).append(" <i>(lots of these mean there's likely a big problem)</i><ol>\n");
|
||||
buf.append("<hr><b># ready/waiting jobs: ").append(readyJobs.size()).append(" </b><i>(lots of these mean there's likely a big problem)</i><ol>\n");
|
||||
for (int i = 0; i < readyJobs.size(); i++) {
|
||||
Job j = (Job)readyJobs.get(i);
|
||||
buf.append("<li> [waiting ");
|
||||
@ -641,7 +641,7 @@ public class JobQueue {
|
||||
buf.append("</ol>\n");
|
||||
out.flush();
|
||||
|
||||
buf.append("# timed jobs: ").append(timedJobs.size()).append("<ol>\n");
|
||||
buf.append("<hr><b># timed jobs: ").append(timedJobs.size()).append("</b><ol>\n");
|
||||
TreeMap ordered = new TreeMap();
|
||||
for (int i = 0; i < timedJobs.size(); i++) {
|
||||
Job j = (Job)timedJobs.get(i);
|
||||
@ -653,7 +653,7 @@ public class JobQueue {
|
||||
buf.append("<li>").append(j.getName()).append(" in ");
|
||||
buf.append(DataHelper.formatDuration(time)).append("</li>\n");
|
||||
}
|
||||
buf.append("</ol>\n");
|
||||
buf.append("</ol></div>\n");
|
||||
|
||||
out.write("<!-- jobQueue rendering: after main buffer, before stats -->\n");
|
||||
out.flush();
|
||||
|
@ -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 = 19;
|
||||
public final static long BUILD = 20;
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
||||
|
@ -494,8 +494,8 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
processed += cfg.getProcessedMessagesCount();
|
||||
}
|
||||
out.write("</table>\n");
|
||||
out.write("<center>Inactive participating tunnels: " + inactive + "<br />\n");
|
||||
out.write("Lifetime bandwidth usage: " + DataHelper.formatSize(processed*1024) + "B</center><br />\n");
|
||||
out.write("<div class=\"statusnotes\"><center><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");
|
||||
renderPeers(out);
|
||||
}
|
||||
|
||||
@ -524,7 +524,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
if (info.getLength() > maxLength)
|
||||
maxLength = info.getLength();
|
||||
}
|
||||
out.write("<table border=\"1\"><tr><th>Direction</th><th>Expiration</th><th>Usage</th><th>Gateway</th>");
|
||||
out.write("<table border=\"1\"><tr><th>In/Out</th><th>Expiry</th><th>Usage</th><th>Gateway</th>");
|
||||
if (maxLength > 3) {
|
||||
out.write("<th align=\"center\" colspan=\"" + (maxLength - 2));
|
||||
out.write("\">Participants</th>");
|
||||
@ -573,19 +573,19 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
if (in != null) {
|
||||
List pending = in.listPending();
|
||||
if (pending.size() > 0)
|
||||
out.write("<center>Build in progress: " + pending.size() + " inbound</center><br />\n");
|
||||
out.write("<div class=\"statusnotes\"><center><b>Build in progress: " + pending.size() + " inbound</b></center></div>\n");
|
||||
live += pending.size();
|
||||
}
|
||||
if (outPool != null) {
|
||||
List pending = outPool.listPending();
|
||||
if (pending.size() > 0)
|
||||
out.write("<center>Build in progress: " + pending.size() + " outbound</center><br />\n");
|
||||
out.write("<div class=\"statusnotes\"><center><b>Build in progress: " + pending.size() + " outbound</b></center></div>\n");
|
||||
live += pending.size();
|
||||
}
|
||||
if (live <= 0)
|
||||
out.write("<b><center>No tunnels, waiting for the grace period to end.</center></b><br />\n");
|
||||
out.write("<center>Lifetime bandwidth usage: " + DataHelper.formatSize(processedIn*1024) + "B in, " +
|
||||
DataHelper.formatSize(processedOut*1024) + "B out</center><br />");
|
||||
out.write("<div class=\"statusnotes\"><center>N<b>No tunnels; waiting for the grace period to end.</center></b></div>\n");
|
||||
out.write("<div class=\"statusnotes\"><center><b>Lifetime bandwidth usage: " + DataHelper.formatSize(processedIn*1024) + "<B in, " +
|
||||
DataHelper.formatSize(processedOut*1024) + "B out</b></center></div>");
|
||||
}
|
||||
|
||||
private void renderPeers(Writer out) throws IOException {
|
||||
|
Reference in New Issue
Block a user