Skip to content

Commit

Permalink
Single/Multiline Build History
Browse files Browse the repository at this point in the history
  • Loading branch information
tfennelly committed Nov 26, 2014
1 parent 6bf6e7f commit 789e0df
Show file tree
Hide file tree
Showing 5 changed files with 580 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,38 @@ THE SOFTWARE.
<j:if test="${!pending.isEmpty()}">
<j:forEach var="item" items="${queuedItems}" indexVar="i">
<j:set var="id" value="${h.generateId()}"/>
<tr class="build-row transitive" id="${id}">
<td nowrap="nowrap">
<l:icon class="icon-grey icon-sm"/>
<st:nbsp/>
<!-- Don't use math unless needed, in case nextBuildNumber is not numeric -->
#${queuedItems.size()==1 ? it.owner.nextBuildNumber
: it.owner.nextBuildNumber+queuedItems.size()-i-1}
</td>
<td style="white-space:normal;" colspan="2">
<div style="float:right">
<j:if test="${item.hasCancelPermission()}">
<l:stopButton href="${rootURL}/queue/cancelItem?id=${item.id}" alt="${%cancel this build}"/>
</j:if>
<tr class="build-row build-pending transitive single-line" id="${id}">
<td class="build-row-cell">
<div class="pane build-name">
<div class="build-icon">
<l:icon class="icon-grey icon-sm"/>
</div>
<!-- Don't use math unless needed, in case nextBuildNumber is not numeric -->
<div class="display-name">
#${queuedItems.size()==1 ? it.owner.nextBuildNumber
: it.owner.nextBuildNumber+queuedItems.size()-i-1}
</div>
</div>
<div class="pane build-details indent-multiline">
<j:set var="cause" value="${item.getCauseOfBlockage()}"/>
<j:choose>
<j:when test="${cause!=null}">
(${%pending}—<st:include it="${cause}" page="summary.jelly"/>)
</j:when>
<j:otherwise>
(${%pending})
</j:otherwise>
</j:choose>
${item.params}
</div>
<div class="pane build-controls">
<div class="build-stop">
<j:if test="${item.hasCancelPermission()}">
<l:stopButton href="${rootURL}/queue/cancelItem?id=${item.id}" alt="${%cancel this build}"/>
</j:if>
</div>
</div>
<j:set var="cause" value="${item.getCauseOfBlockage()}"/>
<j:choose>
<j:when test="${cause!=null}">
(${%pending}—<st:include it="${cause}" page="summary.jelly"/>)
</j:when>
<j:otherwise>
(${%pending})
</j:otherwise>
</j:choose>
${item.params}
<div class="left-bar"></div>
</td>
</tr>
</j:forEach>
Expand Down
69 changes: 38 additions & 31 deletions core/src/main/resources/hudson/widgets/HistoryWidget/entry.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -29,41 +29,48 @@ THE SOFTWARE.
<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">
<j:set var="link" value="${it.baseUrl}/${build.number}/" />
<j:set var="transitive" value="${(it.firstTransientBuildKey!=null and (it.adapter.compare(build,it.firstTransientBuildKey) ge 0)) ? 'transitive' : null}" />
<tr class="build-row ${transitive}">
<td class="pane build-name">
<a class="build-status-link" href="${link}console"><l:icon alt="${build.iconColor.description} &gt; ${%Console Output}" class="${build.buildStatusIconClassName} icon-sm" tooltip="${build.iconColor.description} &gt; ${%Console Output}"/></a><st:nbsp/>
${build.displayName}
</td>
<td class="pane build-details">
<a class="tip model-link inside" href="${link}">
<i:formatDate value="${build.timestamp.time}" type="both" dateStyle="medium" timeStyle="medium"/>
</a>
<j:if test="${build.building}">
<j:set target="${it}" property="nextBuildNumberToFetch" value="${build.number}"/>
<t:buildProgressBar build="${build}"/>
</j:if>
<tr class="build-row ${transitive} single-line">
<td class="build-row-cell">
<div class="pane build-name">
<div class="build-icon">
<a class="build-status-link" href="${link}console"><l:icon alt="${build.iconColor.description} &gt; ${%Console Output}" class="${build.buildStatusIconClassName} icon-sm" tooltip="${build.iconColor.description} &gt; ${%Console Output}"/></a>
</div>
<a class="display-name" href="${link}">${build.displayName}</a>
</div>
<div class="pane build-details" time="${build.timestamp.time.time}">
<a class="tip model-link inside build-link" href="${link}">
<i:formatDate value="${build.timestamp.time}" type="both" dateStyle="medium" timeStyle="short" />
</a>
<j:if test="${build.building}">
<j:set target="${it}" property="nextBuildNumberToFetch" value="${build.number}"/>
<t:buildProgressBar build="${build}"/>
</j:if>
</div>
<div class="pane build-controls">
<j:if test="${build.building}">
<div class="build-stop">
<!-- Check ABORT permission for Project, Admin permission otherwise -->
<j:if test="${empty(it.owner.ABORT) ? h.hasPermission(app.ADMINISTER) : it.owner.hasPermission(it.owner.ABORT)}">
<l:stopButton href="${link}stop" alt="[cancel]"/>
</j:if>
</div>
</j:if>
<div class="middle-align build-badge">
<j:set var="badges" value="${build.badgeActions}"/>
<j:if test="${!empty(badges)}">
<st:nbsp/>
<j:forEach var="badge" items="${badges}">
<st:include it="${badge}" page="badge.jelly" />
</j:forEach>
</j:if>
</div>
</div>
<j:if test="${!empty build.description}">
<div class="desc">
<div class="pane desc indent-multiline">
<j:out value="${app.markupFormatter.translate(build.truncatedDescription)}"/>
</div>
</j:if>
</td>
<td class="pane build-stop">
<j:if test="${build.building}">
<!-- Check ABORT permission for Project, Admin permission otherwise -->
<j:if test="${empty(it.owner.ABORT) ? h.hasPermission(app.ADMINISTER) : it.owner.hasPermission(it.owner.ABORT)}">
<l:stopButton href="${link}stop" alt="[cancel]"/>
</j:if>
</j:if>
</td>
<td class="pane middle-align build-badge">
<j:set var="badges" value="${build.badgeActions}"/>
<j:if test="${!empty(badges)}">
<st:nbsp/>
<j:forEach var="badge" items="${badges}">
<st:include it="${badge}" page="badge.jelly" />
</j:forEach>
</j:if>
<div class="left-bar" />
</td>
</tr>
</j:jelly>
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ THE SOFTWARE.
newhist.headers = hist.headers

replace(hist, newhist);
fireBuildHistoryChanged();
}
});
}
Expand Down
125 changes: 118 additions & 7 deletions war/src/main/webapp/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,6 @@ pre.console {
width: 480px;
}

.build-row {
padding: 3px 4px 3px 4px;
}

.build-keep {
font-weight: bold;
}
Expand Down Expand Up @@ -934,18 +930,133 @@ table.parameters > tbody:hover {
}

#buildHistory .desc {
position: relative;
padding: 0;
margin-top: 5px;
white-space: normal;
max-width: 200px;
opacity: 0.6;
font-style: italic;
}

#buildHistory .build-row-cell {
position: relative;
}

#buildHistory .build-rss-links {
float: right;
}

#buildHistory .build-name {
max-width: 120px;
.build-row {
padding: 3px 4px 3px 4px;
}

.build-row:hover {
background: #e8e8e8 !important;
}

.build-row-cell {
font-size: 12px;
}

.build-row-cell .pane.build-name {
width: 20%;
font-weight: bold;
}
.build-row-cell .pane.build-details {
width: 50%;
}
.build-row-cell .pane.build-controls {
width: 30%;
}
.build-row-cell .pane.build-details.block {
width: 100%;
}

.pane.build-name a,
.pane.build-name a:visited {
color: black;
text-decoration: underline;
}

.pane.build-details a,
.pane.build-details a:visited {
color: black;
opacity: 0.6;
text-decoration: none;
}
.pane.build-details a:hover {
opacity: 1.0;
text-decoration: underline;
}

.build-row.multi-line .build-row-cell .pane.build-name.block {
width: 100%;
}
.build-row-cell .pane.build-controls.block {
width: 100%;
text-align: right;
}

.build-row-cell .pane.build-name .build-icon,
.build-row-cell .pane.build-name .display-name {
display: inline-block;
}
.build-row-cell .pane.build-name .build-icon {
position: absolute;
}

.build-row-cell .build-stop {
display: inline-block;
width: 30%;
}
.build-row-cell .build-badge {
display: inline-block;
padding: 2px;
width: 70%;
text-align: right;
}
.build-row .build-name-controls .pane.build-name,
.build-row .build-details-controls .pane.build-details {
width: 70%;
}

.build-row .build-row-cell .pane {
padding: 0px 2px; /* Sync changes with func expandControlsTo50Percent in hudson-behavior.js */
display: inline-block;
overflow: hidden;
}

.build-row.multi-line .build-row-cell .block {
display: block;
overflow: auto;
}

.build-row.multi-line .build-row-cell .indent-multiline {
margin-top: 5px;
}

.build-row.multi-line .build-row-cell .left-bar {
position: absolute;
top: 19px;
bottom: 3px;
left: 14px;
border-left: 1px solid #cdcdcd;
}

.build-row-cell .pane.build-name .display-name,
.build-row-cell .indent-multiline {
padding-left: 20px !important; /* Sync changes with func expandControlsTo50Percent in hudson-behavior.js */
}

.build-row .build-row-cell {
visibility: hidden;
}
.build-row.overflow-checked .build-row-cell {
visibility: visible;
}

#buildHistory .nowrap {
white-space: nowrap;
}

/* ========================= editable combobox style ========================= */
Expand Down
Loading

0 comments on commit 789e0df

Please sign in to comment.