all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH pmg-api/docs v4] fix #4211: convert quarantine link mail to template
@ 2024-10-14 18:05 Stoiko Ivanov
  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
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Stoiko Ivanov @ 2024-10-14 18:05 UTC (permalink / raw)
  To: pmg-devel

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-12-10 19:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-14 18:05 [pmg-devel] [PATCH pmg-api/docs v4] fix #4211: convert quarantine link mail to template Stoiko Ivanov
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

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