remove restart button if no wrapper

This commit is contained in:
zzz
2008-12-02 19:07:58 +00:00
parent 8c9ac941bf
commit 13d4ccf2e7
2 changed files with 12 additions and 6 deletions

View File

@ -59,8 +59,12 @@ public class ConfigRestartBean {
+ "<a href=\"" + urlBase + "?consoleNonce=" + systemNonce + "&amp;action=cancelShutdown\">Cancel restart</a> "; + "<a href=\"" + urlBase + "?consoleNonce=" + systemNonce + "&amp;action=cancelShutdown\">Cancel restart</a> ";
} }
} else { } else {
return "<a href=\"" + urlBase + "?consoleNonce=" + systemNonce + "&amp;action=restart\" title=\"Graceful restart\">Restart</a> " String shutdown = "<a href=\"" + urlBase + "?consoleNonce=" + systemNonce + "&amp;action=shutdown\" title=\"Graceful shutdown\">Shutdown</a>";
+ "<a href=\"" + urlBase + "?consoleNonce=" + systemNonce + "&amp;action=shutdown\" title=\"Graceful shutdown\">Shutdown</a>"; if (System.getProperty("wrapper.version") != null)
return "<a href=\"" + urlBase + "?consoleNonce=" + systemNonce + "&amp;action=restart\" title=\"Graceful restart\">Restart</a> "
+ shutdown;
else
return shutdown;
} }
} }

View File

@ -107,10 +107,12 @@ public class ConfigUpdateHelper {
else else
buf.append("<option value=\"download\">Download and verify only</option>"); buf.append("<option value=\"download\">Download and verify only</option>");
if ("install".equals(policy)) if (_context.getProperty("wrapper.version") != null) {
buf.append("<option value=\"install\" selected=\"true\">Download, verify, and restart</option>"); if ("install".equals(policy))
else buf.append("<option value=\"install\" selected=\"true\">Download, verify, and restart</option>");
buf.append("<option value=\"install\">Download, verify, and restart</option>"); else
buf.append("<option value=\"install\">Download, verify, and restart</option>");
}
buf.append("</select>\n"); buf.append("</select>\n");
return buf.toString(); return buf.toString();