Show a failed-badge behind report links on the artifact index

Each listed report link now carries the failures counter parsed from the
report's Gradle-style index.html (id="failures" info box); reports with
failures get a red "N failed" badge, so a red build reveals which report to
open without clicking through all of them. Pages without such a counter
(Jacoco, profile, documentation) stay unmarked. A full-text FAILED scan was
deliberately not used: even green hsadmin-ng builds contain the word in
embedded test output.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
mhoennig
2026-08-10 16:44:12 +02:00
co-authored by Claude Fable 5
parent 4ca077da80
commit b351ab33c5
4 changed files with 74 additions and 4 deletions
+4 -2
View File
@@ -62,8 +62,10 @@
<h2>Build Artifacts</h2>
<ul th:if="${!#lists.isEmpty(reportIndexes)}">
<li th:each="report : ${reportIndexes}">
<a th:href="${filesBase} + '/reports/' + ${report}" target="_blank"
rel="noopener noreferrer" th:text="'reports/' + ${report}">reports/tests/index.html</a>
<a th:href="${filesBase} + '/reports/' + ${report.path}" target="_blank"
rel="noopener noreferrer" th:text="'reports/' + ${report.path}">reports/tests/index.html</a>
<span th:if="${report.failures != null and report.failures > 0}" class="status status-failed"
th:text="${report.failures} + ' failed'">2 failed</span>
</li>
</ul>
<p th:if="${#lists.isEmpty(reportIndexes)}" class="muted">