proxmox/proxmox-notify/src
Alexander Zeidler 684ffacdf9 fix #6143: notify: allow overriding notification templates
Previously, notification templates could be modified by the user, but
these were overwritten again with installing newer package versions of
pve-manager and proxmox-backup.

Now override templates can be created cluster-wide in the path
“/etc/{pve,proxmox-backup}/notification-templates/{namespace}”, which
are used with priority. The folder structure has to be created and
populated manually (e.g. /etc/pve/notification-templates/default).

If override templates are not existing or their rendering fails, the
vendor templates in
"/usr/share/{pve-manager,proxmox-backup}/templates/default/" are used.

Sequence: [override html -> vendor html ->] override txt -> vendor txt

An error is only returned if none of the template candidates could be
used. Using an override template gets not logged.

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250321133341.151340-1-a.zeidler@proxmox.com
2025-04-08 12:25:32 +02:00
..
api api: webhook: doc: add indentation to list item 2024-12-03 13:44:05 +01:00
context fix #6143: notify: allow overriding notification templates 2025-04-08 12:25:32 +02:00
endpoints notify: gotify: use constant from http crate for 'Authorization' header 2025-03-25 19:37:37 +01:00
renderer fix #6143: notify: allow overriding notification templates 2025-04-08 12:25:32 +02:00
config.rs notify: migrate from log to tracing 2024-12-05 13:22:24 +01:00
filter.rs notify: replace filters and groups with matcher-based system 2023-11-17 08:31:36 +01:00
group.rs notify: replace filters and groups with matcher-based system 2023-11-17 08:31:36 +01:00
lib.rs notify: migrate from log to tracing 2024-12-05 13:22:24 +01:00
matcher.rs notify: migrate from log to tracing 2024-12-05 13:22:24 +01:00
schema.rs notify: replace filters and groups with matcher-based system 2023-11-17 08:31:36 +01:00