From bda07ae16371976e9344aefa23c6f53d8c086f23 Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Sun, 8 Nov 2026 18:17:01 +0100 Subject: [PATCH] Fold the certificate's order log away The log of the last issuing run is only of interest when something went wrong. It is a collapsed section now, open when the last run failed. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F --- pkgs/router-webui/certificate.go | 5 ++++- pkgs/router-webui/templates/certificate.html | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/router-webui/certificate.go b/pkgs/router-webui/certificate.go index babc954..aa9b027 100644 --- a/pkgs/router-webui/certificate.go +++ b/pkgs/router-webui/certificate.go @@ -188,6 +188,7 @@ type certificateData struct { Errors FormErrors Providers []DNSProvider Status string // the order's last result + Failed bool // the last order did not succeed: the log is shown open Log string } @@ -214,7 +215,9 @@ func (a *app) certificateData(s Settings, f ACMEForm, errs FormErrors) certifica if first := splitList(f.Domains); len(first) > 0 && s.acme().Enabled { unit := "acme-order-renew-" + strings.ToLower(first[0]) + ".service" if st := unitProperty(unit, "ActiveState"); st != "" { - d.Status = st + ", result " + unitProperty(unit, "Result") + res := unitProperty(unit, "Result") + d.Status = st + ", result " + res + d.Failed = res != "success" || st == "failed" d.Log, _ = command("journalctl", "--no-pager", "-o", "cat", "-n", "15", "-u", unit) } } diff --git a/pkgs/router-webui/templates/certificate.html b/pkgs/router-webui/templates/certificate.html index 2b5bdec..1740ea3 100644 --- a/pkgs/router-webui/templates/certificate.html +++ b/pkgs/router-webui/templates/certificate.html @@ -37,11 +37,11 @@ -
-

Ordering

+ + Issuing and renewal log{{if .Failed}} (the last run failed){{end}} {{if .Status}}

{{.Status}}

{{if .Log}}
{{.Log}}
{{end}} {{else}}

Nothing yet. After you save and apply, the router orders the certificate (a minute or two); renewals follow 30 days before it expires and need no restart.

{{end}} -
+ {{end}} {{end}}