Skip to content

Commit

Permalink
Remove hyphens from the main tables to allow numerical sorting.
Browse files Browse the repository at this point in the history
Remove text versions (true/false) of boolean results from the raw table to allow numerical sorting.
Fix bug that occured when changing schema content where old parameters ended as results and crashed the display of the main tables.
Adjusted left the Group/Result/Unit names for readeability and prevent the awkward display.
  • Loading branch information
damercie committed Oct 30, 2018
1 parent 9fdabfc commit 637c967
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
Expand Up @@ -86,7 +86,7 @@ public String getHTMLCondensed(Integer key, ContentDetected detected, char decim
content.append(key.toString());
content.append("</td><td>");
if (detected.isNumeralDetected()) {
content.append("-</td><td>-</td><td>-</td><td>-</td><td>");
content.append("</td><td></td><td></td><td></td><td>");
}
content.append(Integer.toString(this.passed));
content.append("</td><td>");
Expand Down
Expand Up @@ -88,7 +88,7 @@ public String getHTMLCondensed(Integer key, ContentDetected detected, char decim
content.append(key.toString());
content.append("</td><td>");
if (detected.isNumeralDetected()) {
content.append("-</td><td>-</td><td>-</td><td>-</td><td>");
content.append("</td><td></td><td></td><td></td><td>");
}
content.append(Integer.toString(this.passed));
content.append("</td><td>");
Expand Down
Expand Up @@ -225,7 +225,7 @@ public void mergeWith(MapperBase mapper) throws ValidationException {
}
}
if (!detectedParam) {
results.put(baseParam.getKey(), baseParam.getValue());
parameters.put(baseParam.getKey(), baseParam.getValue());
}
}
for (Map.Entry<Integer, TestGroup> baseFile : mapper.getFiles().entrySet()) {
Expand Down
Expand Up @@ -157,7 +157,7 @@ public String getValueAsLocaleString(int build, char decimalSeparator) {
if (value == null) {
return "";
} else {
return value.toString();
return "__boolean__";
}
}

Expand Down
Expand Up @@ -991,17 +991,17 @@ public String getHTMLResult(Integer key, ContentDetected detected, TreeSet<Integ
for (int build = builds.last(); build >= builds.first(); build--) {
String value = this.getValueAsLocaleString(build, decimalSeparator);
if (value.isEmpty()) {
content.append("</td><td>-");
content.append("</td><td>");
} else {
Boolean failedState = this.getFailedState(build);
if (failedState == null){
content.append("</td><td>");
content.append(value);
if (!value.equals("__boolean__")) content.append(value);
} else {
content.append("</td><td style=\"background-color:");
content.append(this.getColor(failedState));
content.append(";\">");
content.append(value);
content.append("\">");
if (!value.equals("__boolean__")) content.append(value);
if (failedState){
listNFailed.set(index, listNFailed.get(index) + 1);
} else {
Expand Down
Expand Up @@ -253,20 +253,24 @@
}
.hover td:first-child {
background-color:#ededed;
text-align: left;
}
<j:if test="${it.NumberOfHeads > 1}">
.hover td:nth-child(2) {
background-color:#ededed;
text-align: left;
}
</j:if>
<j:if test="${it.NumberOfHeads > 2}">
.hover td:nth-child(3) {
background-color:#ededed;
text-align: left;
}
</j:if>
<j:if test="${it.NumberOfHeads > 3}">
.hover td:nth-child(4) {
background-color:#ededed;
text-align: left;
}
</j:if>
#api_link {
Expand Down

0 comments on commit 637c967

Please sign in to comment.