Skip to content

Commit

Permalink
Move changesets out of summary
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Aug 20, 2023
1 parent a518033 commit 165daa1
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 66 deletions.
34 changes: 33 additions & 1 deletion core/src/main/resources/hudson/model/AbstractBuild/main.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.
-->

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:t="/lib/hudson">
<j:jelly xmlns:j="jelly:core" xmlns:t="/lib/hudson" xmlns:st="jelly:stapler" xmlns:l="/lib/layout">
<!-- upstream/downstream builds -->
<j:set var="upstream" value="${it.upstreamBuilds}" />
<j:if test="${!empty(upstream)}">
Expand Down Expand Up @@ -58,4 +58,36 @@ THE SOFTWARE.
</j:forEach>
</ul>
</j:if>

<st:include page="changesets.jelly" class="jenkins.scm.RunWithSCM" />

<!-- dependency changes -->
<j:set var="depChanges" value="${it.getDependencyChanges(it.previousBuild)}"/>
<j:if test="${!empty(depChanges)}">
${%Changes in dependency}
<ol>
<j:forEach var="dep" items="${depChanges.values()}">
<li>
<a href="${rootURL}/${dep.project.url}" class="model-link">${dep.project.displayName}</a>
<st:nbsp/>
<j:choose>
<j:when test="${dep.from!=null}">
<a href="${rootURL}/${dep.from.url}" class="model-link inside">
<l:icon class="${dep.from.buildStatusIconClassName} icon-sm" alt="${dep.from.iconColor.description}"/>${dep.from.displayName}</a>
</j:when>
<j:otherwise>
?
</j:otherwise>
</j:choose>

&#x2192; <!-- right arrow -->

<a href="${rootURL}/${dep.to.url}" class="model-link inside">
<l:icon class="${dep.to.buildStatusIconClassName} icon-sm" alt="${dep.to.iconColor.description}" />${dep.to.displayName}</a>

(<a href="${rootURL}/${dep.project.url}changes?from=${dep.fromId}&amp;to=${dep.toId}">${%detail}</a>)
</li>
</j:forEach>
</ol>
</j:if>
</j:jelly>
59 changes: 0 additions & 59 deletions core/src/main/resources/hudson/model/AbstractBuild/summary.jelly

This file was deleted.

2 changes: 1 addition & 1 deletion core/src/main/resources/hudson/model/Run/index.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ THE SOFTWARE.
<t:editableDescription permission="${it.UPDATE}" />
</div>

<table style="margin-top: 1em; margin-left:1em;">
<table>
<t:artifactList build="${it}" caption="${%Build Artifacts}"
permission="${it.ARTIFACTS}" />

Expand Down
12 changes: 7 additions & 5 deletions core/src/main/resources/jenkins/scm/RunWithSCM/changesets.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:t="/lib/hudson">
<j:set var="changeSets" value="${it.changeSets}"/>
<j:if test="${!changeSets.isEmpty()}">
<t:summary icon="symbol-changes">
<j:forEach var="changeSet" items="${changeSets}">
<st:include it="${changeSet}" page="digest.jelly"/>
</j:forEach>
</t:summary>
<table>
<t:summary icon="symbol-changes">
<j:forEach var="changeSet" items="${changeSets}">
<st:include it="${changeSet}" page="digest.jelly"/>
</j:forEach>
</t:summary>
</table>
</j:if>
</j:jelly>

0 comments on commit 165daa1

Please sign in to comment.