提交 5ce25186 编写于 作者: M mindless

An aggregator style build doesn't necessarily have only 1 build per module,

contrary to comment in this jelly.. you can trigger a build of an individual
module from hudson UI.  Refactor this jelly to use the current style most
of the time, and the multi-build style whenever needed.
This will help those affected by HUDSON-6779 as the orphaned builds will
now be visible on the build page, so you can click on and then delete them.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@32410 71c3de6d-444a-0410-be80-ed276b4c234a
上级 67a3c8a5
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe
Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......@@ -21,59 +21,47 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
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">
<h2>${%Module Builds}</h2>
<j:choose>
<!-- there's 1:1 relationship between modules and the module set -->
<j:when test="${it.project.aggregatorStyleBuild}">
<j:forEach var="m" items="${it.project.modules}">
<div>
<j:set var="mb" value="${m.getBuildByNumber(it.number)}"/>
<j:choose>
<j:when test="${mb!=null}">
<a href="${m.shortUrl}">
<img src="${imagesURL}/16x16/${mb.buildStatusUrl}"
alt="${mb.iconColor.description}"/>
<table>
<j:forEach var="m" items="${it.moduleBuilds}">
<tr>
<j:choose>
<j:when test="${m.value.size()==0}">
<td class="no-wrap">
<img src="${imagesURL}/16x16/grey.gif" alt=""/>
<st:nbsp/>${m.key.displayName} (${%noRun})
</td><td>
</td>
</j:when>
<j:when test="${m.value.size()==1 and m.value.get(0).number==it.number}">
<td class="no-wrap">
<a href="${m.key.shortUrl}">
<img src="${imagesURL}/16x16/${m.value.get(0).buildStatusUrl}"
alt="${m.value.get(0).iconColor.description}"/>
</a>
<st:nbsp/>
<a href="${m.shortUrl}">
${m.displayName}
<a href="${m.key.shortUrl}">
${m.key.displayName}
</a>
</j:when>
<j:otherwise><!-- module build non-existent, so no link -->
<img src="${imagesURL}/16x16/grey.gif" alt=""/>
</td><td>
</td>
</j:when>
<j:otherwise>
<!-- there are multiple builds for this module, so use a different format -->
<td class="no-wrap">
<img src="${imagesURL}/16x16/empty.gif" alt=""/>
<st:nbsp/>
${m.displayName} (didn't run)
</j:otherwise>
</j:choose>
</div>
</j:forEach>
</j:when>
<!-- there might be multiple module builds for this job, so use a different format -->
<j:otherwise>
<j:set var="builds" value="${it.moduleBuilds}" />
<table>
<j:forEach var="m" items="${builds}">
<tr>
<td style="white-space:nowrap;">
<a href="${rootURL}/${m.key.url}">${m.key.displayName}</a>
</td><td>
<j:forEach var="b" items="${m.value}">
<t:buildLink job="${m.key}" number="${b.number}" />
</j:forEach>
</td>
<td>
<j:choose>
<j:when test="${empty(m.value)}">
(none)
</j:when>
<j:otherwise>
<j:forEach var="b" items="${m.value}">
<t:buildLink job="${m.key}" number="${b.number}" />
</j:forEach>
</j:otherwise>
</j:choose>
</td>
</tr>
</j:forEach>
</table>
</j:otherwise>
</j:choose>
</j:jelly>
\ No newline at end of file
</j:otherwise>
</j:choose>
</tr>
</j:forEach>
</table>
</j:jelly>
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc., Alan Harder
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
noRun=didn''t run
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册