From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Lukas Wagner <l.wagner@proxmox.com>
Subject: [pve-devel] applied: [PATCH proxmox] notify: make template rendering helpers more robust
Date: Fri, 25 Aug 2023 15:35:19 +0200 [thread overview]
Message-ID: <a71c892c-7d1e-4e1d-8b5d-30e285bf523c@proxmox.com> (raw)
In-Reply-To: <20230825113557.496234-1-l.wagner@proxmox.com>
Am 25/08/2023 um 13:35 schrieb Lukas Wagner:
> This commit has the aim of making template rendering a bit more
> robust. It does so by a.) Accepting also strings for helpers that
> expect a number, parsing the number if needed, and b.) Ignoring errors
> if a template helper fails to render a value and showing an error in
> the logs, instead of failing to render the whole template (leading
> to no notification being sent).
>
> Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
> ---
>
> proxmox-notify/examples/render.rs | 2 +-
> proxmox-notify/src/renderer/html.rs | 2 +-
> proxmox-notify/src/renderer/mod.rs | 58 ++++++++++++++++++------
> proxmox-notify/src/renderer/plaintext.rs | 4 +-
> 4 files changed, 49 insertions(+), 17 deletions(-)
>
>
applied, thanks!
prev parent reply other threads:[~2023-08-25 13:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 11:35 [pve-devel] " Lukas Wagner
2023-08-25 13:35 ` Thomas Lamprecht [this message]
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=a71c892c-7d1e-4e1d-8b5d-30e285bf523c@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=l.wagner@proxmox.com \
--cc=pve-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.