Skip to content

Commit

Permalink
#83 limit 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 1, 2017
1 parent 599c558 commit d0c73d2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/org/jpeek/web/Results.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ public Iterable<Iterable<Directive>> all() {
.add("version").set(item.get("version").getS()).up()
.add("group").set(parts[0]).up()
.add("artifact").set(parts[1]).up()
.add("rank")
.set(new DyNum(item, "rank").doubleValue())
.up()
.add("score")
.set(new DyNum(item, "score").doubleValue())
.up()
.add("defects")
.set(new DyNum(item, "defects").doubleValue())
.up()
Expand All @@ -184,7 +190,8 @@ public Iterable<Iterable<Directive>> all() {
// @checkstyle MagicNumber (1 line)
.withLimit(1000)
.withAttributeToGet(
"artifact", "classes", "defects", "version"
"artifact", "classes", "defects", "version",
"rank", "score"
)
)
);
Expand Down
12 changes: 12 additions & 0 deletions src/main/resources/org/jpeek/web/all.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ SOFTWARE.
<th>
<xsl:text>Classes</xsl:text>
</th>
<th>
<xsl:text>Rank</xsl:text>
</th>
<th>
<xsl:text>Score</xsl:text>
</th>
<th>
<xsl:text>Defects</xsl:text>
</th>
Expand Down Expand Up @@ -105,6 +111,12 @@ SOFTWARE.
<xsl:value-of select="classes"/>
</a>
</td>
<td style="text-align:right">
<xsl:value-of select="format-number(rank,'0.00')"/>
</td>
<td style="text-align:right">
<xsl:value-of select="format-number(score,'0.00')"/>
</td>
<td>
<xsl:attribute name="style">
<xsl:text>text-align:right;</xsl:text>
Expand Down

0 comments on commit d0c73d2

Please sign in to comment.