Skip to content

Commit 320a149

Browse files
authored
Refine Changes for the experimental Run UI (#11277)
1 parent d8f2298 commit 320a149

File tree

4 files changed

+40
-40
lines changed

4 files changed

+40
-40
lines changed

core/src/main/resources/hudson/model/AbstractBuild/changes.jelly

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,33 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2222
THE SOFTWARE.
2323
-->
2424

25-
<!--
26-
Displays the console output
27-
-->
2825
<?jelly escape-by-default='true'?>
2926
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout">
3027
<j:new className="jenkins.run.ChangesTab" var="it">
3128
<j:arg value="${it}"/>
3229
</j:new>
3330

3431
<l:run-subpage>
35-
<l:app-bar title="${it.displayName}" headingLevel="h2" />
32+
<l:app-bar title="${it.displayName}">
33+
<l:details-bar it="${it.object}" />
34+
</l:app-bar>
3635

37-
<j:set var="it" value="${it.object}" />
36+
<j:set var="changeSets" value="${it.object.changeSets}" />
3837

3938
<j:choose>
40-
<j:when test="${it.hasChangeSetComputed()}">
41-
<st:include page="index.jelly" it="${it.changeSet}" />
42-
</j:when>
43-
<j:when test="${it.building}">
44-
${%Not yet determined}
39+
<j:when test="${!empty(changeSets)}">
40+
<div class="jenkins-card">
41+
<div class="jenkins-card__content">
42+
<j:forEach var="changeSet" items="${changeSets}">
43+
<st:include page="index.jelly" it="${changeSet}" />
44+
</j:forEach>
45+
</div>
46+
</div>
4547
</j:when>
4648
<j:otherwise>
47-
${%Failed to determine} (<a href="${h.getConsoleUrl(it)}">${%log}</a>)
49+
<l:notice icon="${it.iconFileName}" title="${%Failed to determine}">
50+
<a href="${h.getConsoleUrl(it.object)}">${%log}</a>
51+
</l:notice>
4852
</j:otherwise>
4953
</j:choose>
5054
</l:run-subpage>

core/src/main/resources/hudson/model/AbstractBuild/tasks.jelly

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ THE SOFTWARE.
2929
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:p="/lib/hudson/project">
3030
<j:choose>
3131
<j:when test="${newBuildPage}">
32-
<l:task href="${buildUrl.baseUrl}/changes" icon="symbol-changes" title="${%Changes}"/>
3332
<j:choose>
3433
<j:when test="${h.hasPermission(it,it.UPDATE)}">
3534
<l:task icon="symbol-edit-note" href="${buildUrl.baseUrl}/configure" title="${%Edit Build Information}"/>

core/src/main/resources/jenkins/run/ChangesTab/widget.jelly

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,10 @@ THE SOFTWARE.
2424

2525
<?jelly escape-by-default='true'?>
2626
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:st="jelly:stapler">
27-
<l:card title="${%Changes}" expandable="changes">
28-
<j:choose>
29-
<j:when test="${it.hasChangeSetComputed()}">
30-
<st:include page="index.jelly" it="${it.changeSet}" />
31-
</j:when>
32-
<j:when test="${it.building}">
33-
${%Not yet determined}
34-
</j:when>
35-
<j:otherwise>
36-
${%Failed to determine} (<a href="${h.getConsoleUrl(it)}">${%log}</a>)
37-
</j:otherwise>
38-
</j:choose>
27+
<l:card title="${it.displayName}" expandable="${it.urlName}">
28+
<j:set var="changeSets" value="${it.object.changeSets}" />
29+
<j:forEach var="changeSet" items="${changeSets}">
30+
<st:include it="${changeSet}" page="digest.jelly" />
31+
</j:forEach>
3932
</l:card>
4033
</j:jelly>

core/src/main/resources/jenkins/scm/RunWithSCM/changesets.jelly

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,24 @@ THE SOFTWARE.
2323
-->
2424

2525
<?jelly escape-by-default='true'?>
26-
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:t="/lib/hudson">
27-
<j:set var="changeSets" value="${it.changeSets}"/>
28-
<table>
29-
<t:summary icon="symbol-changes">
30-
<j:choose>
31-
<j:when test="${!changeSets.isEmpty()}">
32-
<j:forEach var="changeSet" items="${changeSets}">
33-
<st:include it="${changeSet}" page="digest.jelly"/>
34-
</j:forEach>
35-
</j:when>
36-
<j:otherwise>
37-
<st:include class="hudson.scm.EmptyChangeLogSet" page="digest.jelly" />
38-
</j:otherwise>
39-
</j:choose>
40-
</t:summary>
41-
</table>
26+
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:t="/lib/hudson" xmlns:l="/lib/layout">
27+
<l:userExperimentalFlag var="newBuildPage" flagClassName="jenkins.model.experimentalflags.NewBuildPageUserExperimentalFlag" />
28+
29+
<j:if test="${!newBuildPage}">
30+
<j:set var="changeSets" value="${it.changeSets}"/>
31+
<table>
32+
<t:summary icon="symbol-changes">
33+
<j:choose>
34+
<j:when test="${!changeSets.isEmpty()}">
35+
<j:forEach var="changeSet" items="${changeSets}">
36+
<st:include it="${changeSet}" page="digest.jelly"/>
37+
</j:forEach>
38+
</j:when>
39+
<j:otherwise>
40+
<st:include class="hudson.scm.EmptyChangeLogSet" page="digest.jelly" />
41+
</j:otherwise>
42+
</j:choose>
43+
</t:summary>
44+
</table>
45+
</j:if>
4246
</j:jelly>

0 commit comments

Comments
 (0)