From bd4b226953a660dbb4c53c5490e56c477d143869 Mon Sep 17 00:00:00 2001 From: Mikhail Yenuchenko Date: Mon, 3 Aug 2026 21:41:52 +0300 Subject: [PATCH] panel: match monitoring URLs to their nav labels /sendlog -> /deliveries, /queue -> /mail-queue, /logtail -> /system-log, along with the HTMX polling fragments under each. Co-Authored-By: Claude Opus 5 --- CHANGELOG.md | 7 +++++++ docs/documentation-plan.md | 4 ++-- internal/web/middleware.go | 3 ++- internal/web/templates/layout.html | 6 +++--- internal/web/templates/logtail_body.html | 2 +- internal/web/templates/queue_body.html | 2 +- internal/web/templates/sendlog.html | 2 +- internal/web/templates/sendlog_rows.html | 6 +++--- internal/web/templates/status_body.html | 2 +- internal/web/templates_test.go | 4 ++-- internal/web/web.go | 12 ++++++------ test/e2e/panel_client.go | 4 ++-- 12 files changed, 31 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31fb9e4..264c3a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); version ## [Unreleased] +### Changed + +- panel: the three monitoring pages now live at URLs that match their nav + labels — Deliveries at `/deliveries` (was `/sendlog`), Mail queue at + `/mail-queue` (was `/queue`), System log at `/system-log` (was `/logtail`). + Bookmarks to the old paths stop working. + ## [0.2.0] - 2026-08-03 - panel: every authenticated page now ends with the running version diff --git a/docs/documentation-plan.md b/docs/documentation-plan.md index 8c5a858..257714e 100644 --- a/docs/documentation-plan.md +++ b/docs/documentation-plan.md @@ -77,8 +77,8 @@ 1. **Нет раздела «эксплуатация»** — прямое требование ТЗ 11 п. 7 ([specification.md:427](specification.md)). В README нет ни слова про - `/status` (проверки PTR/hostname), `/sendlog` (журнал отправки, фильтры), - `/queue` (очередь Postfix), `/logtail` (хвост `mail.log`), `/reload`, + `/status` (проверки PTR/hostname), `/deliveries` (журнал отправки, фильтры), + `/mail-queue` (очередь Postfix), `/system-log` (хвост `mail.log`), `/reload`, `/account`, `/backup` — при том что всё это реализовано ([internal/web/web.go:152](../internal/web/web.go:152)–188). Не описана и процедура апгрейда (бамп тега → `docker compose up -d`), хотя раздел diff --git a/internal/web/middleware.go b/internal/web/middleware.go index 5af4c90..548d8ef 100644 --- a/internal/web/middleware.go +++ b/internal/web/middleware.go @@ -15,7 +15,8 @@ const usernameKey ctxKey = 0 // // It also extends the sliding session (plan B.1) on activity, defined as // everything except a GET request carrying HX-Request: the four monitoring -// fragments (/status/fragment, /queue/body, /logtail/body, /sendlog/rows) +// fragments (/status/fragment, /mail-queue/body, /system-log/body, +// /deliveries/rows) // poll every 5s regardless of whether anyone is looking at the tab, so // counting those as activity would make "N days idle" mean "N days since a // browser tab was last open" instead. diff --git a/internal/web/templates/layout.html b/internal/web/templates/layout.html index 87899cc..2e6d6d5 100644 --- a/internal/web/templates/layout.html +++ b/internal/web/templates/layout.html @@ -38,9 +38,9 @@
diff --git a/internal/web/templates/logtail_body.html b/internal/web/templates/logtail_body.html index 80ac0f2..3a4fc10 100644 --- a/internal/web/templates/logtail_body.html +++ b/internal/web/templates/logtail_body.html @@ -1,5 +1,5 @@ {{define "logtail_body"}} -
+
{{if .Error}}

{{.Error}}

{{end}} {{if .Lines}}{{range .Lines}}{{.}} {{end}}{{else}}No log lines yet.{{end}} diff --git a/internal/web/templates/queue_body.html b/internal/web/templates/queue_body.html index 90c56a0..29ece73 100644 --- a/internal/web/templates/queue_body.html +++ b/internal/web/templates/queue_body.html @@ -1,5 +1,5 @@ {{define "queue_body"}} -
+
{{if .Error}}

{{.Error}}

{{end}} {{if .Output}}{{.Output}}{{else}}Queue is empty.{{end}}
diff --git a/internal/web/templates/sendlog.html b/internal/web/templates/sendlog.html index 30655f0..d85a162 100644 --- a/internal/web/templates/sendlog.html +++ b/internal/web/templates/sendlog.html @@ -3,7 +3,7 @@

Filter

-
+