cf7587754f
The delivery page was a list of the fields the send-log table has no column for, stacked one per line down the reading measure. Six values of a few characters each — domain, application, queue id, journal id and two timestamps — came to a page of mostly empty rows, and none of them answered the question the log raises when a row is opened: what actually happened to this message. So the page states that instead. The subject heads it and the sender, recipient and outcome are the line under it, which puts what the message was and how it ended on the first line. Below, two columns: what the journal recorded on the left, as a grid of tiles rather than a stack, and on the right the two timestamps stated as the steps they stand for — accepted and queued, then delivered, deferred, bounced, or refused before queueing. Each step carries its status in the panel's own ok/warn/error/unknown vocabulary, so a colour means here what it means on the status page. A message still queued shows the report it is waiting for as a step that has not happened, rather than dating it with the moment the row was written. Under both, at full width, the mail.log lines for the message's queue id. The queue id was printed on this page as something to go and search the system log for by hand; logtail.QueueLines does that search. It scans a bounded tail of the current file — finding one message's lines means reading rather than seeking — and anchors the match on the character before the id, since queue ids are hexadecimal runs and a shorter one is regularly the tail of a longer one. Send-log rows outlive mail.log (retention ninety days, rotation fourteen files), so a message with nothing left to show says so; that is the normal end state, not a fault, and only a log that cannot be read at all is reported as one. Two cards abreast and a block of raw log lines do not fit the reading measure, so the page now declares itself wide — the opposite of what it did when the column width was unified, where it was the page that stayed prose. The mechanism is unchanged and is why the reversal costs one line: how wide a page needs to be is the page's own property, not the navigation entry's. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
32 lines
1.1 KiB
HTML
32 lines
1.1 KiB
HTML
{{/* The send log is six columns of addresses, subjects and timestamps, so this
|
|
page takes the whole column rather than the reading measure (see the "wide"
|
|
block in layout.html). It is declared per page rather than per page name
|
|
because how wide a page needs to be is a property of that page, not of the
|
|
navigation entry several pages share. */}}
|
|
{{define "wide"}}wide{{end}}
|
|
|
|
{{define "content"}}
|
|
<h1>Deliveries</h1>
|
|
|
|
<div class="card">
|
|
<h2>Filter</h2>
|
|
<form method="get" action="/deliveries">
|
|
<label for="domain">Domain</label>
|
|
<select id="domain" name="domain">
|
|
<option value="">All domains</option>
|
|
{{range .FilterDomains}}<option value="{{.}}" {{if eq . $.FilterDomain}}selected{{end}}>{{.}}</option>{{end}}
|
|
</select>
|
|
<label for="app">Application</label>
|
|
<select id="app" name="app">
|
|
<option value="">All applications</option>
|
|
{{range .FilterApps}}<option value="{{.}}" {{if eq . $.FilterApp}}selected{{end}}>{{.}}</option>{{end}}
|
|
</select>
|
|
<button type="submit">Filter</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="card">
|
|
{{template "deliveries_rows" .}}
|
|
</div>
|
|
{{end}}
|