Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-24021] Show statistics from last build on main job page
- Loading branch information
1 parent
a8b8e25
commit f73ff44
Showing
9 changed files
with
83 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ | |
.settings/ | ||
target/ | ||
work/ | ||
.idea | ||
*.iml | ||
Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/resources/hudson/plugins/sloccount/Messages.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/resources/hudson/plugins/sloccount/Messages_de.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Sloccount.Publisher.Name=Anzeige der SLOCCount Analyseergebnisse | ||
|
||
Sloccount.ProjectAction.Name=SLOCCount | ||
Sloccount.SloccountResults=SLOCCount | ||
|
||
Sloccount.Trend.Name=SLOCCount Trend |
2 changes: 1 addition & 1 deletion
2
src/main/resources/hudson/plugins/sloccount/Messages_ja.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Sloccount.Publisher.Name=SLOCCount\u306e\u5206\u6790\u7d50\u679c\u306e\u516c\u958b | ||
|
||
Sloccount.ProjectAction.Name=SLOCCount | ||
Sloccount.SloccountResults=SLOCCount | ||
|
||
Sloccount.Trend.Name=SLOCCount\u306e\u63a8\u79fb |
45 changes: 45 additions & 0 deletions
45
src/main/resources/hudson/plugins/sloccount/SloccountBuildAction/statistics.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<j:jelly xmlns:j="jelly:core"> | ||
|
||
<style type="text/css"> | ||
#sloccountSummary { width: auto; } | ||
#sloccountSummary .number { text-align: right; } | ||
</style> | ||
|
||
<table class="pane sortable" id="sloccountSummary"> | ||
<thead> | ||
<tr> | ||
<td class="pane-header">${%Language}</td> | ||
<td class="pane-header">${%Lines}</td> | ||
<td class="pane-header">${%Lines} ${%Delta}</td> | ||
<td class="pane-header">${%Files}</td> | ||
<td class="pane-header">${%Files} ${%Delta}</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<j:forEach var="language" items="${diff.languageDiffs}"> | ||
<tr> | ||
<j:if test="${buildNumber == -1}"> | ||
<td class="pane"><a href="sloccountResult/languageResult/${language.urlName}">${language.name}</a></td> | ||
</j:if> | ||
<j:if test="${buildNumber != -1}"> | ||
<td class="pane"><a href="${buildNumber}/sloccountResult/languageResult/${language.urlName}">${language.name}</a></td> | ||
</j:if> | ||
<td class="pane number" data="${language.lineCount}">${language.lineCountString}</td> | ||
<td class="pane number" data="${language.lineCountDelta}">${language.lineCountDeltaString}</td> | ||
<td class="pane number" data="${language.fileCount}">${language.fileCountString}</td> | ||
<td class="pane number" data="${language.fileCountDelta}">${language.fileCountDeltaString}</td> | ||
</tr> | ||
</j:forEach> | ||
</tbody> | ||
<tfoot> | ||
<tr class="sortbottom"> | ||
<td class="pane-header">${%Total}</td> | ||
<td class="pane-header number" data="${diff.lineCount}">${diff.lineCountString}</td> | ||
<td class="pane-header number" data="${diff.lineCountDelta}">${diff.lineCountDeltaString}</td> | ||
<td class="pane-header number" data="${diff.fileCount}">${diff.fileCountString}</td> | ||
<td class="pane-header number" data="${diff.fileCountDelta}">${diff.fileCountDeltaString}</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
|
||
</j:jelly> |
48 changes: 4 additions & 44 deletions
48
src/main/resources/hudson/plugins/sloccount/SloccountBuildAction/summary.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,10 @@ | ||
<j:jelly xmlns:j="jelly:core" | ||
xmlns:d="jelly:define" | ||
xmlns:l="/lib/layout" | ||
xmlns:t="/lib/hudson" | ||
xmlns:f="/lib/form" | ||
xmlns:i="jelly:fmt"> | ||
<j:jelly xmlns:j="jelly:core" xmlns:t="/lib/hudson" xmlns:st="jelly:stapler"> | ||
|
||
<t:summary icon="/plugin/sloccount/icons/sloccount-48.png"> | ||
<div><a href="sloccountResult">${%SLOCCount}</a></div> | ||
<div><a href="${it.urlName}">${it.displayName}</a></div> | ||
|
||
<j:set var="diff" value="${it.diffSummary}"/> | ||
|
||
<style type="text/css"> | ||
#sloccountSummary { width: auto; } | ||
#sloccountSummary .number { text-align: right; } | ||
</style> | ||
|
||
<table class="pane sortable" id="sloccountSummary"> | ||
<thead> | ||
<tr> | ||
<td class="pane-header">${%Language}</td> | ||
<td class="pane-header">${%Lines}</td> | ||
<td class="pane-header">${%Lines} ${%Delta}</td> | ||
<td class="pane-header">${%Files}</td> | ||
<td class="pane-header">${%Files} ${%Delta}</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<j:forEach var="language" items="${diff.languageDiffs}"> | ||
<tr> | ||
<td class="pane"><a href="sloccountResult/languageResult/${language.urlName}">${language.name}</a></td> | ||
<td class="pane number" data="${language.lineCount}">${language.lineCountString}</td> | ||
<td class="pane number" data="${language.lineCountDelta}">${language.lineCountDeltaString}</td> | ||
<td class="pane number" data="${language.fileCount}">${language.fileCountString}</td> | ||
<td class="pane number" data="${language.fileCountDelta}">${language.fileCountDeltaString}</td> | ||
</tr> | ||
</j:forEach> | ||
</tbody> | ||
<tfoot> | ||
<tr class="sortbottom"> | ||
<td class="pane-header">${%Total}</td> | ||
<td class="pane-header number" data="${diff.lineCount}">${diff.lineCountString}</td> | ||
<td class="pane-header number" data="${diff.lineCountDelta}">${diff.lineCountDeltaString}</td> | ||
<td class="pane-header number" data="${diff.fileCount}">${diff.fileCountString}</td> | ||
<td class="pane-header number" data="${diff.fileCountDelta}">${diff.fileCountDeltaString}</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
<j:set var="buildNumber" value="-1"/> | ||
<st:include page="statistics.jelly" /> | ||
</t:summary> | ||
</j:jelly> |
15 changes: 15 additions & 0 deletions
15
src/main/resources/hudson/plugins/sloccount/SloccountProjectAction/jobMain.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<j:jelly xmlns:j="jelly:core" xmlns:t="/lib/hudson" xmlns:st="jelly:stapler"> | ||
<table style="margin-left:1em;"> | ||
<t:summary icon="/plugin/sloccount/icons/sloccount-48.png"> | ||
<div><a href="${it.urlName}">${it.displayName}</a></div> | ||
|
||
<j:set var="lastBuildAction" value="${it.lastFinishedBuildAction}"/> | ||
|
||
<j:if test="${lastBuildAction != null}"> | ||
<j:set var="diff" value="${lastBuildAction.diffSummary}"/> | ||
<j:set var="buildNumber" value="${lastBuildAction.build.number}"/> | ||
<st:include page="/hudson/plugins/sloccount/SloccountBuildAction/statistics.jelly"/> | ||
</j:if> | ||
</t:summary> | ||
</table> | ||
</j:jelly> |