panel-redesign: Server > Health; Overview reduced to verdicts; @routes off
Stage 1, step 5 - and the end of stage 1.
- GET /server/health (+ /fragment) shows every check in full and is the
home of POST .../recheck and POST .../reload, which now return there.
- GET /overview (+ /fragment) shows the overall verdict and six cards -
machine, processes, TLS certificate, queue, milter sockets, reverse DNS -
each a view.HealthCard (the typed input of the kit's health_card) that
links to its table on Health. A check that could not run is a warning,
not "ok".
- Both pages read healthChecks(), so a card and its table cannot disagree.
Until stage 2 they share the old status template, switched by a flag.
legacy_pages.txt: @routes removed. TestRoutesFollowNavigation is enforced
from here on: every path of plan section Routes is registered with its
method, no pre-2.0 path is answered, and no template links to a path the
router does not serve.
Not in this step, left for the Overview page of stage 2: the outbound and
inbound domain summaries the mockup shows under the cards.
Tests: the six cards from one reading of the checks (values, levels, links,
and the unverified case); the two modes of the page - Overview without the
tables and actions, Health with them, each polling its own fragment.
go test ./... green except the two Windows-only failures in internal/domain
and internal/logtail.
Roadmap 15/27.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,8 +3,11 @@
|
||||
{{define "wide"}}wide{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
{{/* One legacy template for two pages until stage 2 gives each its own:
|
||||
Overview (the verdicts) and Server › Health (the tables and the two
|
||||
server actions). .Overview says which one this is. */}}
|
||||
<div class="page-head">
|
||||
<h1>Status</h1>
|
||||
<h1>{{if .Overview}}Overview{{else}}Health{{end}}</h1>
|
||||
<label class="help-link" for="help-status" title="What these checks mean">?</label>
|
||||
</div>
|
||||
|
||||
@@ -12,6 +15,7 @@
|
||||
|
||||
{{template "status_body" .}}
|
||||
|
||||
{{if not .Overview}}
|
||||
<div class="card" id="configuration">
|
||||
<h2>Configuration</h2>
|
||||
<p class="muted">Regenerates the OpenDKIM and Postfix configuration from the
|
||||
@@ -24,3 +28,4 @@
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
{{define "status_body"}}
|
||||
{{if .Overview}}
|
||||
{{/* Overview: one verdict per check, each leading to its table on Health. */}}
|
||||
<div id="status-body" data-poll aria-live="polite" hx-get="/overview/fragment" hx-trigger="load" hx-swap="outerHTML">
|
||||
<div class="card" id="overall">
|
||||
<h2>Overall <span class="st st-{{.OverallStatus}}">{{.OverallStatus}}</span></h2>
|
||||
<p class="muted">{{.OverallHeading}} <a href="/server/health">All details</a></p>
|
||||
</div>
|
||||
<div class="card" id="verdicts">
|
||||
<h2>Server health</h2>
|
||||
<table>
|
||||
<thead><tr><th>Check</th><th>Verdict</th><th>Detail</th></tr></thead>
|
||||
<tbody>
|
||||
{{range .Cards}}
|
||||
<tr>
|
||||
<td><a href="{{.Href}}">{{.Name}}</a></td>
|
||||
<td><span class="st st-{{if eq .Level "fail"}}error{{else if eq .Level "warn"}}warn{{else}}ok{{end}}">{{.Value}}</span></td>
|
||||
<td class="muted">{{.Sub}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div id="status-body" data-poll aria-live="polite" hx-get="/server/health/fragment" hx-trigger="load" hx-swap="outerHTML">
|
||||
<div class="card" id="overall">
|
||||
<h2>Overall <span class="st st-{{.OverallStatus}}">{{.OverallStatus}}</span></h2>
|
||||
<p class="muted">{{.OverallHeading}}</p>
|
||||
@@ -127,3 +151,4 @@
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user