public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH cluster/ha-manager/manager v2 0/6] preparation for #6143: notification template cleanup
@ 2025-03-28 10:19 Lukas Wagner
  2025-03-28 10:19 ` [pve-devel] [PATCH pve-cluster v2 1/1] notify: add common_template_data Lukas Wagner
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Lukas Wagner @ 2025-03-28 10:19 UTC (permalink / raw)
  To: pve-devel

With [#6143] on the horizon, notification templates, template variables
and template helpers become part of our public API and as such
we should provide some stability guarantees for them.
As a result, we use this opportunity to do a 'final' cleanup.

This series:
  - adds some common template vars for all notifications
    - hostname
    - fqdn
    - cluster-name
  - For HTML tables, we move the table generation to the handlebars template
    instead of using the {{ table }} helper. This gives users a
    better starting point for their changes (styling, structure).
    The plaintext version still uses the helper, mostly due to the
    fact that the helper automatically determines appropriate
    column widths
  - changes the names of some template variables for better clarity
  - For fencing notifications, we stop dumping status data as JSON
    to the notification and instead try to render it nicely, trying
    to include all useful info from the former JSON dump

Bumps:

The patches for pve-manager and pve-ha-manager must depend on a bumped
libpve-notify-perl due to the new 'PVE::Notify::common_template_data'
helper.

Changes since v1:
  - Use PVE::Tools::get_fqdn helper to get the FQDN (thx Thomas)

pve-cluster:

Lukas Wagner (1):
  notify: add common_template_data

 src/PVE/Notify.pm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)


pve-manager:

Lukas Wagner (4):
  notification templates: vzdump: generate HTML table in template
  notifications: apt: clean up notification template
  notification: replication: add common properties to template data
  notifications: test: style fixup

 PVE/API2/APT.pm                               | 27 ++++++++-----------
 PVE/API2/Replication.pm                       | 16 +++++------
 PVE/VZDump.pm                                 | 21 +++++++--------
 .../default/package-updates-body.html.hbs     | 15 ++++++++++-
 .../default/package-updates-body.txt.hbs      |  2 +-
 .../default/package-updates-subject.txt.hbs   |  2 +-
 templates/default/replication-body.txt.hbs    |  2 +-
 templates/default/test-body.html.hbs          |  2 +-
 templates/default/vzdump-body.html.hbs        | 24 +++++++++++++++--
 templates/default/vzdump-body.txt.hbs         |  2 +-
 templates/default/vzdump-subject.txt.hbs      |  2 +-
 11 files changed, 69 insertions(+), 46 deletions(-)


pve-ha-manager:

Lukas Wagner (1):
  notifications: overhaul fence notification

 src/PVE/HA/NodeStatus.pm                      | 43 +++++++++++++++----
 src/PVE/HA/Sim/Env.pm                         |  8 ++--
 src/templates/default/fencing-body.html.hbs   | 43 ++++++++++++++++---
 src/templates/default/fencing-body.txt.hbs    | 40 +++++++++++++----
 src/templates/default/fencing-subject.txt.hbs |  6 ++-
 5 files changed, 111 insertions(+), 29 deletions(-)


Summary over all repositories:
  17 files changed, 207 insertions(+), 75 deletions(-)

-- 
Generated by git-murpp 0.8.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

end of thread, other threads:[~2025-04-04 18:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-28 10:19 [pve-devel] [PATCH cluster/ha-manager/manager v2 0/6] preparation for #6143: notification template cleanup Lukas Wagner
2025-03-28 10:19 ` [pve-devel] [PATCH pve-cluster v2 1/1] notify: add common_template_data Lukas Wagner
2025-04-04 10:15   ` [pve-devel] applied: " Thomas Lamprecht
2025-03-28 10:19 ` [pve-devel] [PATCH pve-manager v2 1/4] notification templates: vzdump: generate HTML table in template Lukas Wagner
2025-03-28 10:19 ` [pve-devel] [PATCH pve-manager v2 2/4] notifications: apt: clean up notification template Lukas Wagner
2025-03-28 10:19 ` [pve-devel] [PATCH pve-manager v2 3/4] notification: replication: add common properties to template data Lukas Wagner
2025-03-28 10:19 ` [pve-devel] [PATCH pve-manager v2 4/4] notifications: test: style fixup Lukas Wagner
2025-03-28 10:19 ` [pve-devel] [PATCH pve-ha-manager v2 1/1] notifications: overhaul fence notification Lukas Wagner
2025-04-04 18:25   ` [pve-devel] applied: " Thomas Lamprecht
2025-04-04 18:27 ` [pve-devel] applied-series: [PATCH cluster/ha-manager/manager v2 0/6] preparation for #6143: notification template cleanup Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal