Am 09.04.24 um 15:25 schrieb Lukas Wagner: > The notification system uses handlebar templates to render the subject > and the body of notifications. Previously, the template strings were > defined inline at the call site. This patch series extracts the templates > into template files and installs them at > /usr/share/proxmox-ve/templates/default > > where they stored as <template-name>-{body,subject}.{txt,html}.hbs > > The 'default' part in the path is a preparation for translated > notifications and/or overridable notification templates. > Future work could provide notifications translated to e.g. German > in `templates/de` or similar. This will be a first for having > translated strings on the backend-side, so there is need for further > research. > > The patches for `proxmox` also include some preparatory patches for > the upcoming integration of the notification system into PBS. They > are not needed for PVE, but I included them here since Folke and I > tested the PVE changes with them applied. IMO they should just be > applied with the same version bump. > The list of optional, preparatory patches is: > notify: give each notification a unique ID > notify: api: add get_targets > notify: derive `api` for Deleteable*Property > notify: derive Deserialize/Serialize for Notification struct > notify: pbs context: include nodename in default sendmail author > notify: renderer: add relative-percentage helper from PBS > > Folke kindly did some off-list testing before this was posted, hence > his T-bs were included. > > Bumps/dependencies: > - proxmox_notify > - libproxmox-rs-perl/libpve-rs-perl (needs bumped proxmox_notify) > - libpve-notify-perl (needs bumped > libproxmox-rs-perl/libpve-rs-perl) > - pve-ha-manager (needs bumped libpve-notify-perl) > - pve-manager (needs bumped libpve-notify-perl) > - proxmox-mail-forward (optional. should not be affected by any > changes, but I think > it should be also be bumped for any larger proxmox_notify changes to > avoid any > weird hidden regressions due to mismatches of proxmox_notify >
Versioned breaks required: - new pve-cluster will break old pve-manager and old pve-ha-manager - new libproxmox-rs-perl/libpve-rs-perl will break old pve-cluster Still not too sure about putting the templates in /usr/share/proxmox-ve/, but maybe @Thomas or @Fabian can chime in on that. While I'm rather unfamiliar with the code and not much into Rust, everything looked good to me (just a few nits). So, with a grain of salt: Reviewed-by: Fiona Ebner <f.eb...@proxmox.com> _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel