Merge pull request #1604 from daniel-beck/JENKINS-27414

[JENKINS-27414] Don't offer to restart if unsupported
This commit is contained in:
Daniel Beck committed 2015-04-04 23:55:37 +02:00
commit c294ed8e93
2 files changed
+22 -8

No files matched your search

@@ -28,10 +28,17 @@ THE SOFTWARE.
<l:layout title="Restart Jenkins">
<st:include page="sidepanel.jelly" />
<l:main-panel>
<form method="post" action="restart">
${%Are you sure about restarting Jenkins?}
<f:submit value="${%Yes}" />
</form>
<j:choose>
<j:when test="${app.lifecycle.canRestart()}">
<form method="post" action="restart">
${%Are you sure about restarting Jenkins?}
<f:submit value="${%Yes}" />
</form>
</j:when>
<j:otherwise>
${%Jenkins cannot restart itself as currently configured.}
</j:otherwise>
</j:choose>
</l:main-panel>
</l:layout>
</j:jelly>
@@ -28,10 +28,17 @@ THE SOFTWARE.
<l:layout title="Safely Restart Jenkins">
<st:include page="sidepanel.jelly" />
<l:main-panel>
<form method="post" action="safeRestart">
${%Are you sure about restarting Jenkins? Jenkins will restart once all running jobs are finished.}
<f:submit value="${%Yes}" />
</form>
<j:choose>
<j:when test="${app.lifecycle.canRestart()}">
<form method="post" action="safeRestart">
${%Are you sure about restarting Jenkins? Jenkins will restart once all running jobs are finished.}
<f:submit value="${%Yes}" />
</form>
</j:when>
<j:otherwise>
${%Jenkins cannot restart itself as currently configured.}
</j:otherwise>
</j:choose>
</l:main-panel>
</l:layout>
</j:jelly>