Skip to content

Commit

Permalink
Improve portlet ui
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Oliveira <[email protected]>
  • Loading branch information
Gabriel Oliveira committed Feb 2, 2017
1 parent 2a41f2f commit f993215
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Redtime.ReportName=Relatório de tempo de falha
Redtime.ReportName=Relat\u00F3rio de tempo de falha
Redtime.RedtimeDurationNotFixedYet={0} (N\u00E3o corrigido)
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout"
xmlns:t="/lib/hudson" xmlns:dp="/hudson/plugins/view/dashboard">
<j:jelly xmlns:j="jelly:core"
xmlns:t="/lib/hudson"
xmlns:r="/com/evo/jenkinsplugins/redtime">
<j:set var="reds" value="${it.reds}" />

<table>
<table id="statistics" class="pane bigtable" style="margin-top: 0px;">
<tr style="border-top: 0px;">
<th align="left">${%Job name}</th>
<th align="left">${%Job name}</th>
<th align="left">${%Failure}</th>
<th align="left">${%Fix}</th>
<th align="left">${%Duration}</th>
</tr>

<j:forEach var="red" items="${reds}">
<tr>
<td>${red.job.fullDisplayName}</td>
<td>
<r:jobLink job="${red.job}" />
</td>
<td>
<j:if test="${red.failure != null}">
${red.failure.number}
</j:if>
<j:if test="${red.failure == null}">
-
<t:buildLink job="${red.job}" number="${red.failure.number}" />
</j:if>
<j:if test="${red.failure == null}"> - </j:if>
</td>
<td>
<j:if test="${red.repair != null}">
${red.repair.number}
<t:buildLink job="${red.job}" number="${red.repair.number}" />
</j:if>
<j:if test="${red.repair == null}">
-
</j:if>
</td>
<td>
${red.durationString}
<j:if test="${red.repair == null}"> - </j:if>
</td>
<td>${red.durationString}</td>
</tr>
</j:forEach>
</table>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Job\ name=Nome do job
Job\ name=Nome
Failure=Falha
Fix=Corre\u00E7\u00E3o
Duration=Dura\u00E7\u00E3o
20 changes: 20 additions & 0 deletions src/main/resources/com/evo/jenkinsplugins/redtime/jobLink.jelly
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core"
xmlns:st="jelly:stapler"
xmlns:l="/lib/layout">
<st:documentation>
Generates a link to a job with health report icon
<st:attribute name="job" type="hudson.model.Job" use="required">
Job object to be displayed.
</st:attribute>
</st:documentation>

<j:set var="healthReports" value="${job.buildHealthReports}"/>
<j:new var="emptyHealthReport" className="hudson.model.HealthReport"/>
<j:set var="buildHealth" value="${empty(healthReports) ? emptyHealthReport : healthReports[0]}"/>

<a href="${h.getRelativeLinkTo(job)}" class="model-link">
<l:icon class="${buildHealth.iconClassName} icon-sm" alt="${buildHealth.score}%"/>
<l:breakable value="${job.fullDisplayName}"/>
</a>
</j:jelly>
Empty file.

0 comments on commit f993215

Please sign in to comment.