Skip to content

Commit

Permalink
Remove icon, restore OG Old Data screen
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Dec 28, 2021
1 parent 5802f11 commit a7b8567
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 70 deletions.
117 changes: 49 additions & 68 deletions core/src/main/resources/hudson/diagnosis/OldDataMonitor/manage.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -31,55 +31,40 @@ THE SOFTWARE.
<p class="jenkins-description">${%blurb.1}</p>
<p class="jenkins-description">${%blurb.2}</p>

<h2>${%TODO} ${it.data.size()}</h2>
<j:choose>
<j:when test="${it.data.size() > 0}">
<table class="jenkins-table sortable">
<thead>
<table class="sortable pane bigtable width-auto">
<tr>
<th initialSortDir="down">${%Type}</th>
<th>${%Name}</th>
<th>${%Version}</th>
<th>${%Error}</th>
</tr>
<j:forEach var="item" items="${it.data.entrySet()}">
<j:set var="obj" value="${item.key}"/>
<j:choose>
<j:when test="${item.value!=''}">
<tr>
<th initialSortDir="down">${%Type}</th>
<th>${%Name}</th>
<th>${%Version}</th>
<th>${%Error}</th>
<td>${obj.class.name}</td>
<!-- fullName is first to avoid calling User.get(String) for User object -->
<td>${obj.fullName?:obj.fullDisplayName?:obj.displayName?:obj.name}</td>
<td>
<j:choose>
<j:when test="${item.value.isOld(150)}">
<b title="${%Very old version}">${item.value}</b>
</j:when>
<j:otherwise>
${item.value}
</j:otherwise>
</j:choose>
</td>
<td style="white-space:normal">${item.value.extra}</td>
</tr>
</thead>
<tbody>
<j:forEach var="item" items="${it.data.entrySet()}">
<j:set var="obj" value="${item.key}"/>
<j:choose>
<j:when test="${item.value!=''}">
<tr>
<td>${obj.class.name}</td>
<!-- fullName is first to avoid calling User.get(String) for User object -->
<td>${obj.fullName?:obj.fullDisplayName?:obj.displayName?:obj.name}</td>
<td>
<j:choose>
<j:when test="${item.value.isOld(150)}">
<b title="${%Very old version}">${item.value}</b>
</j:when>
<j:otherwise>
${item.value}
</j:otherwise>
</j:choose>
</td>
<td style="white-space:normal">${item.value.extra}</td>
</tr>
</j:when>
<j:otherwise>
<j:if test="${item.value.extra!=null}"><j:set var="hasExtra" value="${true}"/></j:if>
</j:otherwise>
</j:choose>
</j:forEach>
</tbody>
</table>
</j:when>
<j:otherwise>
<p class="jenkins-description">${%No old data was found.}</p>
</j:otherwise>
</j:choose>

<h2>${%TODO Version stuff?} ${it.data.size()}</h2>
<!-- TODO stuff-->
</j:when>
<j:otherwise>
<j:if test="${item.value.extra!=null}"><j:set var="hasExtra" value="${true}"/></j:if>
</j:otherwise>
</j:choose>
</j:forEach>
</table>
<j:set var="vers" value="${it.versionList}"/>
<j:choose>
<j:when test="${vers.hasNext()}">
Expand All @@ -99,35 +84,31 @@ THE SOFTWARE.
</form>
</j:when>
<j:otherwise>
<p class="jenkins-description">${%No old data was found.}</p>
${%No old data was found.}
</j:otherwise>
</j:choose>

<j:if test="${hasExtra}">
<br/>
<h2>${%Unreadable Data}</h2>
<p class="jenkins-description">${%blurb.6}</p>
<table class="jenkins-table sortable">
<thead>
<tr>
<p>${%blurb.6}</p>
<table class="sortable pane bigtable width-auto">
<tr>
<th initialSortDir="down">${%Type}</th>
<th>${%Name}</th>
<th>${%Error}</th>
</tr>
</thead>
<tbody>
<j:forEach var="item" items="${it.data.entrySet()}">
<j:if test="${item.value.extra!=null and item.value==''}">
<j:set var="obj" value="${item.key}"/>
<tr>
<td>${obj.class.name}</td>
<td>${obj.fullName?:obj.fullDisplayName?:obj.displayName?:obj.name}</td>
<td style="white-space:normal">${item.value.extra}</td>
</tr>
</j:if>
</j:forEach>
</tbody>
</tr>
<j:forEach var="item" items="${it.data.entrySet()}">
<j:if test="${item.value.extra!=null and item.value==''}">
<j:set var="obj" value="${item.key}"/>
<tr>
<td>${obj.class.name}</td>
<td>${obj.fullName?:obj.fullDisplayName?:obj.displayName?:obj.name}</td>
<td style="white-space:normal">${item.value.extra}</td>
</tr>
</j:if>
</j:forEach>
</table>

<br/>
<form action="discard" method="POST" name="discardUnreadable">
<f:submit value="${%Discard Unreadable Data}"/>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ l.layout(permission:app.SYSTEM_READ, title:my.displayName) {
set("readOnlyMode", !app.hasPermission(app.ADMINISTER))
l.main_panel {
h1 {
l.icon(class: 'icon-setting icon-xlg')
// TODO more appropriate icon
text(my.displayName)
}

Expand Down

0 comments on commit a7b8567

Please sign in to comment.