From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api/docs v4] fix #4211: convert quarantine link mail to template
Date: Mon, 14 Oct 2024 20:05:46 +0200 [thread overview]
Message-ID: <20241014180549.27671-1-s.ivanov@proxmox.com> (raw)
This series is a continuation of Christoph's excellent work from:
https://lore.proxmox.com/pmg-devel/20241008111753.831405-1-c.heiss@proxmox.com/T/#t
basically I wondered if/how it'd be easily possible to send only text/plain
reports or let the admin's add those additionally, w/o needing to
touch the code (by simply putting a fitting template in /etc/pmg/templates)
instead of sending half-thought through suggestions as reply I went ahead
and tried adapting the code.
changes from Christoph's v3:
* make it possible to send text/plain only mails (by
`touch /etc/pmg/template/<html-template>.tt (and providing a fitting
plaintext template)
* reworking finalize_report, and keeping its current signature (not a
benefit in itself, but was a side-effect
I considered moving add a `.html.tt` suffix to the current templates (while
still checking the `.tt` ones to not ignore a modification on a user's system),
to keep the symmetry (`.html.tt`, `.plain.tt`), but decided to drop this
to create less churn.
@Christoph - hope the attribution of your work with a Co-developed-by
trailer[0] is ok (glad to change that if you prefer something else)?
[0] https://docs.kernel.org/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by
pmg-api:
Christoph Heiss (1):
fix #4211: convert quarantine link mail to template
Stoiko Ivanov (1):
utils: allow specifying plain and/or html for finalize_report()
src/Makefile | 2 +
src/PMG/API2/Quarantine.pm | 19 +++----
src/PMG/Backup.pm | 2 +-
src/PMG/CLI/pmgqm.pm | 6 +-
src/PMG/CLI/pmgreport.pm | 2 +-
src/PMG/Utils.pm | 77 ++++++++++++++++++++++----
src/templates/quarantine-link.plain.tt | 6 ++
src/templates/quarantine-link.tt | 13 +++++
8 files changed, 98 insertions(+), 29 deletions(-)
create mode 100644 src/templates/quarantine-link.plain.tt
create mode 100644 src/templates/quarantine-link.tt
pmg-docs:
Christoph Heiss (1):
pmgconfig: document support for html and plain-text email templates
pmgconfig.adoc | 8 ++++++++
1 file changed, 8 insertions(+)
--
2.39.5
_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
next reply other threads:[~2024-10-14 18:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 18:05 Stoiko Ivanov [this message]
2024-10-14 18:05 ` [pmg-devel] [PATCH pmg-api v4 1/2] utils: allow specifying plain and/or html for finalize_report() Stoiko Ivanov
2024-10-14 18:05 ` [pmg-devel] [PATCH pmg-api v4 2/2] fix #4211: convert quarantine link mail to template Stoiko Ivanov
2024-10-14 18:05 ` [pmg-devel] [PATCH pmg-docs v4 1/1] pmgconfig: document support for html and plain-text email templates Stoiko Ivanov
2024-10-21 10:08 ` [pmg-devel] [PATCH pmg-api/docs v4] fix #4211: convert quarantine link mail to template Christoph Heiss
2024-12-10 19:16 ` [pmg-devel] applied-series: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241014180549.27671-1-s.ivanov@proxmox.com \
--to=s.ivanov@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal