Skip to content

Commit

Permalink
Don't allow power changes during power changes!
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Oct 20, 2023
1 parent ca00d67 commit 62370cc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ limitations under the License.
<c:when test="${ not empty job.boards }">
<form method="POST" action="${ powerUri }">
<sec:csrfInput />
<input type="hidden" name="power" value="${ !job.powered }" />
${ job.powered ? 'on' : 'off' } <input type="submit" value="Toggle Power" />
<c:when test="${ job.state == 'READY'}">
<input type="hidden" name="power" value="${ !job.powered }" />
${ job.powered ? 'on' : 'off' } <input type="submit" value="Toggle Power" />
</c:when>
</form>
</c:when>
<c:otherwise>Not currently allocated</c:otherwise>
Expand Down

0 comments on commit 62370cc

Please sign in to comment.