Skip to content

Commit

Permalink
[FIX JENKINS-23041] Fix systemInfo for offline slaves
Browse files Browse the repository at this point in the history
- Don't show link in sidebar
- Make systemInfo page more robust when accessed via URL

(cherry picked from commit 19a8a5a)
  • Loading branch information
daniel-beck authored and olivergondza committed Sep 7, 2014
1 parent b49e132 commit 93f45a7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
Expand Up @@ -25,8 +25,8 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<l:task icon="images/24x24/clipboard.png" href="log" title="${%Log}" permission="${it.CONNECT}" />
<l:task icon="images/24x24/computer.png" href="systemInfo" title="${%System Information}" permission="${it.CONNECT}"/>
<j:if test="${it.channel!=null}">
<l:task icon="images/24x24/computer.png" href="systemInfo" title="${%System Information}" permission="${it.CONNECT}"/>
<l:task icon="images/24x24/edit-delete.png" href="disconnect" title="${%Disconnect}" permission="${it.DISCONNECT}"/>
</j:if>

Expand Down
Expand Up @@ -33,13 +33,29 @@ THE SOFTWARE.
<st:include page="sidepanel.jelly" />

<l:main-panel>
<l:hasPermission permission="${it.CONNECT}">
<h1>${it.oSDescription} slave, version ${it.slaveVersion}</h1>

<j:forEach var="instance" items="${it.systemInfoExtensions}">
<h1>${instance.displayName}</h1>
<st:include page="systemInfo" from="${instance}"/>
</j:forEach>
<h1>
<img src="${imagesURL}/48x48/${it.icon}" width="48" height="48" alt=""/>
${it.caption} ${%System Information}
<j:if test="${!empty(it.node.nodeDescription)}">
<span style="font-size:smaller">(${it.node.nodeDescription})</span>
</j:if>
</h1>

<l:hasPermission permission="${it.CONNECT}">
<j:choose>
<j:when test="${it.online}">
<h2>${it.oSDescription} slave, version ${it.slaveVersion}</h2>

<j:forEach var="instance" items="${it.systemInfoExtensions}">
<h1>${instance.displayName}</h1>
<st:include page="systemInfo" from="${instance}"/>
</j:forEach>
</j:when>
<j:otherwise>
${%System Information is unavailable when slave is offline.}
</j:otherwise>
</j:choose>
</l:hasPermission>
</l:main-panel>
</l:layout>
Expand Down

0 comments on commit 93f45a7

Please sign in to comment.