Skip to content

Commit 243f8b9

Browse files
jsightmrizzi
authored andcommitted
WINDUP-1977: Added name header and made the report sorted by name by default (windup#1319)
* WINDUP-1977: Added name header and made the report sorted by name by default * WINDUP-1977: Removed unneccessary logging
1 parent 47822b3 commit 243f8b9

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

reporting/impl/src/main/resources/reports/resources/css/tech-report-punchcard.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ tr.headersGroup td div {
3939
white-space: nowrap;
4040
}
4141

42+
tr.headersGroup td:nth-child(1) div {
43+
writing-mode: horizontal-tb;
44+
transform: rotate(0deg);
45+
width: 100%;
46+
height: 240px;
47+
display: flex;
48+
align-items: flex-end;
49+
padding-left: 0.3em;
50+
}
51+
4252
tr.headersGroup .sort_asc div:after {
4353
content: "\f107";
4454
font-family: "FontAwesome";

reporting/impl/src/main/resources/reports/templates/techReport-punchCard.ftl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<td class="scrollbar-padding"></td>
8888
</tr>
8989
<tr class="headersGroup">
90-
<td></td>
90+
<td class="sector"><div>Name</div></td>
9191
<#list sectorTags as sectorTag >
9292
<#assign sortedBoxTags = iterableToList(sectorTag.designatedTags)?sort_by("title") />
9393
<#list sortedBoxTags as boxTag >
@@ -229,6 +229,9 @@
229229
230230
var A = getVal(a);
231231
var B = getVal(b);
232+
if (!$.isNumeric(A) || !$.isNumeric(B)) {
233+
return B.localeCompare(A) * f;
234+
}
232235
233236
if(A < B) {
234237
return -1*f;
@@ -241,7 +244,9 @@
241244
242245
function getVal(elm) {
243246
var v = $(elm).children('td').eq(column).data("count");
244-
if($.isNumeric(v)){
247+
if (v == null) {
248+
v = $(elm).children('td').eq(column).text().trim();
249+
} else if($.isNumeric(v)) {
245250
v = parseInt(v,10);
246251
}
247252
return v;
@@ -258,6 +263,9 @@
258263
var index = $(td).index();
259264
sortTable(index);
260265
});
266+
reverse = true;
267+
currentSortColumn = 0;
268+
sortTable(0);
261269
});
262270
</script>
263271
</body>

0 commit comments

Comments
 (0)