#142: series list page with eight hygiene filters, site/library narrowing, paging

This commit is contained in:
2026-08-21 19:40:45 +07:00
parent 503fb49d0a
commit e8a3c5f826
8 changed files with 832 additions and 18 deletions
+8 -8
View File
@@ -18,6 +18,11 @@ type LaneReporter interface {
LaneStatus() latest.Status
}
// ownerWindow is the staleness boundary the Series list's "not checked in
// 12h" filter compares against, and the same twelve hours the landing page's
// figures share. Declared once; later admin tickets read it.
const ownerWindow = 12 * time.Hour
// adminView is the shared shell data for an administrative page and the roster
// fragment returned after a Reader action.
type adminView struct {
@@ -25,8 +30,9 @@ type adminView struct {
Readers []store.ReaderSummary
// OwnerID travels with the roster so it can tell the owner's own row from
// the Readers they may act on.
OwnerID int64
Lanes lanesView
OwnerID int64
Lanes lanesView
SeriesList seriesListView
}
// lanesView is the Lane status block: one row per Site that has run, plus the
@@ -142,12 +148,6 @@ func (h *Handler) adminReaders(w http.ResponseWriter, r *http.Request) {
h.renderAdmin(w, adminView{Page: "readers", Readers: readers, OwnerID: h.store.OwnerID()})
}
// adminSeries renders the Series shell. Its data arrives in a later admin
// ticket.
func (h *Handler) adminSeries(w http.ResponseWriter, r *http.Request) {
h.renderAdmin(w, adminView{Page: "series"})
}
func (h *Handler) renderAdmin(w http.ResponseWriter, view adminView) {
h.render(w, http.StatusOK, "admin", view)
}