I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 3a7ee4f2 authored by zzz's avatar zzz
Browse files

Console: Move restart status up in summary bar

Process restart status first regardless of display order
parent cc3c2d4d
No related branches found
No related tags found
No related merge requests found
......@@ -77,17 +77,13 @@ class SummaryBarRenderer {
String requestURI = _helper.getRequestURI();
String page = requestURI.replace("/", "").replace(".jsp", "");
List<String> sections = _helper.getSummaryBarSections(page);
StringBuilder buf = new StringBuilder(8*1024);
// regardless of section order, we want to process the restart buttons first,
// so other sections reflect the current restart state
String restartStatus = sections.contains("RestartStatus") ? renderRestartStatusHTML() : null;
StringBuilder buf = new StringBuilder(1024);
for (String section : sections) {
// Commented out because broken. Replaced by if-elseif blob below.
/*try {
String section = (String)ALL_SECTIONS.get(sections[i]).invoke(this);
if (section != null && section != "") {
out.write("<hr>" + i + "<hr>\n" + section);
}
} catch (Exception e) {
out.write("<hr>" +i + " - Exception<hr>\n" + e);
}*/
buf.setLength(0);
buf.append("<hr>\n");
......@@ -112,7 +108,7 @@ class SummaryBarRenderer {
else if ("UpdateStatus".equals(section))
buf.append(renderUpdateStatusHTML());
else if ("RestartStatus".equals(section))
buf.append(renderRestartStatusHTML());
buf.append(restartStatus); // prerendered above
else if ("Peers".equals(section))
buf.append(renderPeersHTML());
else if ("PeersAdvanced".equals(section))
......
......@@ -59,9 +59,9 @@ public class SummaryHelper extends HelperBase {
"I2PInternals" + S +
"HelpAndFAQ" + S +
"Peers" + S +
"RestartStatus" + S +
"Tunnels" + S +
"TunnelStatus" + S +
"RestartStatus" + S +
"Destinations" + S +
"";
......@@ -76,10 +76,10 @@ public class SummaryHelper extends HelperBase {
"I2PInternals" + S +
"Advanced" + S +
"Peers" + S +
"RestartStatus" + S +
"Tunnels" + S +
"TunnelStatus" + S +
"Congestion" + S +
"RestartStatus" + S +
"Destinations" + S +
"";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment