Skip to content

Commit

Permalink
[JENKINS-27414] Don't offer to restart if unsupported
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-beck committed Mar 13, 2015
1 parent 8d9329e commit 12e55e4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
15 changes: 11 additions & 4 deletions core/src/main/resources/jenkins/model/Jenkins/_restart.jelly
Expand Up @@ -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>
15 changes: 11 additions & 4 deletions core/src/main/resources/jenkins/model/Jenkins/_safeRestart.jelly
Expand Up @@ -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>

0 comments on commit 12e55e4

Please sign in to comment.