[pve-devel] [PATCH v2 pve-docs 49/52] notifications: add documentation for system mail forwarding

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Notes: Changes v2 -> v3: - Dropped paragraph about target/policy, since we now do routing in matchers notifications.adoc | 16 1 file changed, 16 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index e8ed

[pve-devel] [PATCH v2 pve-manager 26/52] ui: dc: remove unneeded notification events panel

2023-11-14 Thread Lukas Wagner
The notification event settings are replaced by notification matchers, which will combine the notification routing and filtering into a single concept. Signed-off-by: Lukas Wagner --- www/manager6/Makefile | 4 - www/manager6/dc/Config.js | 17 +- www/manager6/dc

[pve-devel] [PATCH v2 proxmox 15/52] notify: add built-in config and 'origin' parameter

2023-11-14 Thread Lukas Wagner
by default if in a test context. There might be a nicer solution for that, but for now this should work. Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/gotify.rs | 2 +- proxmox-notify/src/api/matcher.rs| 3 +- proxmox-notify/src/api/sendmail.rs | 5 +- proxmox-

[pve-devel] [PATCH v2 pve-manager 25/52] api: notification: add new matcher-based notification API

2023-11-14 Thread Lukas Wagner
This renames filters -> matchers and adds new configuration options needed by matchers (e.g. match-field, match-calendar, etc.) Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 195 ++ 1 file changed, 88 insertions(+), 107 deletions(-) diff --

[pve-devel] [PATCH v2 pve-manager 35/52] api: notification: simplify ACLs for notification

2023-11-14 Thread Lukas Wagner
Use coarse-grained /mapping/notifications for now. We can always extend later if we need to. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 131 -- 1 file changed, 54 insertions(+), 77 deletions(-) diff --git a/PVE/API2/Cluster/Notifications.pm

[pve-devel] [PATCH v2 pve-docs 46/52] notifications: update docs to for matcher-based notifications

2023-11-14 Thread Lukas Wagner
Target groups and filters have been replaced by notification matchers. The matcher can match on certain notification properties and route the notification to a target in case of a match. This patch updates the docs to reflect these changes. Signed-off-by: Lukas Wagner --- notifications.adoc

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

2023-11-14 Thread Lukas Wagner
subject and text body. On PBS, where proxmox-notify is not yet fully integrated, we simply add a default target/matcher to an empty config. That way the behavior should be unchanged - mails will be forwarded to root@pam. Signed-off-by: Lukas Wagner --- Notes: Changes v2 -> v3: - Update

[pve-devel] [PATCH v2 pve-docs 47/52] notifications: document SMTP endpoints

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 47 ++ 1 file changed, 47 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index 764ec72..acbdfae 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -67,6 +67,7

[pve-devel] [PATCH v2 proxmox-widget-toolkit 38/52] notification ui: remove notification groups

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile| 1 - src/Schema.js | 5 - src/panel/NotificationConfigView.js | 4 - src/panel/NotificationGroupEditPanel.js | 174 4 files changed, 184 deletions(-) delete

[pve-devel] [PATCH v2 proxmox-widget-toolkit 40/52] notification: matcher: add UI for matcher editing

2023-11-14 Thread Lukas Wagner
This modifies the old filter edit window in the following ways: - Split content into multiple panels - Name and comment in the first tab - Match rules in a tree-structure in the second tab - Targets to notify in the third tab Signed-off-by: Lukas Wagner --- Notes: The code

[pve-devel] [PATCH v2 pve-manager 33/52] notify: add API routes for smtp endpoints

2023-11-14 Thread Lukas Wagner
code. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 323 ++ 1 file changed, 323 insertions(+) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index 8f716f26..42207aaa 100644 --- a/PVE/API2/Cluster/Notifications.pm

[pve-devel] [PATCH v2 pve-docs 48/52] notifications: document 'comment' option for targets/matchers

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index acbdfae..e8ed51b 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -67,6 +67,7 @@ accomodate multiple recipients. set, the plugin

[pve-devel] [PATCH v2 proxmox-widget-toolkit 44/52] notification ui: add enable checkbox for targets/matchers

2023-11-14 Thread Lukas Wagner
Add a 'enable' checkbox for targets and matchers in their edit windows. Also show a new 'enable' column in the overview panel. The parameter in the config is actually called 'disable', so the UI needs to invert the setting in the appropriate on{Get,Set}Values hooks

[pve-devel] [PATCH v2 proxmox-widget-toolkit 37/52] notification ui: remove filter setting for targets

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile| 1 - src/form/NotificationFilterSelector.js | 58 - src/panel/GotifyEditPanel.js| 9 src/panel/NotificationGroupEditPanel.js | 9 src/panel/SendmailEditPanel.js

[pve-devel] [PATCH v2 proxmox 12/52] notify: add 'smtp' endpoint

2023-11-14 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 v2 proxmox 05/52] notify: replace filters and groups with matcher-based system

2023-11-14 Thread Lukas Wagner
needed to allow a smooth transition from the old system to the new system, since the old system was already available on pvetest. Signed-off-by: Lukas Wagner --- Notes: Sorry for the large commit, many of these changes interact with each other and it would have been significantly more

Re: [pve-devel] [PATCH v2 many 00/52] revamp notifications; smtp endpoints; system mail

2023-11-20 Thread Lukas Wagner
On 11/17/23 09:41, Dominik Csapak wrote: one additional comment to the ux: the match field could use a bit of improvement: the docs describe the current fields, but for users that don't deep dive into the docs first it may be confusing having a simple text input field for that at least when

Re: [pve-devel] [PATCH v2 many 00/52] revamp notifications; smtp endpoints; system mail

2023-11-20 Thread Lukas Wagner
On 11/20/23 10:11, Dominik Csapak wrote: A 'match-type' rule would simplify this by simply allowing one to list all notification types on wants to match, eg. matcher: test3 match-type vzdump,replication For this 'specialized' match-rule we could easily add a list of known values in a d

[pve-devel] [PATCH v2 guest-common/manager 0/4] vzdump: add 'notification-mode' parameter

2023-11-21 Thread Lukas Wagner
ication' is set to failure pve-guest-common: Lukas Wagner (1): vzdump: config: add 'notification-mode' param for backup jobs src/PVE/VZDump/Common.pm | 14 ++ 1 file changed, 14 insertions(+) pve-manager: Lukas Wagner (3): vzdump: support 'notificati

[pve-devel] [PATCH v2 pve-manager 3/4] ui: backup jobs: add 'notification-mode' selector for backup jobs

2023-11-21 Thread Lukas Wagner
This selector allows one to selected between the 'old' (send email directly via sendmail) or the 'new' notification system. The default is 'auto', which sends and email if one is configured, and uses the notification system if no email address is set. Signed-

[pve-devel] [PATCH v2 pve-manager 2/4] vzdump: support 'notification-mode' parameter

2023-11-21 Thread Lukas Wagner
is provided and the 'new' system if not. This is allows users to opt-in/opt-out from the new notification system, which might be a bit chatty by default. Signed-off-by: Lukas Wagner --- PVE/VZDump.pm | 95 +++ 1 file changed, 58 insertions(+),

[pve-devel] [PATCH v2 pve-manager 4/4] ui: backup: add 'notification-mode' param for one-shot backup jobs.

2023-11-21 Thread Lukas Wagner
This selector allows one to selected between the 'old' (send email directly via sendmail) or the 'new' notification system. The default is 'auto', which sends and email if one is configured, and uses the notification system if no email address is set. Signed-

[pve-devel] [PATCH v2 pve-guest-common 1/4] vzdump: config: add 'notification-mode' param for backup jobs

2023-11-21 Thread Lukas Wagner
'legacy-sendmail': Use mailto/mailnotification parameters and send emails directly. 'notification-system': Always notify via notification system 'auto': Notify via mail if mailto is set, otherwise use notification system. Signed-off-by: Lukas Wagner ---

Re: [pve-devel] [PATCH v2 guest-common/manager 0/4] vzdump: add 'notification-mode' parameter

2023-11-21 Thread Lukas Wagner
This is actually v1, not v2. My bad. -- - Lukas ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Re: [pve-devel] [PATCH v2 guest-common/manager 0/4] vzdump: add 'notification-mode' parameter

2023-11-21 Thread Lukas Wagner
On 11/21/23 11:55, Fiona Ebner wrote: Am 21.11.23 um 11:22 schrieb Lukas Wagner: This patch series adds the 'notification-mode' setting for backup jobs. It allows users to choose between the 'old-style' notifications (mail to configured address, directly via a call to s

[pve-devel] [PATCH v3 pve-manager 3/5] ui: backup jobs: add 'notification-mode' selector for backup jobs

2023-11-21 Thread Lukas Wagner
This selector allows one to selected between the 'old' (send email directly via sendmail) or the 'new' notification system. The default is 'auto', which sends and email if one is configured, and uses the notification system if no email address is set. Signed-

[pve-devel] [PATCH v3 pve-manager 5/5] ui: backup job: change field text for 'mailnotification' field

2023-11-21 Thread Lukas Wagner
... to highlight that this setting only affects the 'legacy-sendmail' mail notifications. Signed-off-by: Lukas Wagner --- Notes: New in v3. www/manager6/dc/Backup.js | 2 +- www/manager6/form/NotificationPolicySelector.js | 2 +- 2 files changed, 2 insert

[pve-devel] [PATCH v3 pve-manager 4/5] ui: backup: add 'notification-mode' param for one-shot backup jobs.

2023-11-21 Thread Lukas Wagner
This selector allows one to selected between the 'old' (send email directly via sendmail) or the 'new' notification system. The default is 'auto', which sends and email if one is configured, and uses the notification system if no email address is set. Signed-

[pve-devel] [PATCH v3 pve-manager 2/5] vzdump: support 'notification-mode' parameter

2023-11-21 Thread Lukas Wagner
is provided and the 'new' system if not. This is allows users to opt-in/opt-out from the new notification system, which might be a bit chatty by default. Signed-off-by: Lukas Wagner --- PVE/VZDump.pm | 95 +++ 1 file changed, 58 insertions(+),

[pve-devel] [PATCH v3 guest-common/manager 0/5] vzdump: add 'notification-mode' parameter

2023-11-21 Thread Lukas Wagner
fication' is set to failure Changes v2 -> v3: - change field text in the GUI for the 'mailnotification' param This should highlight that this setting only affects the 'legacy-sendmail' notification mails pve-guest-common: Lukas Wagner (1): vzdump: co

[pve-devel] [PATCH v3 pve-guest-common 1/5] vzdump: config: add 'notification-mode' param for backup jobs

2023-11-21 Thread Lukas Wagner
'legacy-sendmail': Use mailto/mailnotification parameters and send emails directly. 'notification-system': Always notify via notification system 'auto': Notify via mail if mailto is set, otherwise use notification system. Signed-off-by: Lukas Wagner ---

Re: [pve-devel] [PATCH v3 pve-manager 4/5] ui: backup: add 'notification-mode' param for one-shot backup jobs.

2023-11-21 Thread Lukas Wagner
On 11/21/23 13:38, Philipp Hufnagl wrote: + let notificationModeSelector = Ext.create({ + xtype: 'proxmoxKVComboBox', + comboItems: [ + ['auto', gettext('Auto')], + ['legacy-sendmail', gettext('Email (legacy)')], + ['notificat

[pve-devel] [PATCH v4 pve-manager 4/4] ui: backup job: change field text for 'mailnotification' field

2023-11-21 Thread Lukas Wagner
... to highlight that this setting only affects the 'legacy-sendmail' mail notifications. Signed-off-by: Lukas Wagner --- Notes: New in v3. www/manager6/dc/Backup.js | 2 +- www/manager6/form/NotificationPolicySelector.js | 2 +- 2 files changed, 2 insert

[pve-devel] [PATCH v4 pve-manager 1/4] vzdump: support 'notification-mode' parameter

2023-11-21 Thread Lukas Wagner
is provided and the 'new' system if not. This is allows users to opt-in/opt-out from the new notification system, which might be a bit chatty by default. Signed-off-by: Lukas Wagner --- PVE/VZDump.pm | 95 +++ 1 file changed, 58 insertions(+),

[pve-devel] [PATCH v4 manager 0/4] vzdump: add 'notification-mode' parameter

2023-11-21 Thread Lukas Wagner
Philipp) - drop already applied pve-guest-common patch pve-manager: Lukas Wagner (4): vzdump: support 'notification-mode' parameter ui: backup jobs: add 'notification-mode' selector for backup jobs ui: backup: add 'notification-mode' param for o

[pve-devel] [PATCH v4 pve-manager 2/4] ui: backup jobs: add 'notification-mode' selector for backup jobs

2023-11-21 Thread Lukas Wagner
This selector allows one to selected between the 'old' (send email directly via sendmail) or the 'new' notification system. The default is 'auto', which sends and email if one is configured, and uses the notification system if no email address is set. Signed-of

[pve-devel] [PATCH v4 pve-manager 3/4] ui: backup: add 'notification-mode' param for one-shot backup jobs.

2023-11-21 Thread Lukas Wagner
This selector allows one to selected between the 'old' (send email directly via sendmail) or the 'new' notification system. The default is 'auto', which sends and email if one is configured, and uses the notification system if no email address is set. Signed-of

[pve-devel] [PATCH pve-manager 3/4] ui: dc: config: remove onlineHelp for notification config view

2023-11-21 Thread Lukas Wagner
The 'onlineHelp' is now set in the component definition in 'proxmox-widget-toolkit'. Signed-off-by: Lukas Wagner --- www/manager6/dc/Config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/www/manager6/dc/Config.js b/www/manager6/dc/Config.js index 74a84e91..f2268

[pve-devel] [PATCH docs/manager/proxmox-widget-toolkit 0/4] notifications: add help buttons, linking to the appropriate sections

2023-11-21 Thread Lukas Wagner
) pve-docs: Lukas Wagner (1): notification: add anchors for target types/matchers notifications.adoc | 6 ++ 1 file changed, 6 insertions(+) pve-manager: Lukas Wagner (2): ui: sdn: fix onlineHelp anchors ui: dc: config: remove onlineHelp for notification config view www/manager6/dc

[pve-devel] [PATCH proxmox-widget-toolkit 4/4] notification ui: add appropriate onlineHelp anchors

2023-11-21 Thread Lukas Wagner
This links the dialog windows to the correct help section (different target types, matchers). Signed-off-by: Lukas Wagner --- src/panel/GotifyEditPanel.js | 1 + src/panel/NotificationConfigView.js | 1 + src/panel/SendmailEditPanel.js| 1 + src/panel/SmtpEditPanel.js

[pve-devel] [PATCH pve-docs 1/4] notification: add anchors for target types/matchers

2023-11-21 Thread Lukas Wagner
This enables us to directly link to the appropriate section from the UI. Signed-off-by: Lukas Wagner --- notifications.adoc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index 74447e5..21e13c4 100644 --- a/notifications.adoc +++ b

[pve-devel] [PATCH pve-manager 2/4] ui: sdn: fix onlineHelp anchors

2023-11-21 Thread Lukas Wagner
These have been renamed in: bcb72b 'sdn: overall language and consistency rework' in pve-docs Signed-off-by: Lukas Wagner --- www/manager6/sdn/VnetPanel.js| 2 +- www/manager6/sdn/VnetView.js | 6 +++--- www/manager6/sdn/ZoneContentPanel.js | 2 +- 3 files changed, 5

[pve-devel] [PATCH proxmox-mail-forward] do not forward on PBS systems if co-installed with PVE

2023-11-21 Thread Lukas Wagner
ext before instantiating the config, since that already requires the context to be set. Signed-off-by: Lukas Wagner --- src/main.rs | 38 ++ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/src/main.rs b/src/main.rs index e56bc1e..4662ffa 100644

[pve-devel] [PATCH proxmox-widget-toolkit 2/2] notification ui: add 'unknown' to match-severity dropdown

2023-11-21 Thread Lukas Wagner
This is the severity used for forwarded mails, since we cannot reasonably infer a priority here. Signed-off-by: Lukas Wagner --- src/window/NotificationMatcherEdit.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/window/NotificationMatcherEdit.js b/src/window

[pve-devel] [PATCH docs/proxmox-widget-toolkit 0/2] notifications: document 'unknown' severity and add to GUI

2023-11-21 Thread Lukas Wagner
This is the severity used for forwarded mails, since we cannot reasonably infer a priority here. pve-docs: Lukas Wagner (1): notification: document 'unknown' severity notifications.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) proxmox-widget-toolkit: Lukas

[pve-devel] [PATCH pve-docs 1/2] notification: document 'unknown' severity

2023-11-21 Thread Lukas Wagner
This is the severity used for forwarded mails, since we cannot reasonably infer a priority here. Signed-off-by: Lukas Wagner --- notifications.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notifications.adoc b/notifications.adoc index 74447e5..8059953 100644 --- a

[pve-devel] [PATCH widget-toolkit 1/2] notification ui: change icon for for match-field tree nodes

2023-11-23 Thread Lukas Wagner
The old icon was slightly ambiguous since we also use it for LXC containers. Signed-off-by: Lukas Wagner --- src/window/NotificationMatcherEdit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window/NotificationMatcherEdit.js b/src/window/NotificationMatcherEdit.js

[pve-devel] [PATCH widget-toolkit 2/2] notification ui: display yellow warning triangle instead of red icon

2023-11-23 Thread Lukas Wagner
Instead of coloring the entire icon red, show a yellow warning triangle containing an exclamation mark in case of validation errors. Signed-off-by: Lukas Wagner --- src/window/NotificationMatcherEdit.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/window

[pve-devel] [PATCH manager] ui: perm paths: change /mapping/notification to /mapping/notifications

2023-11-23 Thread Lukas Wagner
The ACL path was changed during the notification system rework. This change adapts the list of predefined ACL paths in the 'Add {User,Group,API Token} Permission' dialog window to reflect this change. Signed-off-by: Lukas Wagner --- www/manager6/data/PermPathStore.js | 2 +- 1 file

[pve-devel] [PATCH manager 1/2] ui: dc: backup: improve UX for the different 'notification-mode's

2023-11-23 Thread Lukas Wagner
- Switch order of 'mailto' and 'mailnotification' field - When mode is 'auto', disable 'mailtnotification' field - When mode is 'auto' and 'mailto' is empty, show hint that the notification system will be used Sign

[pve-devel] [PATCH manager 2/2] ui: one-off backup: show hint if notification-system is used

2023-11-23 Thread Lukas Wagner
When mode is 'auto' and 'mailto' is empty, show hint that the notification system will be used. Signed-off-by: Lukas Wagner --- www/manager6/window/Backup.js | 37 +++ 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/www/manager

Re: [pve-devel] [PATCH widget-toolkit] node: repos: Use won't rather than don't

2023-11-24 Thread Lukas Wagner
On 11/24/23 15:58, Maximiliano Sandoval wrote: - Ext.String.format(gettext('No {0} repository is enabled, you do not get any updates!'), vm.get('product')), + Ext.String.format(gettext('No {0} repository is enabled, you would not get any updates!'), vm.get

[pve-devel] [PATCH widget-toolkit] notify: sendmail: smtp: fix mailto/mailto-user parameter deletion

2023-11-29 Thread Lukas Wagner
Both fields were moved to a separate panel at some point, but this broke parameter deletion behavior (e.g. if a target is modified and switches from using mailto to mailto-user, then mailto should be deleted) Signed-off-by: Lukas Wagner --- src/panel/SendmailEditPanel.js | 7 +++ src/panel

[pve-devel] [PATCH docs] fix #5089: pvesdn: replace quest(s) -> guest(s)

2023-11-29 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pvesdn.adoc | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pvesdn.adoc b/pvesdn.adoc index fdc6ea7..53293b1 100644 --- a/pvesdn.adoc +++ b/pvesdn.adoc @@ -381,7 +381,7 @@ Zone:: The associated zone for this VNet Tag:: The

[pve-devel] [RFC manager] api: replication: allow users to enumerate accessible replication jobs

2023-12-01 Thread Lukas Wagner
Previously, the /cluster/replication API handler would fail completely with a HTTP 403 if a user does have VM.Audit permissions for a single VM/CT. That was due to the 'noerr' parameter not set for $rpcenv->check() Signed-off-by: Lukas Wagner --- Not sure if this violates our

[pve-devel] [PATCH proxmox 3/5] time: posix: add bindings for strftime_l

2023-12-05 Thread Lukas Wagner
This variant of strftime can be provided with a locale_t, which determines the locale used for time formatting. A struct `Locale` was also introduced as a safe wrapper around locale_t. Signed-off-by: Lukas Wagner --- proxmox-time/src/posix.rs | 99 +++ 1

[pve-devel] [PATCH proxmox 1/5] time: posix: use strftime from the `libc` crate.

2023-12-05 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-time/src/posix.rs | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/posix.rs index 6157f8b..c463ab3 100644 --- a/proxmox-time/src/posix.rs +++ b/proxmox-time/src/posix.rs

[pve-devel] [PATCH proxmox 2/5] time: posix: inline vars in string formatting

2023-12-05 Thread Lukas Wagner
No functional changes. Signed-off-by: Lukas Wagner --- proxmox-time/src/posix.rs | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/posix.rs index c463ab3..5913816 100644 --- a/proxmox-time/src

[pve-devel] [PATCH proxmox 4/5] time: posix: add epoch_to_rfc2822

2023-12-05 Thread Lukas Wagner
This is the format used in the 'Date' header in mails. Signed-off-by: Lukas Wagner --- proxmox-time/src/posix.rs | 16 1 file changed, 16 insertions(+) diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/posix.rs index 9c8002a..96bc88e 100644 --- a/proxmo

[pve-devel] [PATCH proxmox 5/5] sys: email: use `epoch_to_rfc2822` from proxmox_time

2023-12-05 Thread Lukas Wagner
` function from proxmox_time. Under the hood, this function uses `strftime_l` with a fixed locale (C). Signed-off-by: Lukas Wagner --- proxmox-sys/src/email.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/proxmox-sys/src/email.rs b/proxmox-sys/src/email.rs index be92f30..85d17

[pve-devel] [PATCH proxmox 0/5] sys: email: always format 'Date' header with C locale

2023-12-05 Thread Lukas Wagner
e following projects need to be bumped and rebuilt: - proxmox_sys, and therefore - proxmox_notify, and therefore - libpve-rs-perl - proxmox-mail-forward - proxmox-backup (uses proxmox_sys::email::sendmail directly) [1] https://www.rfc-editor.org/rfc/rfc2822#section-

Re: [pve-devel] [PATCH pve-network 3/4] tests: mocking more functions to avoid access to system files

2023-12-05 Thread Lukas Wagner
On 12/5/23 14:12, Stefan Lendl wrote: diff --git a/src/test/run_test_zones.pl b/src/test/run_test_zones.pl index ce8edc2..2d9be88 100755/ --- a/src/test/run_test_zones.pl +++ b/src/test/run_test_zones.pl @@ -14,6 +14,10 @@ use PVE::Network::SDN::Zones; use PVE::Network::SDN::Controllers; use

[pve-devel] [PATCH pve-manager 04/21] api: jobs: vzdump: pass job 'id' parameter

2023-12-11 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 many 00/21] notifications: notification metadata matching improvements

2023-12-11 Thread Lukas Wagner
es) The changes in 'proxmox' affecting the proxmox-notify crate require a bump/rebuild of - libpve-perl-rs - proxmox-mail-forward proxmox: Lukas Wagner (2): notify: include 'hostname' metadata field for forwarded mails notify: matcher: support lists of values f

[pve-devel] [PATCH pve-manager 03/21] api: notifications: add 'smtp' to target index

2023-12-11 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index 7047f0b1..68fdda2a 100644 --- a/PVE/API2/Cluster/Notifications.pm +++ b/PVE/API2

[pve-devel] [PATCH proxmox 01/21] notify: include 'hostname' metadata field for forwarded mails

2023-12-11 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/lib.rs | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index 1fb9623..f3ee3ad 100644 --- a/proxmox-notify/src/lib.rs +++ b/proxmox-notify/src/lib.rs

[pve-devel] [PATCH pve-manager 09/21] ui: replication: show 'Job ID' column

2023-12-11 Thread Lukas Wagner
Notification match rules are able to match based on the job id, so it makes sense to display it to the user. Signed-off-by: Lukas Wagner --- www/manager6/grid/Replication.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/www/manager6/grid/Replication.js b/www/manager6

[pve-devel] [PATCH pve-manager 06/21] ui: dc: backup: show 'Job ID' column

2023-12-11 Thread Lukas Wagner
This is useful for creating matchers based on the 'backup-job' metadata field. Signed-off-by: Lukas Wagner --- www/manager6/dc/Backup.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js index 4beb84c0..fb4df

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

2023-12-11 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 pve-docs 21/21] notifications: match-field 'exact'-mode can now match multiple values

2023-12-11 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 62a1cee..00776a5 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -221,11 +221,16 @@ configurable

[pve-devel] [PATCH proxmox 02/21] notify: matcher: support lists of values for 'exact' match-field mode

2023-12-11 Thread Lukas Wagner
For example, one can now use: match-field exact:type=vzdump,replication to match on vzdump AND replication events. Signed-off-by: Lukas Wagner --- proxmox-notify/src/matcher.rs | 43 +++ 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/proxmox

[pve-devel] [PATCH proxmox-widget-toolkit 15/21] notification: matcher: match-field: show known fields/values

2023-12-11 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 therefore be

[pve-devel] [PATCH proxmox-widget-toolkit 16/21] notification: matcher: move match-field formulas to local viewModel

2023-12-11 Thread Lukas Wagner
This should make the code more cohesive and easier to follow. No functional changes. Signed-off-by: Lukas Wagner --- src/window/NotificationMatcherEdit.js | 186 +- 1 file changed, 92 insertions(+), 94 deletions(-) diff --git a/src/window/NotificationMatcherEdit.js b

[pve-devel] [PATCH pve-manager 08/21] api: replication: add 'replication-job' to notification metadata

2023-12-11 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 0dc944c9

[pve-devel] [PATCH pve-manager 11/21] api: replication: include 'hostname' field for notifications

2023-12-11 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 pve-manager 05/21] ui: dc: backup: send 'id' property when starting a backup job manually

2023-12-11 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- www/manager6/dc/Backup.js | 1 - 1 file changed, 1 deletion(-) diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js index 70903bdc..4beb84c0 100644 --- a/www/manager6/dc/Backup.js +++ b/www/manager6/dc/Backup.js @@ -569,7 +569,6 @@ Ext.define

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

2023-12-11 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 | 4 www/manager6/dc/Backup.js | 11 +++ 2 files changed, 15 insertions(+) diff --git a/www/manager6/

[pve-devel] [PATCH pve-manager 13/21] ui: utils: add overrides for translatable notification fields/values

2023-12-11 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- www/manager6/Utils.js | 12 1 file changed, 12 insertions(+) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index 63129358..315038e1 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -2030,6 +2030,18 @@ Ext.define

[pve-devel] [PATCH proxmox-widget-toolkit 14/21] combogrid: add 'showClearTrigger' config

2023-12-11 Thread Lukas Wagner
kup job is removed and the match rule edit window is opened again, then the old, deleted value cannot be removed from the combogrid if there is no clear trigger. Signed-off-by: Lukas Wagner --- src/form/ComboGrid.js | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

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

2023-12-11 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 pve-manager 12/21] api: notification: add API for getting known metadata fields/values

2023-12-11 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 | 152 ++ 1 file

[pve-devel] [PATCH pve-docs 20/21] notifications: describe new notification metadata fields

2023-12-11 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index f087dda..62a1cee 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -289,19 +289,22 @@ Notification

[pve-devel] [PATCH proxmox-widget-toolkit 17/21] notification: matcher: move match-calendar fields to panel

2023-12-11 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 --- src/window/NotificationMatcherEdit.js | 92

[pve-devel] [PATCH proxmox-widget-toolkit 18/21] notification: matcher: move match-severity fields to panel

2023-12-11 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 --- src/window/NotificationMatcherEdit.js | 129

Re: [pve-devel] [PATCH proxmox 4/5] time: posix: add epoch_to_rfc2822

2023-12-11 Thread Lukas Wagner
On 12/5/23 13:11, Lukas Wagner wrote: diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/posix.rs + +#[test] +fn test_epoch_to_rfc2822() { +let epoch = 1609263000; +let formatted = epoch_to_rfc2822(epoch).unwrap(); +assert_eq!(formatted, "Tue, 29 Dec 2020 18:30:00

[pve-devel] [PATCH proxmox v2 1/5] time: posix: use strftime from the `libc` crate.

2023-12-11 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-time/src/posix.rs | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/posix.rs index 6157f8b..c463ab3 100644 --- a/proxmox-time/src/posix.rs +++ b/proxmox-time/src/posix.rs

[pve-devel] [PATCH proxmox v2 5/5] sys: email: use `epoch_to_rfc2822` from proxmox_time

2023-12-11 Thread Lukas Wagner
` function from proxmox_time. Under the hood, this function uses `strftime_l` with a fixed locale (C). Signed-off-by: Lukas Wagner --- proxmox-sys/src/email.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/proxmox-sys/src/email.rs b/proxmox-sys/src/email.rs index be92f30..85d17

[pve-devel] [PATCH proxmox v2 4/5] time: posix: add epoch_to_rfc2822

2023-12-11 Thread Lukas Wagner
This is the format used in the 'Date' header in mails. Signed-off-by: Lukas Wagner --- Changes v1 -> v2: - Fix TZ-dependent test case proxmox-time/src/posix.rs | 17 + 1 file changed, 17 insertions(+) diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/p

[pve-devel] [PATCH proxmox v2 2/5] time: posix: inline vars in string formatting

2023-12-11 Thread Lukas Wagner
No functional changes. Signed-off-by: Lukas Wagner --- proxmox-time/src/posix.rs | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/posix.rs index c463ab3..5913816 100644 --- a/proxmox-time/src

[pve-devel] [PATCH proxmox v2 0/5] sys: email: always format 'Date' header with C locale

2023-12-11 Thread Lukas Wagner
.3 Changes v1 -> v2: - Fix TZ-dependent test case Lukas Wagner (5): time: posix: use strftime from the `libc` crate. time: posix: inline vars in string formatting time: posix: add bindings for strftime_l time: posix: add epoch_to_rfc2822 sys: email: use `epoch_to_rfc2822` from pro

[pve-devel] [PATCH proxmox v2 3/5] time: posix: add bindings for strftime_l

2023-12-11 Thread Lukas Wagner
This variant of strftime can be provided with a locale_t, which determines the locale used for time formatting. A struct `Locale` was also introduced as a safe wrapper around locale_t. Signed-off-by: Lukas Wagner --- proxmox-time/src/posix.rs | 99 +++ 1

Re: [pve-devel] [PATCH widget-toolkit] notify: sendmail: smtp: fix mailto/mailto-user parameter deletion

2023-12-12 Thread Lukas Wagner
On 12/11/23 16:55, Maximiliano Sandoval wrote: The commit message was not immediately clear for me. I'll send a v2 with a clearer commit message and include your T-b trailer. Thanks for testing! -- - Lukas ___ pve-devel mailing list pve-deve

[pve-devel] [PATCH widget-toolkit v2] notify: sendmail: smtp: fix mailto/mailto-user parameter deletion

2023-12-12 Thread Lukas Wagner
n place. The changes in this patch check if the field is empty and add an appropriate 'delete' to the PUT request. This error occurred because both fields were moved to a separate panel at some point (regular Panel instead of InputPanel, to avoid double-collection values on submit). Signe

Re: [pve-devel] [PATCH many 00/21] notifications: notification metadata matching improvements

2023-12-13 Thread Lukas Wagner
On 12/11/23 13:49, Lukas Wagner wrote: This patch series attempts to improve the user experience when creating notification matchers. Will submit a v2 that includes a fix for a missing 'type' metadata field for forwarded mails.

[pve-devel] [PATCH v2 proxmox 02/22] notify: include 'type' metadata field for forwarded mails

2023-12-13 Thread Lukas Wagner
Seems like this was forgotten in the initial version. Without it, it's not really possible to create matchers for forwarded mails. Signed-off-by: Lukas Wagner --- Notes: New in v2. proxmox-notify/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/proxmox-notify/src/lib

[pve-devel] [PATCH v2 pve-manager 04/22] api: notifications: add 'smtp' to target index

2023-12-13 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index 7047f0b1..68fdda2a 100644 --- a/PVE/API2/Cluster/Notifications.pm +++ b/PVE/API2

[pve-devel] [PATCH v2 pve-manager 08/22] ui: dc: backup: allow to set custom job id in advanced settings

2023-12-13 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 | 4 www/manager6/dc/Backup.js | 11 +++ 2 files changed, 15 insertions(+) diff --git a/www/manager6/

[pve-devel] [PATCH v2 proxmox 03/22] notify: matcher: support lists of values for 'exact' match-field mode

2023-12-13 Thread Lukas Wagner
For example, one can now use: match-field exact:type=vzdump,replication to match on vzdump AND replication events. Signed-off-by: Lukas Wagner --- proxmox-notify/src/matcher.rs | 43 +++ 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/proxmox

[pve-devel] [PATCH v2 pve-manager 05/22] api: jobs: vzdump: pass job 'id' parameter

2023-12-13 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 v2 pve-manager 12/22] api: replication: include 'hostname' field for notifications

2023-12-13 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

<    1   2   3   4   5   6   7   8   9   10   >