Show an unreachable origin in the web UI (step 19)
A watcher that cannot fetch leaves the server perfectly reachable and every branch row stale — a calm list that implies nothing changed. The state was already recorded and served at /api/watcher; only nothing rendered it. The banner lives in the shared nav fragment, so every view inherits it, and is fed from the view's own polling tick without being chained to it. It stays separate from live-indicator: that one reports whether the browser reaches the server, this one whether the server reaches origin. Also caps the log volume the outage exposed: a lasting fetch failure is logged when its message changes, not on every cycle, and the recovery is logged once. Same for an invalid atTimes slot. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
18a41e9ced
commit
0193386642
@@ -16,7 +16,8 @@
|
||||
<span class="repo-name" th:unless="${#strings.isEmpty(repoName)}" th:text="${repoName}">owner/repo</span>
|
||||
</h1>
|
||||
|
||||
<div th:fragment="nav(view)" class="view-row">
|
||||
<th:block th:fragment="nav(view)">
|
||||
<div class="view-row">
|
||||
<nav class="view-toggle">
|
||||
<span th:if="${view == 'latest'}">Latest</span>
|
||||
<a th:unless="${view == 'latest'}" href="/">Latest</a>
|
||||
@@ -33,6 +34,10 @@
|
||||
<button id="reload-button" class="reload-button" type="button" title="Reload view" aria-label="Reload view">⟳</button>
|
||||
</span>
|
||||
</div>
|
||||
<!-- Filled by gittally.js from /api/watcher: while the watcher cannot reach origin, every
|
||||
row below is as old as its last successful poll, and a calm list would imply otherwise. -->
|
||||
<div id="watcher-banner" class="watcher-banner" role="status" hidden></div>
|
||||
</th:block>
|
||||
|
||||
<footer th:fragment="footer" class="site-footer">
|
||||
<strong><a href="/releases" title="Release notes"><em th:text="'GitTally v' + ${version}">GitTally</em></a></strong>
|
||||
|
||||
Reference in New Issue
Block a user