Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #33 from mixalturek/master
[JENKINS-21697] New Parts panel on report page
- Loading branch information
Showing
13 changed files
with
268 additions
and
46 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
package hudson.plugins.sloccount.model; | ||
|
||
/** | ||
* One of the top level directories that are passed to the SLOCCount | ||
* utility. It is present in the third column of SLOCCount output. | ||
* | ||
* @author Michal Turek | ||
*/ | ||
public class Part extends FileContainer { | ||
/** Serial version UID. */ | ||
private static final long serialVersionUID = 0L; | ||
|
||
/** The part name. */ | ||
private String name; | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @param name the part name | ||
*/ | ||
public Part(String name){ | ||
this.name = name; | ||
} | ||
|
||
public String getName() { | ||
return this.name; | ||
} | ||
} |
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
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
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
39 changes: 39 additions & 0 deletions
39
src/main/resources/hudson/plugins/sloccount/SloccountResult/parts.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,39 @@ | ||
<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" xmlns:local="local"> | ||
<st:header name="Content-Type" value="text/html;charset=UTF-8" /> | ||
<table class="pane sortable" id="parts"> | ||
<thead> | ||
<tr> | ||
<td class="pane-header">${%Part}</td> | ||
<td class="pane-header" style="width:2em">${%Files}</td> | ||
<td class="pane-header" style="width:2em">${%Lines}</td> | ||
<td class="pane-header" style="width:60%">${%Distribution}</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<j:set var="cachedReport" value="${it.report}"/> | ||
<j:set var="max" value="${cachedReport.longestPart.lineCount}"/> | ||
<j:forEach var="container" items="${cachedReport.parts}"> | ||
<tr> | ||
<td class="pane"><a href="partResult/${container.name}">${container.name}</a></td> | ||
<td class="pane number" data="${container.fileCount}">${container.fileCountString}</td> | ||
<td class="pane number" data="${container.lineCount}">${container.lineCountString}</td> | ||
<td class="pane"><st:include page="/tabview/distribution-graph.jelly" /></td> | ||
</tr> | ||
</j:forEach> | ||
</tbody> | ||
<tfoot> | ||
<tr class="sortbottom"> | ||
<td class="pane-header">${%Total} ${cachedReport.partCountString}</td> | ||
<td class="pane-header number" data="${cachedReport.fileCount}">${cachedReport.fileCountString}</td> | ||
<td class="pane-header number" data="${cachedReport.lineCount}">${cachedReport.lineCountString}</td> | ||
<td class="pane-header"> </td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
|
||
<script type="text/javascript"> | ||
Behaviour.applySubtree(document.getElementById('statistics')); | ||
</script> | ||
</j:jelly> |
4 changes: 4 additions & 0 deletions
4
src/main/resources/hudson/plugins/sloccount/SloccountResult/parts_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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Files=Dateien | ||
Lines=Zeilen | ||
Distribution=Verteilung | ||
Total=Total |
4 changes: 4 additions & 0 deletions
4
src/main/resources/hudson/plugins/sloccount/SloccountResult/parts_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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Files=\u30d5\u30a1\u30a4\u30eb | ||
Lines=\u884c | ||
Distribution=\u5206\u5e03 | ||
Total=\u5408\u8a08 |
Oops, something went wrong.