Added UI for displaying what mojos were run. (#297)

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2931 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-04-08 00:10:55 +00:00
1 parent d499c37757
commit 6cfe11e2d5
3 files changed
+61

No files matched your search

@@ -68,4 +68,16 @@ public final class ExecutedMojo implements Serializable {
}
this.digest = digest;
}
/**
* Returns duration in a human readable text.
*/
public String getDurationString() {
return Util.getTimeSpanString(duration);
}
public String getReadableExecutionId() {
if(executionId==null) return "-";
else return executionId;
}
}
@@ -0,0 +1,5 @@
<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">
<l:task icon="images/24x24/gear.gif" href="${buildUrl.baseUrl}/executedMojos" title="Executed Mojos" />
<!-- include super class definition -->
<st:include page="/hudson/model/Actionable/actions.jelly" />
</j:jelly>
@@ -0,0 +1,44 @@
<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">
<l:layout title="${it.project.displayName} #${it.number} Execution Record">
<st:include page="sidepanel.jelly" />
<l:main-panel>
<h1>Executed Mojos</h1>
<j:choose>
<j:when test="${empty(it.executedMojos}">
<div>
No mojos executed.
</div>
</j:when>
<j:otherwise>
<table class="middle-align">
<tr>
<th>Plugin</th>
<th>Version</th>
<th>Goal</th>
<th>Execution</th>
<th>Duration</th>
<th>Fingerprint</th>
</tr>
<j:forEach var="m" items="${it.executedMojos}">
<tr>
<td>
<img src="${rootURL}/images/24x24/gear.gif"/>
${m.groupId}:${m.artifactId}
</td>
<td align="center">${m.version}</td>
<td>${m.goal}</td>
<td align="center">${m.readableExecutionId}</td>
<td>${m.durationString}</td>
<td align="center">
<a href="${rootURL}/fingerprint/${m.digest}/"><img src="${rootURL}/images/16x16/fingerprint.gif" alt="fingerprint" /></a>
</td>
</tr>
</j:forEach>
</table>
</j:otherwise>
</j:choose>
</l:main-panel>
</l:layout>
</j:jelly>