Re: [pve-devel] [PATCH common/cluster 0/3] fix #4937: fix utf8 encoding issues while saving notification config

2023-09-01 Thread Lukas Wagner
On 8/30/23 14:37, Lukas Wagner wrote: These patches should fix issues with certain special characters (e.g ü) in the notification configuration [1]. Before, when setting a comment for an endpoint to certain values (e.g. 'für admins'), the resulting saved configuration would contain in

[pve-devel] [PATCH manager] ui: notification: remove unneeded gettext calls

2023-09-18 Thread Lukas Wagner
'mail-to-root' is the name of the default notification target and should thus not be translated. Signed-off-by: Lukas Wagner --- www/manager6/dc/NotificationEvents.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/manager6/dc/NotificationEvents.js b/www/m

[pve-devel] [PATCH proxmox-widget-toolkit] notification config view: add missing parameter for Ext.String.format

2023-09-18 Thread Lukas Wagner
Fixes: 7e4b51 ("notification config view: fix using gettext with parameter") Signed-off-by: Lukas Wagner --- src/panel/NotificationConfigView.js | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/panel/NotificationConfigView.js b/src/panel/NotificationCon

[pve-devel] [PATCH v3 many 0/7] notifications: add SMTP endpoint

2023-09-18 Thread Lukas Wagner
oid having to rewrite mail headers (otherwise, some SMTP relays might reject the mail, because the `From` header of the forwarded mail does not match the mail account) [1] https://lists.proxmox.com/pipermail/pve-devel/2023-August/058956.html proxmox: Lukas Wagner (3): notify: fix ty

[pve-devel] [PATCH v3 pve-docs 7/7] notifications: document SMTP endpoints

2023-09-18 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 28 1 file changed, 28 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index 0b00b1e..c2fe393 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -73,9 +73,37 @@ accomodate multiple

[pve-devel] [PATCH v3 pve-manager 5/7] notify: add API routes for smtp endpoints

2023-09-18 Thread Lukas Wagner
code. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 337 ++ 1 file changed, 337 insertions(+) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index ec666903..0f9d6432 100644 --- a/PVE/API2/Cluster/Notifications.pm

[pve-devel] [PATCH v3 proxmox-widget-toolkit 6/7] panel: notification: add gui for SMTP endpoints

2023-09-18 Thread Lukas Wagner
. Signed-off-by: Lukas Wagner --- src/Makefile | 2 + src/Schema.js| 5 + src/panel/EmailRecipientPanel.js | 89 ++ src/panel/SendmailEditPanel.js | 67 ++- src/panel/SmtpEditPanel.js | 192 +++ 5

[pve-devel] [PATCH v3 proxmox 2/7] notify: add 'smtp' endpoint

2023-09-18 Thread Lukas Wagner
or that is shared between sendmail and smtp endpoints has been moved to a new `endpoints::common::mail` module. Signed-off-by: Lukas Wagner --- Cargo.toml | 1 + proxmox-notify/Cargo.toml | 4 +- proxmox-notify/src/config.rs

[pve-devel] [PATCH v3 proxmox 1/7] notify: fix typo in doc comments

2023-09-18 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index eebc57a..ca68388 100644 --- a/proxmox-notify/src/lib.rs +++ b/proxmox-notify/src/lib.rs @@ -106,7 +106,7

[pve-devel] [PATCH v3 proxmox-perl-rs 4/7] notify: add bindings for smtp API calls

2023-09-18 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/notify.rs | 110 +++ 1 file changed, 110 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index 203acca..b0a7d44 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs @@ -13,6 +13,10

[pve-devel] [PATCH v3 proxmox 3/7] notify: add api for smtp endpoints

2023-09-18 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/mod.rs | 48 + proxmox-notify/src/api/smtp.rs | 373 + 2 files changed, 421 insertions(+) create mode 100644 proxmox-notify/src/api/smtp.rs diff --git a/proxmox-notify/src/api/mod.rs b/proxmox-notify

Re: [pve-devel] [PATCH v3 many 0/7] notifications: add SMTP endpoint

2023-09-25 Thread Lukas Wagner
The notification system overhaul is available in the pvetest repository, however that does not yet include the SMTP endpoint type. Only gotify and sendmail (uses the system's sendmail command to send mails) are available so far. -- - Lukas ___ pve-

[pve-devel] [PATCH v2 proxmox 1/7] sys: fs: remove unnecessary clippy allow directive

2023-09-28 Thread Lukas Wagner
It seems like the mentioned clippy bug has since been fixed. Signed-off-by: Lukas Wagner --- proxmox-sys/src/fs/dir.rs | 4 proxmox-sys/src/fs/mod.rs | 2 -- 2 files changed, 6 deletions(-) diff --git a/proxmox-sys/src/fs/dir.rs b/proxmox-sys/src/fs/dir.rs index 6aee316..0b409d7 100644

[pve-devel] [PATCH v2 proxmox 2/7] sys: fs: let CreateOptions::apply_to take RawFd instead of File

2023-09-28 Thread Lukas Wagner
Suggested-by: Wolfgang Bumiller Signed-off-by: Lukas Wagner --- proxmox-shared-memory/src/lib.rs | 4 ++-- proxmox-sys/src/fs/file.rs | 4 ++-- proxmox-sys/src/fs/mod.rs| 9 - 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/proxmox-shared-memory/src/lib.rs b

[pve-devel] [PATCH v2 proxmox 4/7] sys: add make_tmp_dir

2023-09-28 Thread Lukas Wagner
Under the hood, this function calls `mkdtemp` from libc. Unfortunatly the nix crate did not provide bindings for this function, so we have to call into libc directly. Signed-off-by: Lukas Wagner --- Notes: Changes from v1 -> v2: - Use remove_dir instead of unlink - Log error

[pve-devel] [PATCH v2 storage/proxmox{, -perl-rs} 0/7] cache storage plugin status for pvestatd/API status update calls

2023-09-28 Thread Lukas Wagner
t/058806.html proxmox: Lukas Wagner (5): sys: fs: remove unnecessary clippy allow directive sys: fs: let CreateOptions::apply_to take RawFd instead of File sys: fs: use inline formatting for bail! macro sys: add make_tmp_dir cache: add new crate 'proxmox-shared-cache&

[pve-devel] [PATCH v2 proxmox 3/7] sys: fs: use inline formatting for bail! macro

2023-09-28 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-sys/src/fs/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox-sys/src/fs/mod.rs b/proxmox-sys/src/fs/mod.rs index 8d790a4..f54aaf6 100644 --- a/proxmox-sys/src/fs/mod.rs +++ b/proxmox-sys/src/fs/mod.rs @@ -71,12 +71,12

[pve-devel] [PATCH v2 pve-storage 7/7] stats: api: cache storage plugin status

2023-09-28 Thread Lukas Wagner
: Lukas Wagner --- Notes: Changes v1 -> v2: - Add `ignore-cache` paramter - use `get_or_update` method from Proxmox::RS::SharedCached - invalidated the cache in other cases (e.g. when allocating volumes, as this might change the amount of free space) src/PVE/API2/Stor

[pve-devel] [PATCH v2 proxmox-perl-rs 6/7] cache: add bindings for `SharedCache`

2023-09-28 Thread Lukas Wagner
These bindings are contained in the `SharedCacheBase` class, which is subclassed by `SharedCache` in Perl. The subclass was needed to implement the `get_or_update` method since that requires to call a closure as a passed parameter. Signed-off-by: Lukas Wagner --- Notes: Changes v1 ->

[pve-devel] [PATCH v2 proxmox 5/7] cache: add new crate 'proxmox-shared-cache'

2023-09-28 Thread Lukas Wagner
the cache very frequently (due to the overhead of JSON de/serialization) - Require arbitrary keys - right now, keys are limited by SAFE_ID_REGEX The cache was developed for the use in pvestatd, in order to cache e.g. storage plugin status. There, these limitations do not really play any role. Sign

[pve-devel] [PATCH proxmox-perl-rs] notify context: fix 'default_sendmail_from' context method

2023-10-02 Thread Lukas Wagner
The name of the configuration option in datacenter.cfg is `email_from` and not `mail_from`. Signed-off-by: Lukas Wagner --- Reported in our forum: https://forum.proxmox.com/threads/mail-alerts-not-sent-with-datacenter-default.134305/ pve-rs/src/notify_context.rs | 2 +- 1 file changed, 1

[pve-devel] [PATCH v2 proxmox 03/11] notify: introduce Error::Generic

2023-10-02 Thread Lukas Wagner
... as leaf error-type for anything for which we do not necessarily want a separate enum variant. Signed-off-by: Lukas Wagner --- proxmox-notify/src/lib.rs | 11 +++ 1 file changed, 11 insertions(+) diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index 7500778

[pve-devel] [PATCH v2 proxmox 02/11] sys: email: add `forward`

2023-10-02 Thread Lukas Wagner
This new function forwards an email to new recipients. Signed-off-by: Lukas Wagner --- proxmox-sys/src/email.rs | 52 +++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/proxmox-sys/src/email.rs b/proxmox-sys/src/email.rs index 8b3a1b6..c94f634

[pve-devel] [PATCH v2 pve-docs 11/11] notification: add docs for system mail forwarding

2023-10-02 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 28 +--- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index c4d2931..0b00b1e 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -19,9 +19,10 @@ such as

[pve-devel] [PATCH v2 many 00/11] notifications: feed system mails into proxmox_notify

2023-10-02 Thread Lukas Wagner
vide a pre-built deb for `mail-parser`. Changelog: - v1 -> v2: - Rebased - Apply the same fix for the PVE context as in [1] [1] https://lists.proxmox.com/pipermail/pve-devel/2023-October/059294.html debcargo-conf: Lukas Wagner (1): package mail-parser 0.8.2 src/mail-parser/d

[pve-devel] [PATCH v2 pve-manager 09/11] ui: notify: add system-mail settings, configuring mail forwarding

2023-10-02 Thread Lukas Wagner
The 'Notifications' panel in Datacenter view now features a new entry 'System mail', allowing the user to configure target and policy for mails sent to the local root user. Signed-off-by: Lukas Wagner --- www/manager6/dc/NotificationEvents.js | 27 +++

[pve-devel] [PATCH v2 pve-cluster 08/11] datacenter config: add new parameters for system mail forwarding

2023-10-02 Thread Lukas Wagner
This commit adds two new paramters to the 'notify' property string: - 'system-mail': Determine whether mails to root should be forwarded by the notification system - 'system-mail-target': Determine the target to which the notification should be forwa

[pve-devel] [PATCH v2 proxmox 04/11] notify: add mechanisms for email message forwarding

2023-10-02 Thread Lukas Wagner
attempt to transform the HTML into readable plain text. Signed-off-by: Lukas Wagner --- Cargo.toml | 1 + proxmox-notify/Cargo.toml| 2 + proxmox-notify/src/endpoints/gotify.rs | 21 +++-- proxmox-notify/src/endpoints/sendmail.rs | 62

[pve-devel] [PATCH v2 debcargo-conf 01/11] package mail-parser 0.8.2

2023-10-02 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/mail-parser/debian/changelog | 6 ++ src/mail-parser/debian/copyright | 49 .../debian/copyright.debcargo.hint| 77 +++ src/mail-parser/debian/debcargo.toml | 2 + 4 files changed

[pve-devel] [PATCH v2 proxmox-perl-rs 06/11] notify: construct Notification via constructor

2023-10-02 Thread Lukas Wagner
This keeps us isolated from any further changes in the proxmox_notify::Notification struct. Signed-off-by: Lukas Wagner --- common/src/notify.rs | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/common/src/notify.rs b/common/src/notify.rs index 9f44225..203acca 100644

[pve-devel] [PATCH v2 proxmox-perl-rs 07/11] pve-rs: notify: remove notify_context for PVE

2023-10-02 Thread Lukas Wagner
The context has now been moved to `proxmox-notify` due to the fact that we also need it in `proxmox-mail-forward` now. Signed-off-by: Lukas Wagner --- pve-rs/Cargo.toml| 2 +- pve-rs/src/lib.rs| 7 ++- pve-rs/src/notify_context.rs | 117

[pve-devel] [PATCH v2 proxmox 05/11] notify: add PVE/PBS context

2023-10-02 Thread Lukas Wagner
now require it for `proxmox-mail-forward`. This commit also changes the global context from being stored in a `once_cell` to a regular `Mutex`, since we now need to set/reset the context in `proxmox-mail-forward`. Signed-off-by: Lukas Wagner --- proxmox-notify/Cargo.toml

[pve-devel] [PATCH v2 proxmox-mail-forward 10/11] feed forwarded mails into proxmox_notify

2023-10-02 Thread Lukas Wagner
hould automatically work in the same way as for PVE. Signed-off-by: Lukas Wagner --- Cargo.toml | 8 +- src/main.rs | 348 +++- 2 files changed, 238 insertions(+), 118 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c68e802..64f8d47 100644

Re: [pve-devel] [PATCH access-control v1 1/1] fix #4546: api: Return user expiration date on access/ticket API call

2023-10-06 Thread Lukas Wagner
Comments inline. On 9/22/23 16:36, Philipp Hufnagl wrote: Adds an additional, optional parameter to the access/tickets api call which tells when the currently used user account will expire. If it will not expire, the parameter will not be added. Signed-off-by: Philipp Hufnagl --- src/PVE/API

Re: [pve-devel] [PATCH manager v1 1/1] fix #4546: ui: notify user if their user account expires soon

2023-10-06 Thread Lukas Wagner
Comments inline. On 9/22/23 16:36, Philipp Hufnagl wrote: When the user account that is currently logged in will expire soon, the user icon will turn into a yellow exclamation mark. In the user menu there will be a new element informing the user briefly about it. If the

Re: [pve-devel] [PATCH manager/access-control/proxmox-widget-toolkit v1 0/4] fix #4546: Show warning hint/badge if user account is expiring in next few days

2023-10-06 Thread Lukas Wagner
On 9/22/23 16:36, Philipp Hufnagl wrote: Currently, when an user account expires, it catches the users by surprise. It would be helpful to notify the the user as well as the administrator. This patch highlights such accounts in the user account pannel and also shows for regular user an exclam

Re: [pve-devel] [PATCH proxmox-widget-toolkit v1 2/2] fix #4546: utils: save expiring date of user account for UI

2023-10-06 Thread Lukas Wagner
Comments inline. On 9/22/23 16:36, Philipp Hufnagl wrote: When an user experation date is send with the /accesss/tickets POST API ^ ^ ^ some minor typos: expiration sent access call, it will be stored in a global variable

Re: [pve-devel] [PATCH proxmox-widget-toolkit v1 1/2] fix #4546: css: Inform user administrator about user accounts expiring soon

2023-10-06 Thread Lukas Wagner
Comments inline. On 9/22/23 16:36, Philipp Hufnagl wrote: Adds a new css class to underlay information urgency in table columns for dark and light mode. This underlay color then is used to notifiy Typo in 'notify' user administrators about user accounts that will expire soon Signed-off-by: Ph

Re: [pve-devel] [PATCH proxmox-i18n 1/1] update German translation

2023-10-09 Thread Lukas Wagner
Hello Hannes, please configure your git client so that the commit author is your full name [1]: git config --global user.name "Firstname Lastname" Also, this patch is missing the 'Signed-off-by' line. That line is auto-generated by git if you provide the right flags to `git commit` or `gi

[pve-devel] [PATCH proxmox-widget-toolkit] panel: sendmail edit: don't translate 'Proxmox VE' in author field

2023-10-09 Thread Lukas Wagner
The default value is determined by the backend and is never translated (which does not make sense any way for a product name). This was likely just a copy/paste mistake from other from fields. Signed-off-by: Lukas Wagner --- src/panel/SendmailEditPanel.js | 2 +- 1 file changed, 1 insertion

Re: [pve-devel] [PATCH v2 proxmox-i18n] update German translation

2023-10-09 Thread Lukas Wagner
Some comments inline. On 10/9/23 15:21, Hannes Duerr wrote: Signed-off-by: Hannes Duerr --- de.po | 111 -- 1 file changed, 37 insertions(+), 74 deletions(-) diff --git a/de.po b/de.po index fea74f1..4f6de7d 100644 --- a/de.po +++ b/de

[pve-devel] [PATCH proxmox-widget-toolkit] schema: endpoint types: don't translate endpoint type names

2023-10-09 Thread Lukas Wagner
... that are not really translatable. Signed-off-by: Lukas Wagner --- src/Schema.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Schema.js b/src/Schema.js index a7ffdf8..e0f583a 100644 --- a/src/Schema.js +++ b/src/Schema.js @@ -39,12 +39,12 @@ Ext.define

Re: [pve-devel] [PATCH v3 proxmox-i18n] update German translation

2023-10-10 Thread Lukas Wagner
Hi again, On 10/10/23 09:42, Hannes Duerr wrote: update German translation Signed-off-by: Hannes Duerr --- Hab die Änderungen aufgenommen not a blocker for this patch (so no need to send another version, as this won't be visible in the commit message), but usually you'd write something like

Re: [pve-devel] [PATCH manager] ui: acl add: show warning if root@pam is selected

2023-10-10 Thread Lukas Wagner
On 10/10/23 14:10, Fiona Ebner wrote: Am 26.07.23 um 15:41 schrieb Lukas Wagner: Currently, users are able to add ACL entries for the root@pam user. Since this user always has full permissions, no entry in the ACL tree will be saved, and consequently no new entry shows up in the UI after

[pve-devel] [PATCH proxmox-perl-rs v3 1/8] notify: use file based notification templates

2024-05-21 Thread Lukas Wagner
Instead of passing literal template strings to the notification system, we now only pass an identifier. This identifier will be used load the template files from a product-specific directory. Signed-off-by: Lukas Wagner --- common/src/notify.rs | 8 +++- 1 file changed, 3 insertions(+), 5

[pve-devel] [PATCH cluster v3 4/8] notify: use named template instead of passing template strings

2024-05-21 Thread Lukas Wagner
The notification system will now load template files from a defined location. The template to use is now passed to proxmox_notify, instead of separate template strings for subject/body. Signed-off-by: Lukas Wagner --- src/PVE/Notify.pm | 29 - 1 file changed, 12

[pve-devel] [PATCH manager v3 6/8] gitignore: ignore any test artifacts

2024-05-21 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index e8d1eb27..481ae1e0 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ dest/ /www/mobile/pvemanager-mobile.js /www/touch/touch-[0-9]*/ /pve-manager-[0-9

[pve-devel] [PATCH manager v3 7/8] tests: remove vzdump_notification test

2024-05-21 Thread Lukas Wagner
testing if the backup logs are shortened if they ware too long - so they are just removed. Signed-off-by: Lukas Wagner --- test/Makefile| 6 +- test/vzdump_notification_test.pl | 101 --- 2 files changed, 1 insertion(+), 106 deletions(-) delete

[pve-devel] [PATCH manager v3 8/8] notifications: use named templates instead of in-code templates

2024-05-21 Thread Lukas Wagner
This commit adapts notification sending for - package update - replication - backups to use named templates (installed in /usr/share/pve-manager/templates) instead of passing template strings defined in code to the notification stack. Signed-off-by: Lukas Wagner --- Makefile

[pve-devel] [PATCH proxmox-perl-rs v3 3/8] notify: adapt to Option> to Vec changes in proxmox_notify

2024-05-21 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/notify.rs | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/common/src/notify.rs b/common/src/notify.rs index 00a6056..e1b006b 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs @@ -153,8 +153,8 @@ mod export

[pve-devel] [PATCH many v3 0/8] notifications: move template strings to template files

2024-05-21 Thread Lukas Wagner
rom that mostly just cosmetics/style proxmox-perl-rs: Lukas Wagner (3): notify: use file based notification templates notify: don't pass config structs by reference notify: adapt to Option> to Vec changes in proxmox_notify common/src/notify.rs | 48 +---

[pve-devel] [PATCH proxmox-perl-rs v3 2/8] notify: don't pass config structs by reference

2024-05-21 Thread Lukas Wagner
proxmox_notify's api functions have been changed so that they take ownership of config structs. Signed-off-by: Lukas Wagner --- common/src/notify.rs | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/common/src/notify.rs b/common/src/notify.rs

[pve-devel] [PATCH pve-ha-manager v3 5/8] env: notify: use named templates instead of passing template strings

2024-05-21 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- debian/pve-ha-manager.install | 3 +++ src/Makefile | 1 + src/PVE/HA/Env/PVE2.pm| 4 ++-- src/PVE/HA/NodeStatus.pm | 20 +-- src/PVE/HA/Sim/Env.pm

Re: [pve-devel] [PATCH v1 pve-manager 0/8] Ceph Build Commit in UI

2024-06-05 Thread Lukas Wagner
the top-level status widget uses a different icon to signal an outdated OSD than the version column in the OSD tree view - maybe it would make sense to use the same icon here? - The 'Detail' view for OSDs could also show the commit hash, right now it only shows

Re: [pve-devel] [PATCH v1 pve-manager 6/8] ui: ceph: services: parse and display build commit

2024-06-05 Thread Lukas Wagner
On 2024-04-30 17:28, Max Carrara wrote: > This commit adds `PVE.Utils.parse_ceph_buildcommit`, which can be used > to get the full hash "eccf199d..." in parentheses from a string like > the following: > > ceph version 17.2.7 (eccf199d63457659c09677399928203b7903c888) quincy > (stable) > >

Re: [pve-devel] [PATCH v1 pve-manager 8/8] ui: ceph: osd: rework rendering of version field & show build commit

2024-06-05 Thread Lukas Wagner
On 2024-04-30 17:28, Max Carrara wrote: > The logic of the `render_version` function is split up in order to > handle how the version is displayed depending on the type of the row. > > If the parsed version is `undefined` or the row marks the beginning of > the tree, an empty string is now ret

Re: [pve-devel] [PATCH v1 pve-manager 2/8] ceph: tools: update Ceph version regex

2024-06-05 Thread Lukas Wagner
On 2024-04-30 17:28, Max Carrara wrote: > Make the regex more maintainable declaring it as a variable, breaking it > up and commenting it by using the x flag. > > Also remove the part that parses our Debian revision (e.g. -pve1) from > the version, as we do not actually include that in our Cep

[pve-devel] [PATCH manager v7 03/19] ui: dc: backup: send 'job-id' property when starting a backup job manually

2024-06-10 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- www/manager6/dc/Backup.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js index 4ba80b31..4b45b5c6 100644 --- a/www/manager6/dc/Backup.js +++ b/www/manager6/dc/Backup.js @@ -604,11 +604,12

[pve-devel] [PATCH manager v7 05/19] api: replication: add 'job-id' to notification metadata

2024-06-10 Thread Lukas Wagner
This allows users to create notification match rules for specific replication jobs, if they so desire. Signed-off-by: Lukas Wagner --- PVE/API2/Replication.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/API2/Replication.pm b/PVE/API2/Replication.pm index d84ac1ab

[pve-devel] [PATCH manager v7 07/19] api: replication: include 'hostname' field for notifications

2024-06-10 Thread Lukas Wagner
The field contains the hostname of the host (without any domain part) which sends the notification. This field can be used in match-field match rules. Signed-off-by: Lukas Wagner --- PVE/API2/Replication.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PVE/API2/Replication.pm b/PVE/API2

[pve-devel] [PATCH manager v7 04/19] ui: dc: backup: allow to set custom job id in advanced settings

2024-06-10 Thread Lukas Wagner
This might be useful if somebody wants to match on the new 'backup-job' field in a notification match rule. Signed-off-by: Lukas Wagner --- www/manager6/Utils.js | 1 + www/manager6/dc/Backup.js | 4 www/manager6/panel/BackupAdvancedOptio

[pve-devel] [PATCH many v7 00/19] notifications: notification metadata matching improvements

2024-06-10 Thread Lukas Wagner
st master - minor conflict resolution was needed - v2: - include 'type' metadata field for forwarded mails --> otherwise it's not possible to match them - include Maximilliano's T-b trailer in UI patches pve-guest-common: Lukas Wagner (1): vzdump: common: a

[pve-devel] [PATCH manager v7 10/19] d/control: bump proxmox-widget-toolkit dependency to 4.1.4

2024-06-10 Thread Lukas Wagner
We need "utils: add mechanism to add and override translatable notification event descriptions in the product specific UIs" otherwise there is an error in the browser console. Signed-off-by: Lukas Wagner --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[pve-devel] [PATCH docs v7 15/19] notification: clarify that 'hostname' does not include the domain

2024-06-10 Thread Lukas Wagner
This was a bit inconsistent between the different notification types: - APT/VZDump included the domain part - fence notifications did not A decision has been made to unify this by removing the domain part from APT/VZDump notifications. Signed-off-by: Lukas Wagner --- notifications.adoc | 2

[pve-devel] [PATCH docs v7 17/19] notifications: match-field 'exact'-mode can now match multiple values

2024-06-10 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index dec878a..07f0b3e 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -221,11 +221,16 @@ configurable

[pve-devel] [PATCH docs v7 18/19] notifications: fix typo in 'notification'

2024-06-10 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notifications.adoc b/notifications.adoc index 07f0b3e..9c5228c 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -295,7 +295,7 @@ Notification Events [width=&quo

[pve-devel] [PATCH docs v7 16/19] notifications: describe new notification metadata fields

2024-06-10 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index 57053c8..dec878a 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -289,19 +289,21 @@ Notification

[pve-devel] [PATCH manager v7 08/19] api: notification: add API for getting known metadata fields/values

2024-06-10 Thread Lukas Wagner
This new API route returns known notification metadata fields and a list of known possible values. This will be used by the UI to provide suggestions when adding/modifying match rules. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 139 ++ 1 file

[pve-devel] [PATCH widget-toolkit v7 13/19] notification: matcher: move match-calendar fields to panel

2024-06-10 Thread Lukas Wagner
Also introduce a local viewModel that is linked to a parent viewModel, allowing us to move the formulas to the panel. This should make the code more cohesive and easier to follow. No functional changes. Signed-off-by: Lukas Wagner Tested-by: Maximiliano Sandoval --- src/window

[pve-devel] [PATCH widget-toolkit v7 14/19] notification: matcher: move match-severity fields to panel

2024-06-10 Thread Lukas Wagner
Also introduce a local viewModel that is linked to a parent viewModel, allowing us to move the formulas to the panel. This should make the code more cohesive and easier to follow. No functional changes. Signed-off-by: Lukas Wagner Tested-by: Maximiliano Sandoval --- src/window

[pve-devel] [PATCH pve-guest-common v7 01/19] vzdump: common: allow 'job-id' as a parameter without being in schema

2024-06-10 Thread Lukas Wagner
'job-id' is passed when a backup as started as a job and will be passed to the notification system as matchable metadata. It it can be considered 'internal'. Signed-off-by: Lukas Wagner --- src/PVE/VZDump/Common.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[pve-devel] [PATCH manager v7 02/19] api: jobs: vzdump: pass job 'job-id' parameter

2024-06-10 Thread Lukas Wagner
This allows us to access us the backup job id in the send_notification function, where we can set it as metadata for the notification. Signed-off-by: Lukas Wagner --- PVE/API2/VZDump.pm | 8 PVE/Jobs/VZDump.pm | 4 +++- PVE/VZDump.pm | 6 +++--- 3 files changed, 14 insertions

[pve-devel] [PATCH manager v7 06/19] vzdump: apt: notification: do not include domain in 'hostname' field

2024-06-10 Thread Lukas Wagner
esult in soft-breakage for any users who have already relied on the domain being present. If there is need for it, it could include a fqdn metadata field. The hostname property used for rendering the notification template is unaffected for now. Signed-off-by: Lukas Wagner --- PVE/API2/APT.p

[pve-devel] [PATCH manager v7 09/19] ui: utils: add overrides for translatable notification fields/values

2024-06-10 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- www/manager6/Utils.js | 11 +++ 1 file changed, 11 insertions(+) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index 5b0d51eb..ea448bfb 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -2060,6 +2060,17 @@ Ext.define

[pve-devel] [PATCH widget-toolkit v7 12/19] notification: matcher: move match-field formulas to local viewModel

2024-06-10 Thread Lukas Wagner
This should make the code more cohesive and easier to follow. No functional changes. Signed-off-by: Lukas Wagner Tested-by: Maximiliano Sandoval --- src/window/NotificationMatcherEdit.js | 189 +- 1 file changed, 95 insertions(+), 94 deletions(-) diff --git a/src

[pve-devel] [PATCH widget-toolkit v7 11/19] notification: matcher: match-field: show known fields/values

2024-06-10 Thread Lukas Wagner
pending on the current value of 'field'. The list of known fields/values is retrieved from new API endpoints. Some values are marked 'internal' by the backend. This means that the 'value' field was not user-created (counter example: backup job IDs) and can there

[pve-devel] [PATCH docs v7 19/19] notifications: backport some rephrased parts from PBS docs

2024-06-10 Thread Lukas Wagner
Most of the changes were done when adapting the PVE docs to the new PBS notification system, so now we 'backport' those improvements. Signed-off-by: Lukas Wagner --- notifications.adoc | 99 +++--- 1 file changed, 67 insertions(+), 32 deletion

[pve-devel] [PATCH proxmox-perl-rs] pve-rs: pmg-rs: move deprecated .cargo/config to .cargo/config.toml

2024-06-20 Thread Lukas Wagner
Fixes the following new warning that appeared after switching to rust 1.77: warning: `proxmox-perl-rs/pve-rs/.cargo/config` is deprecated in favor of `config.toml` Signed-off-by: Lukas Wagner --- pmg-rs/.cargo/{config => config.toml} | 0 pve-rs/.cargo/{config => config.toml} | 0 2

Re: [pve-devel] [PATCH proxmox-perl-rs] pve-rs: pmg-rs: move deprecated .cargo/config to .cargo/config.toml

2024-06-20 Thread Lukas Wagner
Whoops, seems like I was on stable rust (1.78) and the warning only appears there but not on 1.77 (packaged rust) - but we can apply that already anyway, saves us the trouble once we are on 1.78 :) On 2024-06-20 10:59, Lukas Wagner wrote: > Fixes the following new warning that appeared af

Re: [pve-devel] applied: [PATCH proxmox-perl-rs] pve-rs: pmg-rs: move deprecated .cargo/config to .cargo/config.toml

2024-06-20 Thread Lukas Wagner
On 2024-06-20 12:21, Fabian Grünbichler wrote: > with a follow-up to adapt the Makefiles - please test builds when > touching the build system ;) > Sorry, only did a `cargo build` - :S My bad -- - Lukas ___ pve-devel mailing list pve-devel@lists.

[pve-devel] [PATCH proxmox-perl-rs 02/15] pve-rs: tfa: clippy: unnecessary `pub(self)`

2024-06-20 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/tfa.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pve-rs/src/tfa.rs b/pve-rs/src/tfa.rs index 2b61344..798cdad 100644 --- a/pve-rs/src/tfa.rs +++ b/pve-rs/src/tfa.rs @@ -20,7 +20,7 @@ use nix::errno::Errno; use nix::sys::stat

[pve-devel] [PATCH proxmox-perl-rs 01/15] pve-rs: apt: clippy: the borrowed expression implements the required traits

2024-06-20 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/apt/repositories.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/apt/repositories.rs b/common/src/apt/repositories.rs index e710819..6e0a196 100644 --- a/common/src/apt/repositories.rs +++ b/common/src/apt

[pve-devel] [PATCH proxmox-perl-rs 03/15] pve-rs: tfa: clippy: this function has too many arguments

2024-06-20 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/tfa.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pve-rs/src/tfa.rs b/pve-rs/src/tfa.rs index 798cdad..6650151 100644 --- a/pve-rs/src/tfa.rs +++ b/pve-rs/src/tfa.rs @@ -409,6 +409,7 @@ mod export { methods::list_tfa(&this.inner.

[pve-devel] [PATCH proxmox-perl-rs 07/15] pve-rs: tfa: clippy: redundant slicing of the whole range

2024-06-20 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/tfa.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pve-rs/src/tfa.rs b/pve-rs/src/tfa.rs index 7ead18c..1054169 100644 --- a/pve-rs/src/tfa.rs +++ b/pve-rs/src/tfa.rs @@ -802,7 +802,7 @@ fn usize_from_perl(value: JsonValue

[pve-devel] [PATCH proxmox-perl-rs 11/15] pmg-rs: tfa: clippy: this function has too many arguments

2024-06-20 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pmg-rs/src/tfa.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pmg-rs/src/tfa.rs b/pmg-rs/src/tfa.rs index a97d171..928b50b 100644 --- a/pmg-rs/src/tfa.rs +++ b/pmg-rs/src/tfa.rs @@ -361,6 +361,7 @@ mod export { methods::list_tfa(&this.inner.

[pve-devel] [PATCH proxmox-perl-rs 04/15] pve-rs: tfa: clippy: question mark operator is useless here

2024-06-20 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/tfa.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pve-rs/src/tfa.rs b/pve-rs/src/tfa.rs index 6650151..9381ef0 100644 --- a/pve-rs/src/tfa.rs +++ b/pve-rs/src/tfa.rs @@ -490,11 +490,11 @@ mod export { #[export] fn

[pve-devel] [PATCH proxmox-perl-rs 06/15] pve-rs: tfa: clippy: accessing first element with `.get(0)`

2024-06-20 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/tfa.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pve-rs/src/tfa.rs b/pve-rs/src/tfa.rs index 7588d6d..7ead18c 100644 --- a/pve-rs/src/tfa.rs +++ b/pve-rs/src/tfa.rs @@ -831,7 +831,7 @@ fn generate_legacy_config(out: &

[pve-devel] [PATCH proxmox-perl-rs 12/15] pmg-rs: tfa: clippy: the borrowed expression implements the required traits

2024-06-20 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pmg-rs/src/tfa.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pmg-rs/src/tfa.rs b/pmg-rs/src/tfa.rs index 928b50b..af69721 100644 --- a/pmg-rs/src/tfa.rs +++ b/pmg-rs/src/tfa.rs @@ -178,7 +178,7 @@ mod export { #[try_from_ref

[pve-devel] [PATCH proxmox-perl-rs 05/15] pve-rs: tfa: clippy: borrowed expression impls the required traits

2024-06-20 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/tfa.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pve-rs/src/tfa.rs b/pve-rs/src/tfa.rs index 9381ef0..7588d6d 100644 --- a/pve-rs/src/tfa.rs +++ b/pve-rs/src/tfa.rs @@ -1048,7 +1048,7 @@ impl proxmox_tfa::api

[pve-devel] [PATCH proxmox-perl-rs 08/15] pve-rs: tfa: clippy: stripping a prefix manually

2024-06-20 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/tfa.rs | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pve-rs/src/tfa.rs b/pve-rs/src/tfa.rs index 1054169..66dca3d 100644 --- a/pve-rs/src/tfa.rs +++ b/pve-rs/src/tfa.rs @@ -736,10 +736,10 @@ fn decode_old_oath_entry

[pve-devel] [PATCH proxmox-perl-rs 10/15] pmg-rs: tfa: clippy: question mark operator is useless here

2024-06-20 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pmg-rs/src/tfa.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pmg-rs/src/tfa.rs b/pmg-rs/src/tfa.rs index 0680baa..a97d171 100644 --- a/pmg-rs/src/tfa.rs +++ b/pmg-rs/src/tfa.rs @@ -441,11 +441,11 @@ mod export { #[export] fn

[pve-devel] [PATCH proxmox-perl-rs 14/15] pmg-rs: acme: clippy: reference is immediately deref'd by the compiler

2024-06-20 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pmg-rs/src/acme.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmg-rs/src/acme.rs b/pmg-rs/src/acme.rs index 7ea78c6..e2e7327 100644 --- a/pmg-rs/src/acme.rs +++ b/pmg-rs/src/acme.rs @@ -403,7 +403,7 @@ pub mod export { this.inner

[pve-devel] [PATCH proxmox-perl-rs 09/15] pmg-rs: tfa: clippy: unnecessary `pub(self)`

2024-06-20 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pmg-rs/src/tfa.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmg-rs/src/tfa.rs b/pmg-rs/src/tfa.rs index 1924488..0680baa 100644 --- a/pmg-rs/src/tfa.rs +++ b/pmg-rs/src/tfa.rs @@ -17,7 +17,7 @@ use anyhow::{bail, format_err, Error}; use

[pve-devel] [PATCH proxmox-perl-rs 13/15] pmg-rs: tfa: clippy: useless conversion to the same type

2024-06-20 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pmg-rs/src/tfa.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmg-rs/src/tfa.rs b/pmg-rs/src/tfa.rs index af69721..4e9ce8f 100644 --- a/pmg-rs/src/tfa.rs +++ b/pmg-rs/src/tfa.rs @@ -178,7 +178,7 @@ mod export { #[try_from_ref] this

[pve-devel] [PATCH proxmox-perl-rs 15/15] pmg-rs: acme: simplify acount config saving

2024-06-20 Thread Lukas Wagner
We already depend on proxmox_sys, so we can just use `replace_file`. Fixing a clippy warning (missing truncate setting for OpenOptions) is an added benefit. Signed-off-by: Lukas Wagner --- pmg-rs/src/acme.rs | 62 ++ 1 file changed, 13 insertions

[pve-devel] [PATCH proxmox 3/6] notify: sendmail: make mailfrom and author non-optional

2024-06-24 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/endpoints/sendmail.rs | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/proxmox-notify/src/endpoints/sendmail.rs b/proxmox-notify/src/endpoints/sendmail.rs index e75902fc..0f7a61b0 100644 --- a/proxmox-notify

[pve-devel] [PATCH proxmox 6/6] notify: sendmail: code style improvements

2024-06-24 Thread Lukas Wagner
No functional changes intended. Signed-off-by: Lukas Wagner --- proxmox-notify/src/endpoints/sendmail.rs | 57 +++- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/proxmox-notify/src/endpoints/sendmail.rs b/proxmox-notify/src/endpoints/sendmail.rs index

[pve-devel] [PATCH proxmox 2/6] sys: mark email fn's as deprecated

2024-06-24 Thread Lukas Wagner
The only user was proxmox-notify which now uses its own copies of these functions. Also added #[allow(deprecated)] to the test case cause we don't want any deprecation warnings when running the test. Signed-off-by: Lukas Wagner --- proxmox-sys/src/email.rs | 3 +++ 1 file changed, 3 inser

[pve-devel] [PATCH proxmox 1/6] notify: copy sendmail/forward fn's from proxmox_sys

2024-06-24 Thread Lukas Wagner
. Signed-off-by: Lukas Wagner --- proxmox-notify/Cargo.toml| 1 + proxmox-notify/src/endpoints/sendmail.rs | 189 ++- 2 files changed, 188 insertions(+), 2 deletions(-) diff --git a/proxmox-notify/Cargo.toml b/proxmox-notify/Cargo.toml index d3eae584..e55be0cc

[pve-devel] [PATCH proxmox 5/6] notify: sendmail: always send multi-part message

2024-06-24 Thread Lukas Wagner
ff-by: Lukas Wagner --- proxmox-notify/src/endpoints/sendmail.rs | 81 +--- 1 file changed, 29 insertions(+), 52 deletions(-) diff --git a/proxmox-notify/src/endpoints/sendmail.rs b/proxmox-notify/src/endpoints/sendmail.rs index 241a2578..c28d9211 100644 --- a/proxmox-notif

<    4   5   6   7   8   9   10   11   >