[pve-devel] [PATCH proxmox 4/6] notify: move mail formatting to separate function

2024-06-24 Thread Lukas Wagner
This way we can test this in a sane manner and refactor safely. Signed-off-by: Lukas Wagner --- proxmox-notify/src/endpoints/sendmail.rs | 109 +-- 1 file changed, 81 insertions(+), 28 deletions(-) diff --git a/proxmox-notify/src/endpoints/sendmail.rs b/proxmox-notify/src

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

2024-07-04 Thread Lukas Wagner
On 2024-07-04 14:56, Fabian Grünbichler wrote: > Quoting Lukas Wagner (2024-06-10 10:40:19) >> This patch series attempts to improve the user experience when creating >> notification matchers. >> >> Some of the noteworthy changes: >> - Fixup inconsistent &#

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

2024-07-05 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/dc/Backup.js | 4 www/manager6/panel/BackupAdvancedOptions.js | 23 + 2 files c

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

2024-07-05 Thread Lukas Wagner
not have the 'job-id' parameter at the moment. To mitigate that, manually triggered backup jobs could be changed so that they are not performed by a direct API call by the UI, but by requesting pvescheduler to execute the job in the near future (similar to how manually triggered replication job

[pve-devel] [PATCH manager v8 04/13] api: notification: add API for getting known metadata fields/values

2024-07-05 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 manager v8 05/13] ui: utils: add overrides for translatable notification fields/values

2024-07-05 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 f5608944..5b9d86ca 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -2059,6 +2059,17 @@ Ext.define

[pve-devel] [PATCH docs v8 12/13] notifications: match-field 'exact'-mode can now match multiple values

2024-07-05 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 acca19b..bdfebd0 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -233,11 +233,16 @@ configurable

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

2024-07-05 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 v8 01/13] vzdump: common: allow 'job-id' as a parameter without being in schema

2024-07-05 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 v8 06/13] d/control: bump proxmox-widget-toolkit dependency to 4.1.4

2024-07-05 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 many v8 00/13] notifications: notification metadata matching improvements

2024-07-05 Thread Lukas Wagner
ase dep bumping - don't show Job IDs in the backup/replication job columns - v3: - Drop already applied patches for `proxmox` - Rebase onto latest master - minor conflict resolution was needed - v2: - include 'type' metadata field for forwarded mails --&g

[pve-devel] [PATCH docs v8 13/13] notifications: add note regarding when 'job-id' is set for backups

2024-07-05 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 4 1 file changed, 4 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index bdfebd0..6425e6c 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -312,6 +312,10 @@ Notification Events | `job-id` | Job

[pve-devel] [PATCH docs v8 11/13] notifications: describe new notification metadata fields

2024-07-05 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 25a9391..acca19b 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -301,19 +301,21 @@ Notification

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

2024-07-05 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 v8 10/13] notification: matcher: move match-severity fields to panel

2024-07-05 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 v8 07/13] notification: matcher: match-field: show known fields/values

2024-07-05 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

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

2024-07-05 Thread Lukas Wagner
superseded by v8! On 2024-06-10 10:40, 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 >

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

2024-07-08 Thread Lukas Wagner
On 2024-07-08 10:12, Max Carrara wrote: > On Fri Jul 5, 2024 at 3:46 PM CEST, Lukas Wagner wrote: >> This patch series attempts to improve the user experience when creating >> notification matchers. > > The below can pretty much just be considered "proofreading"

[pve-devel] [PATCH docs v9 13/13] notifications: add note regarding when 'job-id' is set for backups

2024-07-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Reviewed-by: Max Carrara --- notifications.adoc | 4 1 file changed, 4 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index bdfebd0..6425e6c 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -312,6 +312,10 @@ Notification Events

[pve-devel] [PATCH manager v9 06/13] d/control: bump proxmox-widget-toolkit dependency to 4.1.4

2024-07-08 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 Reviewed-by: Max Carrara --- debian/control | 2 +- 1 file changed, 1 inser

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

2024-07-08 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 Reviewed-by: Max Carrara

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

2024-07-08 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 Reviewed-by: Max Carrara --- www/manager6/dc/Backup.js | 4 www/manager6/panel/BackupAdvancedOptions.js | 23 ++

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

2024-07-08 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 can be considered 'internal'. Signed-off-by: Lukas Wagner Reviewed-by: Max Carrara --- src/PVE/VZDump/Common.pm | 2 +- 1 file changed, 1 inse

[pve-devel] [PATCH widget-toolkit v9 07/13] notification: matcher: match-field: show known fields/values

2024-07-08 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 v9 05/13] ui: utils: add overrides for translatable notification fields/values

2024-07-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Reviewed-by: Max Carrara --- www/manager6/Utils.js | 11 +++ 1 file changed, 11 insertions(+) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index f5608944..5b9d86ca 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -2059,6

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

2024-07-08 Thread Lukas Wagner
not have the 'job-id' parameter at the moment. To mitigate that, manually triggered backup jobs could be changed so that they are not performed by a direct API call by the UI, but by requesting pvescheduler to execute the job in the near future (similar to how manually triggered replication job

[pve-devel] [PATCH many v9 00/13] notifications: notification metadata matching improvements

2024-07-08 Thread Lukas Wagner
for the utils module so that they can be applied ahead of time to ease dep bumping - don't show Job IDs in the backup/replication job columns - v3: - Drop already applied patches for `proxmox` - Rebase onto latest master - minor conflict resolution was needed - v2: - inclu

[pve-devel] [PATCH manager v9 04/13] api: notification: add API for getting known metadata fields/values

2024-07-08 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 Reviewed-by: Max Carrara --- PVE/API2/Cluster/Notifications.pm | 139

[pve-devel] [PATCH docs v9 12/13] notifications: match-field 'exact'-mode can now match multiple values

2024-07-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Reviewed-by: Max Carrara --- notifications.adoc | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index acca19b..bdfebd0 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -233,11

[pve-devel] [PATCH docs v9 11/13] notifications: describe new notification metadata fields

2024-07-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Reviewed-by: Max Carrara --- notifications.adoc | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index 25a9391..acca19b 100644 --- a/notifications.adoc +++ b/notifications.adoc

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

2024-07-08 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 Reviewed-by: Max Carrara --- src/window/NotificationMatcherEdit.js | 189 +- 1 file changed, 95 insertions(+), 94 deletions

[pve-devel] [PATCH widget-toolkit v9 10/13] notification: matcher: move match-severity fields to panel

2024-07-08 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 Reviewed-by: Max Carrara

[pve-devel] [RFC many 00/12] notifications: add support for webhook endpoints

2024-07-10 Thread Lukas Wagner
x-widget-toolkit and libpve-rs-perl bumped - proxmox-mail-forward needs proxmox-notify bumped Bumps for PBS: - proxmox-backup needs proxmox-notify bumped - proxmox-mail-forward needs proxmox-notify bumped proxmox: Lukas Wagner (2): notify: implement webhook targets notify: add api

[pve-devel] [PATCH proxmox-backup 09/12] api: notification: add API routes for webhook targets

2024-07-10 Thread Lukas Wagner
Copied and adapted from the Gotify ones. Signed-off-by: Lukas Wagner --- src/api2/config/notifications/mod.rs | 2 + src/api2/config/notifications/webhook.rs | 175 +++ 2 files changed, 177 insertions(+) create mode 100644 src/api2/config/notifications/webhook.rs

[pve-devel] [PATCH manager 06/12] api: notifications: use get_targets impl from proxmox-notify

2024-07-10 Thread Lukas Wagner
The get_targets API endpoint is now implemented in Rust. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 34 +-- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm

[pve-devel] [PATCH proxmox 02/12] notify: add api for webhook targets

2024-07-10 Thread Lukas Wagner
r, it will be dropped. If 'secret' is present in the 'delete' array, all secrets will be dropped, apart from those which are also set/preserved in the same update call. Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/mod.rs | 20 ++ proxmox-notify

[pve-devel] [PATCH proxmox 01/12] notify: implement webhook targets

2024-07-10 Thread Lukas Wagner
ngs) - json (print a property as json) In the configuration, the body, header values and secret values are stored in base64 encoding so that we can store any string we want. Signed-off-by: Lukas Wagner --- proxmox-notify/Cargo.toml | 6 +- proxmox-notify/src/config.rs

[pve-devel] [PATCH proxmox-perl-rs 03/12] common: notify: add bindings for webhook API routes

2024-07-10 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/notify.rs | 63 1 file changed, 63 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index e1b006b..fe192d5 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs @@ -19,6 +19,9

[pve-devel] [PATCH proxmox-perl-rs 04/12] common: notify: add bindings for get_targets

2024-07-10 Thread Lukas Wagner
This allows us to drop the impl of that function on the perl side. Signed-off-by: Lukas Wagner --- common/src/notify.rs | 9 + 1 file changed, 9 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index fe192d5..0f8a35d 100644 --- a/common/src/notify.rs +++ b/common

[pve-devel] [PATCH proxmox-backup 10/12] ui: utils: enable webhook edit window

2024-07-10 Thread Lukas Wagner
This allows users to add/edit new webhook targets. Signed-off-by: Lukas Wagner --- www/Utils.js | 5 + 1 file changed, 5 insertions(+) diff --git a/www/Utils.js b/www/Utils.js index 4853be36..b715972f 100644 --- a/www/Utils.js +++ b/www/Utils.js @@ -482,6 +482,11 @@ Ext.define('PBS.

[pve-devel] [PATCH proxmox-mail-forward 12/12] bump proxmox-notify dependency

2024-07-10 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Cargo.toml | 2 +- debian/control | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f39d118..49ca079 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,4 +20,4 @@ nix = "0.26" syslog = "6.0&

[pve-devel] [PATCH manager 07/12] api: add routes for webhook notification endpoints

2024-07-10 Thread Lukas Wagner
These just call the API implementation via the perl-rs bindings. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 263 +- 1 file changed, 262 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster

[pve-devel] [PATCH widget-toolkit 05/12] notification: add UI for adding/updating webhook targets

2024-07-10 Thread Lukas Wagner
only be set/updated, but not retrieved/displayed. Signed-off-by: Lukas Wagner --- src/Makefile | 1 + src/Schema.js | 5 + src/panel/WebhookEditPanel.js | 417 ++ 3 files changed, 423 insertions(+) create mode 100644 src/panel

[pve-devel] [PATCH proxmox-backup 11/12] docs: notification: add webhook endpoint documentation

2024-07-10 Thread Lukas Wagner
Same information as in pve-docs but translated to restructured text. Signed-off-by: Lukas Wagner --- docs/notifications.rst | 100 + 1 file changed, 100 insertions(+) diff --git a/docs/notifications.rst b/docs/notifications.rst index 4ba8db86..d059fa76

[pve-devel] [PATCH docs 08/12] notification: add documentation for webhook target endpoints.

2024-07-10 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 93 ++ 1 file changed, 93 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index 25a9391..b46f1d5 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -178,6 +178,99

[pve-devel] [PATCH proxmox-perl-rs v2 03/12] common: notify: add bindings for webhook API routes

2024-07-12 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/notify.rs | 63 1 file changed, 63 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index e1b006b..fe192d5 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs @@ -19,6 +19,9

[pve-devel] [PATCH proxmox-perl-rs v2 04/12] common: notify: add bindings for get_targets

2024-07-12 Thread Lukas Wagner
This allows us to drop the impl of that function on the perl side. Signed-off-by: Lukas Wagner --- common/src/notify.rs | 9 + 1 file changed, 9 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index fe192d5..0f8a35d 100644 --- a/common/src/notify.rs +++ b/common

[pve-devel] [PATCH manager v2 06/12] api: notifications: use get_targets impl from proxmox-notify

2024-07-12 Thread Lukas Wagner
The get_targets API endpoint is now implemented in Rust. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 34 +-- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm

[pve-devel] [PATCH proxmox-backup v2 10/12] ui: utils: enable webhook edit window

2024-07-12 Thread Lukas Wagner
This allows users to add/edit new webhook targets. Signed-off-by: Lukas Wagner --- www/Utils.js | 5 + 1 file changed, 5 insertions(+) diff --git a/www/Utils.js b/www/Utils.js index 4853be36..b715972f 100644 --- a/www/Utils.js +++ b/www/Utils.js @@ -482,6 +482,11 @@ Ext.define('PBS.

[pve-devel] [PATCH proxmox-backup v2 09/12] api: notification: add API routes for webhook targets

2024-07-12 Thread Lukas Wagner
Copied and adapted from the Gotify ones. Signed-off-by: Lukas Wagner --- src/api2/config/notifications/mod.rs | 2 + src/api2/config/notifications/webhook.rs | 175 +++ 2 files changed, 177 insertions(+) create mode 100644 src/api2/config/notifications/webhook.rs

[pve-devel] [PATCH manager v2 07/12] api: add routes for webhook notification endpoints

2024-07-12 Thread Lukas Wagner
These just call the API implementation via the perl-rs bindings. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 263 +- 1 file changed, 262 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster

[pve-devel] [PATCH proxmox v2 01/12] notify: implement webhook targets

2024-07-12 Thread Lukas Wagner
ngs) - json (print a property as json) In the configuration, the body, header values and secret values are stored in base64 encoding so that we can store any string we want. Signed-off-by: Lukas Wagner --- proxmox-notify/Cargo.toml | 9 +- proxmox-notify/src/config.rs

[pve-devel] [RFC many v2 00/12] notifications: add support for webhook endpoints

2024-07-12 Thread Lukas Wagner
x-widget-toolkit and libpve-rs-perl bumped - proxmox-mail-forward needs proxmox-notify bumped Bumps for PBS: - proxmox-backup needs proxmox-notify bumped - proxmox-mail-forward needs proxmox-notify bumped Changes v1 -> v2: - Rebase proxmox-notify changes proxmox: Lukas Wagner (

[pve-devel] [PATCH proxmox-mail-forward v2 12/12] bump proxmox-notify dependency

2024-07-12 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Cargo.toml | 2 +- debian/control | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f39d118..49ca079 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,4 +20,4 @@ nix = "0.26" syslog = "6.0&

[pve-devel] [PATCH widget-toolkit v2 05/12] notification: add UI for adding/updating webhook targets

2024-07-12 Thread Lukas Wagner
only be set/updated, but not retrieved/displayed. Signed-off-by: Lukas Wagner --- src/Makefile | 1 + src/Schema.js | 5 + src/panel/WebhookEditPanel.js | 417 ++ 3 files changed, 423 insertions(+) create mode 100644 src/panel

[pve-devel] [PATCH proxmox v2 02/12] notify: add api for webhook targets

2024-07-12 Thread Lukas Wagner
r, it will be dropped. If 'secret' is present in the 'delete' array, all secrets will be dropped, apart from those which are also set/preserved in the same update call. Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/mod.rs | 20 ++ proxmox-notify

Re: [pve-devel] [pbs-devel] [PATCH proxmox v2 01/12] notify: implement webhook targets

2024-07-22 Thread Lukas Wagner
On 2024-07-17 17:35, Max Carrara wrote: >> +let handlebars = setup_handlebars(); >> +let body_template = >> self.base_64_decode(self.config.body.as_deref().unwrap_or_default())?; >> + >> +let body = handlebars >> +.render_template(&body_template, &data) >> +

Re: [pve-devel] [PATCH proxmox v2 02/12] notify: add api for webhook targets

2024-07-22 Thread Lukas Wagner
On 2024-07-17 17:35, Max Carrara wrote: >> + >> +assert_eq!(secrets[1].name, "token".to_string()); >> +assert_eq!(secrets[1].value, Some(encode("secret"))); >> +assert_eq!(secrets[0].name, "token2".to_string()); >> +assert_eq!(secrets[0].value, Some(encode("newse

Re: [pve-devel] [pbs-devel] [PATCH manager v2 07/12] api: add routes for webhook notification endpoints

2024-07-22 Thread Lukas Wagner
On 2024-07-17 17:36, Max Carrara wrote: > On Fri Jul 12, 2024 at 1:27 PM CEST, Lukas Wagner wrote: >> These just call the API implementation via the perl-rs bindings. >> >> Signed-off-by: Lukas Wagner >> --- >> PVE/API2/Cluster/Notifications.pm | 263

Re: [pve-devel] [RFC many v2 00/12] notifications: add support for webhook endpoints

2024-07-22 Thread Lukas Wagner
On 2024-07-17 17:34, Max Carrara wrote: > On Fri Jul 12, 2024 at 1:27 PM CEST, Lukas Wagner wrote: >> Sending as an RFC because I don't want this merged yet; that being >> said, the feature should be mostly finished at this point, I'd >> appreciate any reviews

Re: [pve-devel] [RFC many v2 00/12] notifications: add support for webhook endpoints

2024-07-22 Thread Lukas Wagner
On 2024-07-22 14:10, Stefan Hanreich wrote: > I got the following JS error when trying to save a secret/header/body > template with the content: `qweqwe ßẞ` > > Uncaught DOMException: String contains an invalid character > getValue https://10.101.110.1:8007/widgettoolkit/proxmoxlib.js

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

2024-08-02 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 v2 01/15] pve-rs: tfa: clippy: unnecessary `pub(self)`

2024-08-02 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 v2 04/15] pve-rs: tfa: clippy: borrowed expression impls the required traits

2024-08-02 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 v2 08/15] pmg-rs: tfa: clippy: unnecessary `pub(self)`

2024-08-02 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 v2 06/15] pve-rs: tfa: clippy: redundant slicing of the whole range

2024-08-02 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 v2 05/15] pve-rs: tfa: clippy: accessing first element with `.get(0)`

2024-08-02 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 v2 07/15] pve-rs: tfa: clippy: stripping a prefix manually

2024-08-02 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 v2 09/15] pmg-rs: tfa: clippy: question mark operator is useless here

2024-08-02 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 v2 10/15] pmg-rs: tfa: clippy: this function has too many arguments

2024-08-02 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 v2 15/15] tree-wide: run cargo fmt

2024-08-02 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- New in v2 common/src/subscription.rs | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/common/src/subscription.rs b/common/src/subscription.rs index d4c7227..594c778 100644 --- a/common/src/subscription.rs +++ b/common/src

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

2024-08-02 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-perl-rs v2 13/15] pmg-rs: acme: clippy: reference is immediately deref'd by the compiler

2024-08-02 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 v2 02/15] pve-rs: tfa: clippy: this function has too many arguments

2024-08-02 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 v2 12/15] pmg-rs: tfa: clippy: useless conversion to the same type

2024-08-02 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 v2 11/15] pmg-rs: tfa: clippy: the borrowed expression implements the required traits

2024-08-02 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

Re: [pve-devel] [PATCH proxmox-perl-rs] update to proxmox-log 0.2

2024-08-06 Thread Lukas Wagner
nged, 5 insertions(+), 7 deletions(-) > Did the same changes to get pve-rs compiling again in my local metrics branch, so consider this: Reviewed-by: Lukas Wagner -- - Lukas ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.

Re: [pve-devel] [PATCH docs] pve-network: correct language errors

2024-08-13 Thread Lukas Wagner
the bond directly as bridge port. > This can be used to make the guest network fault-tolerant. > > .Example: Use a bond as bridge port Apart from this, this looks good to me: Reviewed-by: Lukas Wagner -- - Lukas ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Re: [pve-devel] [PATCH manager 4/5] ui: vm: make cloudinit drive editable

2024-10-18 Thread Lukas Wagner
Some suggestions inline. Skimmed over the code to spot style issues, correctness was not really checked. Same remarks regarding `var` vs `let` apply also to this patch. On 2024-10-16 18:47, Daniel Kral wrote: > Implements the functionality to allow subsequent changes to the > CloudInit drive und

Re: [pve-devel] [PATCH manager 2/5] ui: vm: factor out async I/O type selector

2024-10-18 Thread Lukas Wagner
Hello, one comment inline. Skimmed over the code to spot style issues, correctness was not really checked. On 2024-10-16 18:47, Daniel Kral wrote: > Factors out the combo box used for the Async I/O combo box selector, > which is used in the Disk Edit modal window in the VM "Hardware" tab and > t

Re: [pve-devel] [PATCH manager 3/5] fix #5430: ui: vm: allow editing cdrom aio and cache options

2024-10-18 Thread Lukas Wagner
Some suggestions inline. Skimmed over the code to spot style issues, correctness was not really checked. On 2024-10-16 18:47, Daniel Kral wrote: > Adds cache and async I/O selectors to the CDROM Drive Edit modal window > in the "Hardware" tab. This allows users to set these options in the > WebGU

Re: [pve-devel] [PATCH manager] fix #5810: ui: show confirmation/warning dialog for sdn apply

2024-10-30 Thread Lukas Wagner
On 2024-10-30 13:02, Timothy Nicholson wrote: > Signed-off-by: Timothy Nicholson > --- > This patch introduces a confirmation dialog for applying the SDN > configuration. As stated in the bugzilla entry [1], the main point of this > dialog is to warn the user that any pending network configurat

Re: [pve-devel] partially-applied: [PATCH many v9 00/13] notifications: notification metadata matching improvements

2024-09-23 Thread Lukas Wagner
On 2024-07-22 19:36, Thomas Lamprecht wrote: >> Lukas Wagner (5): >> api: jobs: vzdump: pass job 'job-id' parameter >> ui: dc: backup: allow to set custom job id in advanced settings >> api: notification: add API for getting known metadata fields/values

Re: [pve-devel] [PATCH pve-manager 2/3] Fix #5708: Add CPU raw counters

2024-09-24 Thread Lukas Wagner
On 2024-09-24 14:25, Daniel Kral wrote: > On 9/17/24 07:50, Sascha Westermann via pve-devel wrote: >> Add a map containing raw values from /proc/stat and "uptime_ticks" which >> can be used in combination with cpuinfo.user_hz to calculate CPU usage >> from two samples. "uptime_ticks" is only defin

Re: [pve-devel] [PATCH widget-toolkit] fix #5836: ui: translate systemd states in ServiceView

2024-11-08 Thread Lukas Wagner
Thanks for giving this a shot! One comment inline On 2024-11-08 13:52, Timothy Nicholson wrote: > With this patch, all systemd states and unit states in the service > view use gettext to be translated. > > Signed-off-by: Timothy Nicholson > --- > As stated in the Bugzilla entry [0]: Up until n

[pve-devel] [PATCH pve-manager] api: notification targets: fix permission check for POST/PUT

2024-11-29 Thread Lukas Wagner
rum: https://forum.proxmox.com/threads/158101 Fixes: a3fe9c54 ("api: notifications: require powerful privileges for target management") Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 96 +-- 1 file changed, 40 insertions(+), 56 deletions(-) diff --gi

[pve-devel] [PATCH proxmox 2/2] notify: webhook: gotify: set HTTP request timeout

2024-11-22 Thread Lukas Wagner
seconds. Signed-off-by: Lukas Wagner --- proxmox-notify/src/endpoints/gotify.rs | 5 - proxmox-notify/src/endpoints/webhook.rs | 6 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/proxmox-notify/src/endpoints/gotify.rs b/proxmox-notify/src/endpoints/gotify.rs index

[pve-devel] [PATCH proxmox 1/2] http: sync client: add HTTP request timeout option

2024-11-22 Thread Lukas Wagner
x27;ve opted to introduce the timeout to the sync client only for now. We can always revisit this at a later time and move the option to the HttpOptions struct. Signed-off-by: Lukas Wagner --- proxmox-http/src/client/sync.rs | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff

Re: [pve-devel] [PATCH qemu-server] query-machine-capabilities: make it work on non-x86 arch

2024-11-22 Thread Lukas Wagner
Hello, instead of modifying the CFLAGS variable in the makefile, you could make use of one of GCC's built-in defines [1] to check for the machine's architecture. For instance, you could do a `#if __x86_64__` or `#if __amd64__`. [1] https://blog.kowalczyk.info/article/j/guide-to-predefined-macros

Re: [pve-devel] [PATCH storage/qemu-server/manager v6] implement ova/ovf import for file based storages

2024-11-19 Thread Lukas Wagner
On Mon Nov 18, 2024 at 2:53 PM CET, Dominik Csapak wrote: > >> nothing special, I tested the feature using the Home Assistant .ova from > >> [1]. Downloaded the OVA to my local storage, pressed "import", did not > >> change *any* settings apart from ticking "live import". > >> The import works, but

Re: [pve-devel] [PATCH storage/qemu-server/manager v6] implement ova/ovf import for file based storages

2024-11-18 Thread Lukas Wagner
On Mon Nov 18, 2024 at 2:18 PM CET, Dominik Csapak wrote: > On 11/18/24 14:06, Lukas Wagner wrote: > > On Fri Nov 15, 2024 at 4:17 PM CET, Dominik Csapak wrote: > >> This series enables importing ova/ovf from directory based storages, > >> inclusive upload/downl

Re: [pve-devel] [PATCH widget-toolkit v3 07/14] notification: add UI for adding/updating webhook targets

2024-11-19 Thread Lukas Wagner
On Mon Nov 11, 2024 at 11:09 PM CET, Thomas Lamprecht wrote: > Am 08.11.24 um 15:41 schrieb Lukas Wagner: > > The widgets for editing the headers/secrets were adapted from > > the 'Tag Edit' dialog from PVE's datacenter options. > > > > Apart from tha

Re: [pve-devel] [PATCH i18n] de: update translations

2024-11-19 Thread Lukas Wagner
On Tue Nov 19, 2024 at 2:40 PM CET, Shannon Sterz wrote: > #: proxmox-widget-toolkit/src/panel/WebhookEditPanel.js:406 > -#, fuzzy > msgid "Add {0}" > -msgstr "Modus: {0}" > +msgstr "Hinzufügen {0}" Hmmm, I think "{0} hinzufügen" would be better here? For context, this string is used for a butto

[pve-devel] [PATCH proxmox-mail-forward] buildsys: set setuid bit in installed proxmox-mail-forward binary

2024-11-19 Thread Lukas Wagner
A previous commit removed the part which sets the bit. Without the bit we cannot read the notification config, because Postfix invokes forwarding binaries as 'nobody'. Fixes: 32d813ce44b ("build: properly use cargo wrapper") Signed-off-by: Lukas Wagner --- Makefile | 1

[pve-devel] [PATCH proxmox-backup v3 14/14] docs: notification: add webhook endpoint documentation

2024-11-08 Thread Lukas Wagner
Same information as in pve-docs but translated to restructured text. Signed-off-by: Lukas Wagner --- docs/notifications.rst | 100 + 1 file changed, 100 insertions(+) diff --git a/docs/notifications.rst b/docs/notifications.rst index 4ba8db86..d059fa76

[pve-devel] [PATCH proxmox-backup v3 12/14] management cli: add CLI for webhook targets

2024-11-08 Thread Lukas Wagner
The code was copied and adapted from the gotify target CLI. Signed-off-by: Lukas Wagner --- .../notifications/mod.rs | 4 +- .../notifications/webhook.rs | 94 +++ 2 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 src/bin

[pve-devel] [PATCH docs v3 10/14] notification: add documentation for webhook target endpoints.

2024-11-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 93 ++ 1 file changed, 93 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index 2459095..b7470fe 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -178,6 +178,99

[pve-devel] [PATCH proxmox-perl-rs v3 05/14] common: notify: add bindings for get_targets

2024-11-08 Thread Lukas Wagner
This allows us to drop the impl of that function on the perl side. Signed-off-by: Lukas Wagner Tested-By: Stefan Hanreich --- common/src/notify.rs | 9 + 1 file changed, 9 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index fe192d5..0f8a35d 100644 --- a/common

[pve-devel] [PATCH proxmox-backup v3 13/14] ui: utils: enable webhook edit window

2024-11-08 Thread Lukas Wagner
This allows users to add/edit new webhook targets. Signed-off-by: Lukas Wagner Tested-By: Stefan Hanreich --- www/Utils.js | 5 + 1 file changed, 5 insertions(+) diff --git a/www/Utils.js b/www/Utils.js index 4853be36..b715972f 100644 --- a/www/Utils.js +++ b/www/Utils.js @@ -482,6

[pve-devel] [PATCH widget-toolkit v3 07/14] notification: add UI for adding/updating webhook targets

2024-11-08 Thread Lukas Wagner
only be set/updated, but not retrieved/displayed. Signed-off-by: Lukas Wagner Tested-By: Stefan Hanreich --- src/Makefile | 1 + src/Schema.js | 5 + src/Utils.js | 20 ++ src/panel/WebhookEditPanel.js | 424 ++

<    5   6   7   8   9   10   11   >