[pve-devel] [PATCH v2 pve-manager 14/22] ui: utils: add overrides for translatable notification fields/values

2023-12-13 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 v2 pve-manager 06/22] ui: dc: backup: send 'id' property when starting a backup job manually

2023-12-13 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 v2 pve-manager 10/22] ui: replication: show 'Job ID' column

2023-12-13 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 v2 pve-docs 21/22] notifications: describe new notification metadata fields

2023-12-13 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 v2 proxmox-widget-toolkit 15/22] combogrid: add 'showClearTrigger' config

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

2023-12-13 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 v2 proxmox-widget-toolkit 18/22] notification: matcher: move match-calendar fields to panel

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

2023-12-13 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 v2 proxmox 01/22] notify: include 'hostname' metadata field for forwarded mails

2023-12-13 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 v2 pve-manager 07/22] ui: dc: backup: show 'Job ID' column

2023-12-13 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 v2 pve-manager 09/22] api: replication: add 'replication-job' to notification metadata

2023-12-13 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 v2 pve-docs 20/22] notification: clarify that 'hostname' does not include the domain

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

2023-12-13 Thread Lukas Wagner
es) The changes in 'proxmox' affecting the proxmox-notify crate require a bump/rebuild of - libpve-perl-rs - proxmox-mail-forward Changelog: - v2: - include 'type' metadata field for forwarded mails --> otherwise it's not possible to match them -

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

2023-12-13 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 v2 proxmox-widget-toolkit 19/22] notification: matcher: move match-severity fields to panel

2023-12-13 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 v2 proxmox-widget-toolkit 16/22] notification: matcher: match-field: show known fields/values

2023-12-13 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 v2 proxmox-widget-toolkit 17/22] notification: matcher: move match-field formulas to local viewModel

2023-12-13 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 | 186 +- 1 file changed, 92 insertions(+), 94 deletions(-) diff --git a/src

[pve-devel] [PATCH proxmox 1/2] notify: smtp: forward original message instead nesting

2023-12-13 Thread Lukas Wagner
- gmail - outlook - our own webmail service Originally reported in our community forum: https://forum.proxmox.com/threads/proxmox-mail-forward-sends-mails-as-eml.137710/ Signed-off-by: Lukas Wagner --- Notes: proxmox-mail-forward needs a bump once this is applied. proxmox-notify/src/endpoin

[pve-devel] [PATCH proxmox 2/2] notify: smtp: add `Auto-Submitted` header to email body

2023-12-13 Thread Lukas Wagner
g/rfc/rfc3834.html Signed-off-by: Lukas Wagner --- proxmox-notify/src/endpoints/smtp.rs | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/proxmox-notify/src/endpoints/smtp.rs b/proxmox-notify/src/endpoints/smtp.rs index 4b8ff2d..15724d3 100644 --- a/proxmox-notif

[pve-devel] [PATCH widget-toolkit 2/2] notify: change 'Remove' button to 'Reset to default' for built-ins

2023-12-14 Thread Lukas Wagner
ified, the button is disabled. Signed-off-by: Lukas Wagner --- src/panel/NotificationConfigView.js | 63 + 1 file changed, 63 insertions(+) diff --git a/src/panel/NotificationConfigView.js b/src/panel/NotificationConfigView.js index 4d3ee46..2e2eede 10

[pve-devel] [PATCH widget-toolkit 1/2] remove button: allow to set custom confirmation message

2023-12-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/button/Button.js | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/button/Button.js b/src/button/Button.js index 1f53869..a59a999 100644 --- a/src/button/Button.js +++ b/src/button/Button.js @@ -110,6 +110,7 @@ Ext.define

[pve-devel] [PATCH widget-toolkit 0/2] notification: set 'Remove' button text to 'Reset to default' for built-ins

2023-12-14 Thread Lukas Wagner
ault'. Also, if the built-in is not actually modified, the button is disabled. Lukas Wagner (2): remove button: allow to set custom confirmation message notify: change 'Remove' button to 'Reset to default' for built-ins src/button/Button.js| 10 -

[pve-devel] [PATCH proxmox 2/2] notify: add separate context for unit-tests

2023-12-14 Thread Lukas Wagner
... as using PVEContext for tests is brittle and annoying for some tests. Signed-off-by: Lukas Wagner --- proxmox-notify/src/context/mod.rs | 10 +- proxmox-notify/src/context/test.rs | 26 ++ 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644

[pve-devel] [PATCH proxmox 1/2] notify: api: allow resetting built-in targets when they are referenced

2023-12-14 Thread Lukas Wagner
. Renamed the helper 'ensure_unused' to 'ensure_safe_to_delete' in the process. Also fixed the tests in api::test - they were never executed due to a faulty #[cfg] directive. Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/gotify.rs | 2 +- proxmox-notify/src/api/mod.rs

[pve-devel] [PATCH manager 2/2] vzdump: make helper functions for sending notifications private

2023-12-14 Thread Lukas Wagner
The helpers were split out from the original 'sendmail' function when migrating to the new notification system. They are not needed anywhere else and can thus be private. Signed-off-by: Lukas Wagner --- PVE/VZDump.pm | 8 1 file changed, 4 insertions(+), 4 deletions(-) di

[pve-devel] [PATCH manager 1/2] fix #5067: vzdump: include total backup size in notification

2023-12-14 Thread Lukas Wagner
The old backup job notification mails from before the notification system overhaul included the total time as well as the total size. The total size was missing from the new, template-based backup report, thus we add it back in this commit. Signed-off-by: Lukas Wagner --- PVE/VZDump.pm | 24

Re: [pve-devel] [PATCH installer v2 0/7] gui: use gtk grids when possible

2023-12-15 Thread Lukas Wagner
`DNS Server`. Tested these changes against the latest master branch. I did not notice any regressions. Consider this: Tested-by: Lukas Wagner -- - Lukas ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin

Re: [pve-devel] [PATCH pve-storage v4 2/2] fix #1611: implement import of base-images for LVM-thin Storage

2023-12-19 Thread Lukas Wagner
On 12/19/23 15:03, Hannes Duerr wrote: for base images we call the volume_import of the parent plugin and pass it as vm-image instead of base-image, then convert it back as base-image Signed-off-by: Hannes Duerr --- src/PVE/Storage/LvmThinPlugin.pm | 50 1

Re: [pve-devel] [PATCH access-control] fix #5136: ldap: Decode non-ASCII characters in attributes

2023-12-21 Thread Lukas Wagner
} } Gave this a quick test. Set up a glauth LDAP server, added some unicode symbols to the 'sn' LDAP attribute, configured sync_attributes lastname=sn in domains.cfg and tested the sync. Tested-by: Lukas Wagner -- - Lukas ___

Re: [pve-devel] [PATCH access-control] fix #5136: ldap: Decode non-ASCII characters in attributes

2023-12-21 Thread Lukas Wagner
On 12/20/23 15:37, Filip Schauer wrote: Decode non-ASCII character when syncing user attributes, since those will be encoded later on. Without this fix the attributes where encoded twice, resulting in cases such as 'ü' turning into 'ü'. Signed-off-by: Filip Schauer --- src/PVE/Auth/LDAP.pm

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

2024-01-04 Thread Lukas Wagner
On 1/4/24 13:41, Fiona Ebner wrote: Worked for me too :) However, I noticed that there were already cbinds for deleteEmpty for the mailto/mailto-user fields and wondered why that didn't have an effect. Turns out, it's because they're nested in another widget and that requires an additional c

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

2024-01-04 Thread Lukas Wagner
only possible if the other field contains a value), parameter deletion did not work properly. After applying the changes, the old value would still be in place. I can confirm that this patch works as expected and fixes the issue. Tested-by: Lukas Wagner Reviewed-by: Lukas

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

2024-01-08 Thread Lukas Wagner
On 12/11/23 14:29, Lukas Wagner wrote: This patch series makes the formatting of the 'Date' header for sent emails independent of the system locale. Previously, strftime was used to generate the header, but since this function is locale-aware, invalid Date headers could be genera

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

2024-01-08 Thread Lukas Wagner
Ping On 12/13/23 17:37, Lukas Wagner wrote: This patch series attempts to improve the user experience when creating notification matchers. Some of the noteworthy changes: - Fixup inconsistent 'hostname' field. Some notification events sent the hostname including a domain, while

Re: [pve-devel] [PATCH proxmox 1/2] notify: smtp: forward original message instead nesting

2024-01-08 Thread Lukas Wagner
ping On 12/13/23 17:42, Lukas Wagner wrote: For mails forwarded by `proxmox-mail-forward` to an SMTP target, the original message was nested as a 'message/rfc822' message part. Originally this approach was chosen to avoid having to rewrite message headers. Good email-client

Re: [pve-devel] [PATCH widget-toolkit 0/2] notification: set 'Remove' button text to 'Reset to default' for built-ins

2024-01-08 Thread Lukas Wagner
ping On 12/14/23 10:48, Lukas Wagner wrote: Deleting a built-in target/matcher does not remove it, but resets it to its default settings. This was not really obvious from the UI. This patch changes the 'Remove' button text based on the selected target/matcher. If it is a built-in,

Re: [pve-devel] [PATCH proxmox 1/2] notify: api: allow resetting built-in targets when they are referenced

2024-01-08 Thread Lukas Wagner
ping On 12/14/23 13:42, Lukas Wagner wrote: by a matcher. In the 'delete'-handler targets, we check if a target is still referenced by a matcher - if it is, we return an error. For built-in targets, this is actually not necessary, since 'deleting' a built-in only rese

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

2024-01-08 Thread Lukas Wagner
ping On 11/23/23 17:09, Lukas Wagner wrote: - Switch order of 'mailto' and 'mailnotification' field - When mode is 'auto', disable 'mailtnotification' field - When mode is 'auto' and 'mailto' is empty, show hint tha

Re: [pve-devel] [PATCH manager 1/2] fix #5067: vzdump: include total backup size in notification

2024-01-08 Thread Lukas Wagner
ping On 12/14/23 15:11, Lukas Wagner wrote: The old backup job notification mails from before the notification system overhaul included the total time as well as the total size. The total size was missing from the new, template-based backup report, thus we add it back in this commit. Signed

Re: [pve-devel] [PATCH proxmox 1/2] notify: smtp: forward original message instead nesting

2024-01-10 Thread Lukas Wagner
Thanks for the review! On 1/9/24 14:26, Wolfgang Bumiller wrote: On Wed, Dec 13, 2023 at 05:42:00PM +0100, Lukas Wagner wrote: For mails forwarded by `proxmox-mail-forward` to an SMTP target, the original message was nested as a 'message/rfc822' message part. Originally this ap

Re: [pve-devel] [PATCH proxmox 1/2] notify: api: allow resetting built-in targets when they are referenced

2024-01-10 Thread Lukas Wagner
On 1/9/24 14:18, Wolfgang Bumiller wrote: On Thu, Dec 14, 2023 at 01:42:07PM +0100, Lukas Wagner wrote: by a matcher. ^ this line should be part of the subject In the 'delete'-handler targets, we check if a target is still referenced by a matcher - if it is, we return an

[pve-devel] [PATCH proxmox v2 2/2] notify: add separate context for unit-tests

2024-01-10 Thread Lukas Wagner
... as using PVEContext for tests is brittle and annoying for some tests. Signed-off-by: Lukas Wagner --- proxmox-notify/src/context/mod.rs | 10 +- proxmox-notify/src/context/test.rs | 26 ++ 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644

[pve-devel] [PATCH proxmox v2 1/2] notify: api: allow resetting built-in targets if used by a matcher

2024-01-10 Thread Lukas Wagner
;ensure_unused' to 'ensure_safe_to_delete' in the process. Also fixed the tests in api::test - they were never executed due to a faulty #[cfg] directive. Signed-off-by: Lukas Wagner --- Changes since v1: - Simplify deserialization of 'origin' in ensure_safe_to_del

[pve-devel] [PATCH proxmox v2 2/2] notify: smtp: add `Auto-Submitted` header to email body

2024-01-10 Thread Lukas Wagner
g/rfc/rfc3834.html Signed-off-by: Lukas Wagner --- proxmox-notify/src/endpoints/smtp.rs | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/proxmox-notify/src/endpoints/smtp.rs b/proxmox-notify/src/endpoints/smtp.rs index 28f9909..5470257 100644 --- a/proxmox-notif

[pve-devel] [PATCH proxmox v2 1/2] notify: smtp: forward original message instead nesting

2024-01-10 Thread Lukas Wagner
- gmail - outlook - our own webmail service Originally reported in our community forum: https://forum.proxmox.com/threads/proxmox-mail-forward-sends-mails-as-eml.137710/ Signed-off-by: Lukas Wagner --- Notes: proxmox-mail-forward needs a bump once this is applied. Changes since v1:

Re: [pve-devel] [PATCH pve-docs] notifications: fix typos and improve reading flow

2024-01-10 Thread Lukas Wagner
On 1/10/24 14:14, Christian Ebner wrote: Signed-off-by: Christian Ebner --- notifications.adoc | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index cddb8ca..9be23f8 100644 --- a/notifications.adoc +++ b/notifications.ad

[pve-devel] [PATCH cluster] datacenter config: mark notification settings as deprecated/unused

2024-01-19 Thread Lukas Wagner
. Signed-off-by: Lukas Wagner --- src/PVE/DataCenterConfig.pm | 47 ++--- 1 file changed, 12 insertions(+), 35 deletions(-) diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm index c80872c..abd0bbf 100644 --- a/src/PVE/DataCenterConfig.pm +++ b

[pve-devel] [PATCH manager] Revert "ui: dc: remove notify key from datacenter option view"

2024-02-09 Thread Lukas Wagner
r (see bin/pveupdate, line 55), so there should be a way to configure this from the GUI. At some point, the `notify` parameter should be dropped, but that'd be a thing for a major release. Signed-off-by: Lukas Wagner --- https://forum.proxmox.com/threads/package-update-notifs-not-working

[pve-devel] [PATCH docs] vzdump: remove usage examples involving 'notification-{target, policy}'

2024-02-14 Thread Lukas Wagner
Also clarify in one example that using `--mailto` will bypass the notification system (at least from the user's perspective). Signed-off-by: Lukas Wagner --- vzdump.adoc | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/vzdump.adoc b/vzdump.adoc index 24a3e80..b5

Re: [pve-devel] [PATCH V2 pve-firewall 1/1] fix #1965: cache firewall/cluster.fw file

2024-02-15 Thread Lukas Wagner
On 11/25/22 15:47, Stefan Hrdlicka wrote: > for large IP sets (for example > 25k) it takes noticable longer to parse the > files, this commit caches the cluster.fw file and reduces parsing time > > Signed-off-by: Stefan Hrdlicka > --- > src/PVE/Firewall.pm | 108 ++---

[pve-devel] [PATCH manager v3 01/19] api: notifications: add 'smtp' to target index

2024-02-16 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 manager v3 03/19] ui: dc: backup: send 'id' property when starting a backup job manually

2024-02-16 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 manager v3 09/19] api: replication: include 'hostname' field for notifications

2024-02-16 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 v3 11/19] ui: utils: add overrides for translatable notification fields/values

2024-02-16 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 4c8bf9d3..80c8f0f6 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -2042,6 +2042,18 @@ Ext.define

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

2024-02-16 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 widget-toolkit v3 12/19] combogrid: add 'showClearTrigger' config

2024-02-16 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 docs v3 17/19] notification: clarify that 'hostname' does not include the domain

2024-02-16 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 manager v3 10/19] api: notification: add API for getting known metadata fields/values

2024-02-16 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 widget-toolkit v3 15/19] notification: matcher: move match-calendar fields to panel

2024-02-16 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 v3 16/19] notification: matcher: move match-severity fields to panel

2024-02-16 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 v3 13/19] notification: matcher: match-field: show known fields/values

2024-02-16 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 widget-toolkit v3 14/19] notification: matcher: move match-field formulas to local viewModel

2024-02-16 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 | 186 +- 1 file changed, 92 insertions(+), 94 deletions(-) diff --git a/src

[pve-devel] [PATCH manager/widget-toolkit/docs v3 00/19] notifications: notification metadata matching improvements

2024-02-16 Thread Lukas Wagner
, hostnames) Changelog: - v3: - Drop already applied patches for `proxmox` - Rebase onto latest master - minor conflict resolution was needed - v2: - include 'type' metadata field for forwarded mails --> otherwise it's not possible to match them - include Maximill

[pve-devel] [PATCH manager v3 04/19] ui: dc: backup: show 'Job ID' column

2024-02-16 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 manager v3 02/19] api: jobs: vzdump: pass job 'id' parameter

2024-02-16 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 v3 06/19] api: replication: add 'replication-job' to notification metadata

2024-02-16 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 manager v3 05/19] ui: dc: backup: allow to set custom job id in advanced settings

2024-02-16 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 manager v3 07/19] ui: replication: show 'Job ID' column

2024-02-16 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 docs v3 18/19] notifications: describe new notification metadata fields

2024-02-16 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 57053c8..0eeed6a 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -289,19 +289,22 @@ Notification

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

2024-02-16 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 0eeed6a..912b048 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -221,11 +221,16 @@ configurable

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

2024-02-16 Thread Lukas Wagner
Superseded-by: https://lists.proxmox.com/pipermail/pve-devel/2024-February/061778.html On 12/13/23 17:37, Lukas Wagner wrote: > This patch series attempts to improve the user experience when creating > notification matchers. > > Some of the noteworthy changes: > - Fixup inconsi

Re: [pve-devel] [PATCH widget-toolkit 0/2] notification: set 'Remove' button text to 'Reset to default' for built-ins

2024-02-16 Thread Lukas Wagner
ping - still applies on master. Retested it quickly, also seems to work fine. On 1/8/24 11:43, Lukas Wagner wrote: > ping > > On 12/14/23 10:48, Lukas Wagner wrote: >> Deleting a built-in target/matcher does not remove it, but resets it >> to its default settings. This w

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

2024-02-16 Thread Lukas Wagner
ping 🙂 still applies on latest master. Also tested it again to make sure that no other changes interfered with it in the meanwhile. On 1/8/24 11:43, Lukas Wagner wrote: > ping > > On 11/23/23 17:09, Lukas Wagner wrote: >>    - Switch order of 'mailto' and 'mailno

Re: [pve-devel] [PATCH manager v3 04/19] ui: dc: backup: show 'Job ID' column

2024-02-20 Thread Lukas Wagner
On 2/20/24 16:23, Thomas Lamprecht wrote: > I prefer just showing the ID in the advanced section of the General tab > inside the edit window instead, like your next patch does. > > As I'd slightly prefer to avoid showing those rather unwieldy IDs for a > feature that's often setup only once, espec

[pve-devel] [PATCH manager/widget-toolkit/docs v4 00/18] notifications: notification metadata matching improvements

2024-02-28 Thread Lukas Wagner
tion 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-manager: Lukas Wagner (9): api: notifications: add 'smtp' to target index

[pve-devel] [PATCH manager v4 01/18] api: notifications: add 'smtp' to target index

2024-02-28 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 manager v4 02/18] api: jobs: vzdump: pass job 'id' parameter

2024-02-28 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 v4 09/18] ui: utils: add overrides for translatable notification fields/values

2024-02-28 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 4c8bf9d3..80c8f0f6 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -2042,6 +2042,18 @@ Ext.define

[pve-devel] [PATCH widget-toolkit v4 11/18] utils: add extendable, translatable notifiction event descriptions

2024-02-28 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Utils.js | 31 +++ 1 file changed, 31 insertions(+) diff --git a/src/Utils.js b/src/Utils.js index 009e222..ff7c1a7 100644 --- a/src/Utils.js +++ b/src/Utils.js @@ -647,6 +647,37 @@ utilities

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

2024-02-28 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 widget-toolkit v4 14/18] notification: matcher: move match-calendar fields to panel

2024-02-28 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 v4 15/18] notification: matcher: move match-severity fields to panel

2024-02-28 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 v4 12/18] notification: matcher: match-field: show known fields/values

2024-02-28 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 manager v4 03/18] ui: dc: backup: send 'id' property when starting a backup job manually

2024-02-28 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 manager v4 06/18] vzdump: apt: notification: do not include domain in 'hostname' field

2024-02-28 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 v4 04/18] ui: dc: backup: allow to set custom job id in advanced settings

2024-02-28 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 manager v4 05/18] api: replication: add 'replication-job' to notification metadata

2024-02-28 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 manager v4 07/18] api: replication: include 'hostname' field for notifications

2024-02-28 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 widget-toolkit v4 10/18] combogrid: add 'showClearTrigger' config

2024-02-28 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 docs v4 16/18] notification: clarify that 'hostname' does not include the domain

2024-02-28 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 v4 17/18] notifications: describe new notification metadata fields

2024-02-28 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 57053c8..0eeed6a 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -289,19 +289,22 @@ Notification

[pve-devel] [PATCH docs v4 18/18] notifications: match-field 'exact'-mode can now match multiple values

2024-02-28 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 0eeed6a..912b048 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -221,11 +221,16 @@ configurable

[pve-devel] [PATCH widget-toolkit v4 13/18] notification: matcher: move match-field formulas to local viewModel

2024-02-28 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 | 186 +- 1 file changed, 92 insertions(+), 94 deletions(-) diff --git a/src

Re: [pve-devel] [PATCH v1 pve-esxi-import-tools 3/5] listvms: improve typing and add dataclasses to represent dicts

2024-03-20 Thread Lukas Wagner
On 2024-03-19 16:32, Max Carrara wrote: > This commit replaces some of the explicitly imported types from the > `typing` module with their inbuilt counterparts, e.g. `typing.List` > becomes `list`. This is supported since Python 3.9 [0]. > > Additionally, file paths are now represented as `pat

Re: [pve-devel] [PATCH v1 pve-esxi-import-tools 4/5] listvms: add arg parser, context manager for connections, fetch helper

2024-03-20 Thread Lukas Wagner
On 2024-03-19 16:32, Max Carrara wrote: > +def _squeeze_and_wrap(text: str) -> str: > +"""Makes it easier to write help text using multiline strings.""" > + > +text = text.replace("\n", " ").strip() > + > +# squeeze recurring spaces > +while " " in text: >

Re: [pve-devel] [PATCH v1 pve-esxi-import-tools 0/5] Improve listvms.py

2024-03-20 Thread Lukas Wagner
were able to be live-imported. > Looks good to me. Since this is type-hinted Python code, maybe the following `mypy.ini` would make sense? ``` [mypy] [mypy-pyVmomi] ignore_missing_imports = True [mypy-pyVim.*] ignore_missing_imports = True ``` Otherwise `mypy` complains about missin

[pve-devel] [PATCH proxmox] notify: fix #5274: also set 'X-Gotify-Key' header for authentication

2024-04-03 Thread Lukas Wagner
Versions of Gotify < 2.2.0 only supported the 'X-Gotify-Key' header for passing the API token. This comment sets this header in addition to the regular 'Authorization' header in order to be compatible with older Gotify servers. Signed-off-by: Lukas Wagner --- proxm

[pve-devel] [PATCH many 00/19] notifications: move template strings to template files; PBS preparations

2024-04-09 Thread Lukas Wagner
(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 proxmox: Lukas Wagner (11): notify: switch to file-based templating system no

[pve-devel] [PATCH manager 17/19] gitignore: ignore any test artifacts

2024-04-09 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index e8d1eb27..48975d55 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 proxmox 07/19] notify: api: add get_targets

2024-04-09 Thread Lukas Wagner
This method allows us to get a list of all notification targets. Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/mod.rs | 75 +++ 1 file changed, 75 insertions(+) diff --git a/proxmox-notify/src/api/mod.rs b/proxmox-notify/src/api/mod.rs index a2cf29e

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