提交 e334b330 编写于 作者: K kohsuke

[FIXED HUDSON-2925] show the status of executors on the computer page.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14829 71c3de6d-444a-0410-be80-ed276b4c234a
上级 b7d3308b
......@@ -989,6 +989,10 @@ public class Functions {
|| (href.equals(".") && url.endsWith("."));
}
public <T> List<T> singletonList(T t) {
return Collections.singletonList(t);
}
/**
* Gets all the {@link PageDecorator}s.
*/
......
<!--
Used to asynchronously update executor queue
-->
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:s="/lib/form">
<l:ajax>
<t:executors computers="${h.singletonList(it)}" />
</l:ajax>
</j:jelly>
\ No newline at end of file
......@@ -14,5 +14,6 @@
<l:task icon="images/24x24/terminal.gif" href="script" title="${%Script Console}" permission="${app.ADMINISTER}" />
<st:include page="sidepanel2.jelly" optional="true" /><!-- hook for derived class to add more items -->
</l:tasks>
<t:executors computers="${h.singletonList(it)}" />
</l:side-panel>
</j:jelly>
<!--
displays the status of executors.
-->
<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">
<st:documentation>
Displays the status of executors.
<st:attribute name="computers">
If specified, this is the list of computers whose executors are rendered. If omitted, all the computers
in the system will be rendered.
</st:attribute>
</st:documentation>
<j:set var="computers" value="${h.ifThenElse(attrs.computers!=null, attrs.computers, app.computers)}" />
<l:pane title="&lt;a href='${rootURL}/computer/'>${%Build Executor Status}&lt;/a>" width="3" id="executors">
<j:forEach var="c" items="${app.computers}" varStatus="cloop">
<j:forEach var="c" items="${computers}" varStatus="cloop">
<j:choose>
<j:when test="${c.node==app}">
<j:when test="${c.node==app or computers.size()==1}">
<tr>
<th class="pane">No.</th>
<th class="pane">
<j:choose>
<j:when test="${empty(app.slaves)}">
<j:when test="${empty(app.slaves) or computers.size()==1}">
${%Status}
</j:when>
<j:otherwise>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册