inbound-antispam-panel: Inbound log, Why as a sheet; no Deny on a Postfix reject
Follows the two design commits before it (owner's decisions quoted there). Kit: a new component, Sheet / SheetRow (components.go), partials sheet_tag and sheet (components.html), its rules in panel.css as in theme.css, and its sample on the kit page next to status_tag. It is the browser's popover: no script. Inbound log: the Why column is gone; the decision tag opens a sheet with who decided, then either the filter's verdict and its symbols one a line (a detail the journal milter wrote) or the reply (a detail the tailer read from mail.log - it starts with its code), and the subject whole. The sheet's id is the journal row's. A row Postfix itself refused no longer links to the filter lists. Tests: the page fixture and view tests for the sheet's markup and content (TestWhyRows), the link rule, three Deny and two Allow on the mockup's six rows; e2e reads "Decided by" and "Reply" from the sheet and wants no sender link on the refused row. Seen: the fixture page with a sheet open, headless Edge at 1360 px - the same as the accepted drawing. Checked on the test server, uncommitted tree: go vet ./... ok, go test ./... ok (22 packages), make e2e ok. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -90,7 +90,7 @@ func (h *Handlers) HandleInboundLog(w http.ResponseWriter, r *http.Request) {
|
||||
table := make([]view.InLogRow, len(rows))
|
||||
for i, row := range rows {
|
||||
table[i] = out.NewRow(view.InLogRowInput{
|
||||
At: row.CreatedAt, From: row.From, Client: row.ClientIP, To: row.To, Subject: row.Subject,
|
||||
ID: row.ID, At: row.CreatedAt, From: row.From, Client: row.ClientIP, To: row.To, Subject: row.Subject,
|
||||
Decision: row.Decision, Engine: row.Engine, Detail: row.Detail,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -94,9 +94,9 @@ func TestInboundLogForTheGlobalRole(t *testing.T) {
|
||||
`Rows older than 30 days are deleted — change that in <a href="/server/settings">Settings</a>.`,
|
||||
`alice@<wbr>a.example.com`, `bob@<wbr>b.example.com`, `Hello A`, `Hello B`,
|
||||
`<option value="a.example.com">a.example.com</option>`, `<option value="b.example.com">b.example.com</option>`,
|
||||
`<span class="tag is-success is-light">accept</span>`, `<span class="tag is-primary is-light">quarantine</span>`,
|
||||
`class="tag is-success is-light" popovertarget="why-`, `class="tag is-primary is-light" popovertarget="why-`,
|
||||
`<span class="sp-mono sp-muted sp-small">203.0.113.9</span>`,
|
||||
`rspamd · detail of Hello A`,
|
||||
`<tr><th>Decided by</th><td>rspamd</td></tr><tr><th>Verdict</th><td>detail of Hello A</td></tr>`,
|
||||
`<a href="/inbound/filter-lists?list=deny&kind=address&value=sender%40example.net">Deny sender</a>`,
|
||||
`<a href="/inbound/filter-lists?list=allow&kind=address&value=sender%40example.net">Allow sender</a>`,
|
||||
`Page 1 of 1`, `Allow / Deny sender opens <a href="/inbound/filter-lists">Filter lists</a>`,
|
||||
|
||||
Reference in New Issue
Block a user