updated artifact links: added target="_blank" and rel="noopener noreferrer" to ensure external logs and reports open in a new tab; updated docs and tests accordingly
This commit is contained in:
@@ -80,3 +80,7 @@ Deviation: the listing enumerates origin branches instead of legacy's local bran
|
||||
|
||||
Addendum (2026-07-07): the legacy per-page reload button (`⟳`, top right) was also re-added on request, next to the live indicator.
|
||||
On polling pages it triggers an immediate data refresh via the page's poller; pages without a poller (artifact index) reload fully.
|
||||
|
||||
Addendum (2026-07-07): all links that leave the GitTally UI open in a new tab (`target="_blank" rel="noopener noreferrer"`).
|
||||
This already held for Gitea branch/commit links and the footer; it was added for the artifact page's log and report links, whose targets have no navigation.
|
||||
Links between GitTally pages (nav, artifact index) stay in the same tab.
|
||||
|
||||
@@ -45,7 +45,8 @@
|
||||
<h2>Logs</h2>
|
||||
<ul th:if="${!#lists.isEmpty(logs)}">
|
||||
<li th:each="log : ${logs}">
|
||||
<a th:href="'/artifacts/' + ${artifactKey} + '/' + ${log}" th:text="${log}">build.log</a>
|
||||
<a th:href="'/artifacts/' + ${artifactKey} + '/' + ${log}" target="_blank"
|
||||
rel="noopener noreferrer" th:text="${log}">build.log</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p th:if="${#lists.isEmpty(logs)}" class="muted">
|
||||
@@ -56,8 +57,8 @@
|
||||
<h2>Build Artifacts</h2>
|
||||
<ul th:if="${!#lists.isEmpty(reportIndexes)}">
|
||||
<li th:each="report : ${reportIndexes}">
|
||||
<a th:href="'/artifacts/' + ${artifactKey} + '/reports/' + ${report}"
|
||||
th:text="'reports/' + ${report}">reports/tests/index.html</a>
|
||||
<a th:href="'/artifacts/' + ${artifactKey} + '/reports/' + ${report}" target="_blank"
|
||||
rel="noopener noreferrer" th:text="'reports/' + ${report}">reports/tests/index.html</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p th:if="${#lists.isEmpty(reportIndexes)}" class="muted">
|
||||
|
||||
@@ -210,10 +210,11 @@ class UiControllerTest : FunSpec() {
|
||||
.perform(get("/builds/main-abc123-key"))
|
||||
.andExpect(status().isOk)
|
||||
.andExpect(content().string(containsString("./gradlew --console=plain --no-daemon test")))
|
||||
.andExpect(content().string(containsString("/artifacts/main-abc123-key/build.stdout.log")))
|
||||
.andExpect(content().string(containsString("""/artifacts/main-abc123-key/build.stdout.log" target="_blank"""")))
|
||||
.andExpect(content().string(containsString("/artifacts/main-abc123-key/build.stderr.log")))
|
||||
.andExpect(content().string(containsString("reports/tests/test/index.html")))
|
||||
.andExpect(content().string(not(containsString("reports/tests/test/packages/index.html"))))
|
||||
.andExpect(
|
||||
content().string(containsString("""/artifacts/main-abc123-key/reports/tests/test/index.html" target="_blank"""")),
|
||||
).andExpect(content().string(not(containsString("reports/tests/test/packages/index.html"))))
|
||||
}
|
||||
|
||||
test("artifact index of a pruned build explains the missing artifacts") {
|
||||
|
||||
Reference in New Issue
Block a user