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

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

* Console: More IE button fixes, try harder to not 404 the iframe

parent 7d91bdba
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,9 @@ ...@@ -16,7 +16,9 @@
// try hard to avoid an error page in the iframe after shutdown // try hard to avoid an error page in the iframe after shutdown
String action = request.getParameter("action"); String action = request.getParameter("action");
String d = request.getParameter("refresh"); String d = request.getParameter("refresh");
boolean shutdownSoon = "shutdownImmediate".equals(action) || "restartImmediate".equals(action); // Normal browsers send value, IE sends button label
boolean shutdownSoon = "shutdownImmediate".equals(action) || "restartImmediate".equals(action) ||
"Shutdown immediately".equals(action) || "Restart immediately".equals(action);
if (!shutdownSoon) { if (!shutdownSoon) {
if (d == null || "".equals(d)) { if (d == null || "".equals(d)) {
d = System.getProperty("routerconsole.summaryRefresh"); d = System.getProperty("routerconsole.summaryRefresh");
...@@ -30,6 +32,14 @@ ...@@ -30,6 +32,14 @@
if (!"0".equals(d)) { if (!"0".equals(d)) {
// doesn't work for restart or shutdown with no expl. tunnels, // doesn't work for restart or shutdown with no expl. tunnels,
// since the call to ConfigRestartBean.renderStatus() hasn't happened yet... // since the call to ConfigRestartBean.renderStatus() hasn't happened yet...
// So we delay slightly
if ("restart".equalsIgnoreCase(action) || "shutdown".equalsIgnoreCase(action)) {
synchronized(this) {
try {
wait(1000);
} catch(InterruptedException ie) {}
}
}
long timeleft = net.i2p.router.web.ConfigRestartBean.getRestartTimeRemaining(); long timeleft = net.i2p.router.web.ConfigRestartBean.getRestartTimeRemaining();
long delay = 60; long delay = 60;
try { delay = Long.parseLong(d); } catch (NumberFormatException nfe) {} try { delay = Long.parseLong(d); } catch (NumberFormatException nfe) {}
......
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