cb2b104e63
The Lanes page now projects store.LatestLanePasses and the owner-window outcomes (store.LanePassOutcomes) into per-Site rows instead of reading an in-memory Poller snapshot, so a deploy answers the instant the store is up. Browser configuration is a config fact and reachability is derived from recent browser-Site passes inside latest.RefuseBackoff. This atomically deletes the in-memory path in the same commit that makes the page read the DB: latest/status.go (LaneState, Status, LaneStatus, recordLaneState) and the web.LaneReporter seam plus fakeLanes are gone, and latest.refuseBackoff is renamed latest.RefuseBackoff at every callsite. ownerWindow (#142) is referenced, never declared (contract C2)
44 lines
2.2 KiB
HTML
44 lines
2.2 KiB
HTML
{{/* Poll Lane status: one row per Site's latest durable pass, refreshing
|
|
itself so a run can be watched rather than sampled by reloading. The
|
|
refresh is one attribute on the fragment root and the endpoint answers
|
|
with this same fragment, so the swap replaces the element that asked.
|
|
|
|
Every figure is read from poll_passes, never from a running poller: a
|
|
restart answers from the database the moment it is up (issue #145). The
|
|
browser fact is a deployment-config fact plus a reachability derived from
|
|
the pass log; the cause chips and the state phrase are decided in Go,
|
|
this template only prints them. */}}
|
|
{{define "lanes"}}
|
|
<section class="lanes" id="lanes"
|
|
hx-get="/ui/admin/lanes" hx-trigger="every 30s" hx-swap="outerHTML">
|
|
<div class="sechead">
|
|
<h2 class="sec">Poll Lanes</h2>
|
|
<p class="statusline">
|
|
{{if .PollerOff}}Polling is switched off in this deployment: no Lane
|
|
runs, and Latest Chapter comes from the userscripts alone.
|
|
{{else}}Browser: {{if not .BrowserConfigured}}<span class="mark-faint">not configured</span>{{else if .BrowserReachable}}<span class="mark mark-strong">reachable</span>{{else}}<span class="mark mark-strong bad">unreachable</span>{{end}}{{end}}
|
|
</p>
|
|
</div>
|
|
{{if .Rows}}
|
|
<div class="tbl lanes">
|
|
<div class="thead">
|
|
<span>Site</span><span>Due</span><span>Checked</span><span>Gap</span>
|
|
<span>Last pass</span><span>Outcomes · state</span><span></span>
|
|
</div>
|
|
{{range .Rows}}
|
|
<div class="trow{{if .Attention}} attention{{end}}">
|
|
<span class="c-site">{{.Site}}</span>
|
|
<span>{{.Due}}</span>
|
|
<span>{{.Checked}}</span>
|
|
<span>{{.Gap}}</span>
|
|
<span>ran {{.Ran}}</span>
|
|
<span class="c-skip">{{if .HasChips}}{{range $i, $c := .Chips}}{{if $i}}<span class="mark-faint"> · </span>{{end}}<span class="mark">{{$c.Name}} {{$c.Count}}</span>{{end}}{{else}}<span class="mark-faint">none observed</span>{{end}}{{if .StatePhrase}} · <span class="{{if .StateGood}}ok{{else}}bad{{end}}">{{.StatePhrase}}</span>{{end}}</span>
|
|
<span class="c-ctrl"></span>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{else}}
|
|
<p class="empty">No data yet — no Lane has recorded a pass.</p>
|
|
{{end}}
|
|
</section>
|
|
{{end}} |