[pve-devel] [PATCH widget-toolkit] notify ui: fix `gettext` calls

2023-08-28 Thread Lukas Wagner
gettext is rather dumb and does not like multi-line strings or string interpolation. Reported-by: Maximiliano Sandoval Signed-off-by: Lukas Wagner --- src/panel/NotificationConfigView.js | 4 ++-- src/panel/SendmailEditPanel.js | 4 +--- 2 files changed, 3 insertions(+), 5 deletions

[pve-devel] [PATCH manager] notify ui: fix `gettext` calls

2023-08-28 Thread Lukas Wagner
gettext is rather dumb and does not like multi-line strings or string interpolation. Also removed some unneeded gettext calls (mail-to-root should not be translated.) Reported-by: Maximiliano Sandoval Signed-off-by: Lukas Wagner --- www/manager6/dc/NotificationEvents.js | 7 +++ 1 file

Re: [pve-devel] [PATCH common] fix #4162: added `Auto-Submitted` header to email body

2023-08-28 Thread Lukas Wagner
On 8/28/23 11:30, Gabriel Goller wrote: Already submitted the patch to `proxmox_sys::mail::sendmail` in the other mailing list (pbs-devel) :) Ah yes, I missed that. Nevermind then :) -- - Lukas ___ pve-devel mailing list pve-devel@lists.proxmox.c

Re: [pve-devel] [PATCH common] fix #4162: added `Auto-Submitted` header to email body

2023-08-28 Thread Lukas Wagner
erl impl, PBS and PVE use the Rust impl). Apart from that: From briefly skimming through the RFC the change makes sense, so consider this: Reviewed-by: Lukas Wagner -- - Lukas ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

[pve-devel] [PATCH proxmox] notify: make template rendering helpers more robust

2023-08-25 Thread Lukas Wagner
to render the whole template (leading to no notification being sent). Signed-off-by: Lukas Wagner --- proxmox-notify/examples/render.rs| 2 +- proxmox-notify/src/renderer/html.rs | 2 +- proxmox-notify/src/renderer/mod.rs | 58 ++-- proxmox-notify/src

[pve-devel] [PATCH manager] vzdump: fix notifications for backing up VMs with 2+ disks to PBS

2023-08-25 Thread Lukas Wagner
be a good idea to actually hunt down the places that produced the string instead of an integer, but as a quick fix and as a safeguard against similar lurking errors this approach is fine, IMO. Signed-off-by: Lukas Wagner --- Popped up in: https://forum.proxmox.com/threads/keine-mails-mehr-nach

Re: [pve-devel] [PATCH manager/docs/proxmox{, -perl-rs, -widget-toolkit} 0/8] notifications: add SMTP endpoint

2023-08-24 Thread Lukas Wagner
On 8/7/23 15:06, Lukas Wagner wrote: This patch series adds support for a new notification endpoint type, smtp. As the name suggests, this new endpoint allows PVE to talk to SMTP server directly, without using the system's MTA (postfix). A v2 will follow, I need to refactor a few thing

Re: [pve-devel] [PATCH docs/wt/manager] implement tagview

2023-08-23 Thread Lukas Wagner
On 8/2/23 12:53, Dominik Csapak wrote: this adds a 'tagview' to the web ui, organizing guests by their tags (for details see the pve-manager patch) Gave this a quick test on the respective latest master branches. Seems to work as advertised. Consider this: Tested-by: Lu

Re: [pve-devel] [RFC proxmox 4/7] cache: add new crate 'proxmox-cache'

2023-08-22 Thread Lukas Wagner
Thanks for the review! Comments inline. On 8/22/23 12:08, Max Carrara wrote: On 8/21/23 15:44, Lukas Wagner wrote: For now, it contains a file-backed cache with expiration logic. The cache should be safe to be accessed from multiple processes at once. This seems pretty neat! The cache

Re: [pve-devel] [RFC pve-storage 7/7] stats: api: cache storage plugin status

2023-08-22 Thread Lukas Wagner
On 8/21/23 15:44, Lukas Wagner wrote: +my $status_cache = PVE::RS::Cache->pvestatd_cache(); Urgh, just noticed that I seemingly have forgotten to commit a refactoring step in `pve-storage`. Should be `Proxmox::RS::SharedCache->new("/run/pvestatd-cache")` Everything el

[pve-devel] [RFC proxmox 4/7] cache: add new crate 'proxmox-cache'

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

[pve-devel] [RFC proxmox 5/7] cache: add debian packaging

2023-08-21 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-cache/debian/changelog | 5 proxmox-cache/debian/control | 47 ++ proxmox-cache/debian/copyright | 18 proxmox-cache/debian/debcargo.toml | 7 + 4 files changed, 77 insertions(+) create

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

2023-08-21 Thread Lukas Wagner
Cache storage plugin status so that pvestatd and API calls can use the cached results, without having to query all storage plugins again. Signed-off-by: Lukas Wagner --- src/PVE/API2/Storage/Config.pm | 10 + src/PVE/Storage.pm | 40 -- 2

[pve-devel] [RFC proxmox 2/7] sys: add make_tmp_dir

2023-08-21 Thread Lukas Wagner
Under the hood, this function calls `mkdtemp` from libc. Unfortunatly the nix crate did not provide bindings for this function, so we have to call into libc directly. Signed-off-by: Lukas Wagner --- proxmox-sys/src/fs/dir.rs | 73 +-- 1 file changed, 71

[pve-devel] [RFC proxmox 3/7] sys: fs: remove unnecessary clippy allow directive

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

[pve-devel] [RFC proxmox 1/7] sys: fs: move tests to a sub-module

2023-08-21 Thread Lukas Wagner
This ensures that test code is not compiled in regular builds Signed-off-by: Lukas Wagner --- proxmox-sys/src/fs/dir.rs | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/proxmox-sys/src/fs/dir.rs b/proxmox-sys/src/fs/dir.rs index bdef85e

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

2023-08-21 Thread Lukas Wagner
there was not much thought behind that value. The first three patches for `proxmox` are purely preparatory and cleanup. proxmox: Lukas Wagner (5): sys: fs: move tests to a sub-module sys: add make_tmp_dir sys: fs: remove unnecessary clippy allow directive cache: add new crate 'pr

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

2023-08-21 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/pkg/Makefile | 1 + common/src/cache.rs | 59 + common/src/mod.rs | 1 + pve-rs/Cargo.toml | 5 pve-rs/src/lib.rs | 1 + 5 files changed, 67 insertions(+) create mode 100644 common/src/cache.rs

[pve-devel] [PATCH proxmox 1/8] notify: add 'smtp' endpoint

2023-08-07 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 proxmox 2/8] notify: add api for smtp endpoints

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

[pve-devel] [PATCH manager/docs/proxmox{, -perl-rs, -widget-toolkit} 0/8] notifications: add SMTP endpoint

2023-08-07 Thread Lukas Wagner
tches require v6 of the original notification patches [1] series to be applied first. The patches for proxmox and proxmox-perl-rs are based of the latest master branch. [1] https://lists.proxmox.com/pipermail/pve-devel/2023-August/058618.html proxmox: Lukas Wagner (4): notify: add 'smtp

[pve-devel] [PATCH proxmox 4/8] notify: update d/control

2023-08-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/debian/control | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/proxmox-notify/debian/control b/proxmox-notify/debian/control index a5d6ea3..af936df 100644 --- a/proxmox-notify/debian/control +++ b/proxmox

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

2023-08-07 Thread Lukas Wagner
. Signed-off-by: Lukas Wagner --- src/Makefile | 2 + src/Schema.js| 5 + src/panel/EmailRecipientPanel.js | 93 +++ src/panel/SendmailEditPanel.js | 69 ++- src/panel/SmtpEditPanel.js | 192 +++ 5

[pve-devel] [PATCH pve-manager 6/8] notify: add API routes for smtp endpoints

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

[pve-devel] [PATCH proxmox 3/8] notify: fix typo in doc comments

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

[pve-devel] [PATCH proxmox-perl-rs 5/8] notify: add bindings for smtp API calls

2023-08-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/notify.rs | 110 +++ 1 file changed, 110 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index 9f44225..1d379fa 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs @@ -13,6 +13,10

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

2023-08-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 35 --- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index c4d2931..839ed41 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -72,9 +72,37

[pve-devel] [PATCH v6 proxmox-widget-toolkit 25/30] notification: add gui for sendmail notification endpoints

2023-08-03 Thread Lukas Wagner
g sendmail endpoints. The dialog is 'plugin-in' based, meaning that it consists of a base window (EndpointEditBase) and a panel that holds the actual fields for the endpoint type configuration. This will show be beneficial once the GUI for other endpoint types is added. Signed-off-by: Luka

[pve-devel] [PATCH v6 pve-manager 11/30] api: notification: add api routes for filters

2023-08-03 Thread Lukas Wagner
code. Signed-off-by: Lukas Wagner --- Notes: Changes since v4: - Explain the changes a bit more in the commit message - Factor out permission checks into a common helper - Minor code style improvements PVE/API2/Cluster/Notifications.pm | 255 ++ 1

[pve-devel] [PATCH v6 pve-manager 24/30] api: notification: make the 'mail-to-root' target visible to any user

2023-08-03 Thread Lukas Wagner
update API compat in the case that a notification shall be sent, but without any configured notification target (which will then default to 'mail-to-root'). Signed-off-by: Lukas Wagner --- Notes: Changes since v5: - Fix bug in permission check PVE/API2

[pve-devel] [PATCH v6 proxmox-widget-toolkit 27/30] notification: add gui for notification groups

2023-08-03 Thread Lukas Wagner
The GUI is based on the 'plugin-based' dialog window EndpointEditBase that was introduced in an earlier commit. Signed-off-by: Lukas Wagner --- Notes: Changes since v5: - Extended commit message Changes since v3: - Use items/advancedItems instead of columns

[pve-devel] [PATCH v6 pve-manager 22/30] ui: dc: remove notify key from datacenter option view

2023-08-03 Thread Lukas Wagner
Settings for notifications have been moved to their own view. Signed-off-by: Lukas Wagner --- Notes: Changes since v3: - New in v4 www/manager6/dc/OptionView.js | 20 1 file changed, 20 deletions(-) diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc

[pve-devel] [PATCH v6 proxmox-widget-toolkit 29/30] notification: add ui for managing notification filters

2023-08-03 Thread Lukas Wagner
This commit adds a new dialog window, containing all fields necessary to configure notification filters. Signed-off-by: Lukas Wagner --- Notes: Changes since v5: - Extended commit message Changes since v3: - use items/advancedItems instead of columns src/Makefile

[pve-devel] [PATCH v6 pve-manager 18/30] ui: allow to configure notification event -> target mapping

2023-08-03 Thread Lukas Wagner
This commit adds a new view that allows configuring notification targets for all existing notification events (replication, updates, fencing). Signed-off-by: Lukas Wagner --- Notes: Changes since v5: - Fixed missing trailing commas Changes since v4: - No changes

[pve-devel] [PATCH v6 pve-docs 30/30] add documentation for the new notification system

2023-08-03 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 159 +++ pve-admin-guide.adoc | 2 + pve-gui.adoc | 2 + vzdump.adoc | 5 ++ 4 files changed, 168 insertions(+) create mode 100644 notifications.adoc diff --git a

[pve-devel] [PATCH v6 proxmox-widget-toolkit 28/30] notification: allow to select filter for notification targets

2023-08-03 Thread Lukas Wagner
This commit adds a new selector field for existing endpoint configuration where one is able to select a notification filter. Signed-off-by: Lukas Wagner --- Notes: Changes since v5: - Extended commit message src/Makefile| 1 + src/form

[pve-devel] [PATCH v6 pve-manager 03/30] vzdump: send notifications via new notification module

2023-08-03 Thread Lukas Wagner
end_notification` - Breaking out some of the code into helper subs, hopefully reducing the spaghetti factor a bit Signed-off-by: Lukas Wagner --- PVE/API2/VZDump.pm | 10 +- PVE/VZDump.pm | 335 + test/mail_test.pl | 36 ++--- 3 files c

[pve-devel] [PATCH v6 pve-manager 14/30] api: notification: disallow removing targets if they are used

2023-08-03 Thread Lukas Wagner
Check notification targets configured in datacenter.cfg and jobs.cfg, failing if the group/endpoint to be removed is still in use there. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 44 ++- 1 file changed, 43 insertions(+), 1 deletion(-) diff

[pve-devel] [PATCH v6 pve-manager 12/30] api: notification: allow fetching notification targets

2023-08-03 Thread Lukas Wagner
The API call returns all entities that can be used as notification targets (endpoints, groups). Only targets for which the user has appropriate permissions are returned. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 81 +++ 1 file changed, 81

[pve-devel] [PATCH v6 pve-manager 13/30] api: notification: allow to test targets

2023-08-03 Thread Lukas Wagner
This API call allows the user to test a notification target. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 40 +++ 1 file changed, 40 insertions(+) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index

[pve-devel] [PATCH v6 pve-manager 08/30] api: notification: add api routes for groups

2023-08-03 Thread Lukas Wagner
code. Signed-off-by: Lukas Wagner --- Notes: Changes since v4: - Explain the changes a bit more in the commit message - Factor out permission checks into a common helper - Minor code style improvements PVE/API2/Cluster/Notifications.pm | 263 ++ 1

[pve-devel] [PATCH v6 pve-manager 05/30] api: apt: send notification via new notification module

2023-08-03 Thread Lukas Wagner
... instead of using sendmail directly If the new 'target-package-updates' is set, we send a notification to this target. If not, we continue to send a mail to root@pam (if the mail address is configured) Signed-off-by: Lukas Wagner --- PVE/API2/A

[pve-devel] [PATCH v6 pve-manager 06/30] api: replication: send notifications via new notification module

2023-08-03 Thread Lukas Wagner
ls whether to send a notification at all. Signed-off-by: Lukas Wagner --- PVE/API2/Replication.pm | 63 - 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/PVE/API2/Replication.pm b/PVE/API2/Replication.pm index 89c5a802..d61518ba 100644 --- a/PVE/API2/

[pve-devel] [PATCH v6 pve-manager 07/30] api: prepare api handler module for notification config

2023-08-03 Thread Lukas Wagner
This commit adds a new Perl module, PVE::API2::Cluster::Notification. The module will contain all API handlers for the new notification subsystem. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster.pm | 7 +++ PVE/API2/Cluster/Makefile | 1 + PVE/API2/Cluster

[pve-devel] [PATCH v6 many 00/30] fix #4156: introduce new notification system

2023-08-03 Thread Lukas Wagner
an 'anonymous' channel with a temporary sendmail endpoint, sending mails to `root` - Added new options for backup jobs - Reworked git history Versions of this patch series: v5: https://lists.proxmox.com/pipermail/pve-devel/2023-July/058467.html v4: https://lists.proxmox.com/piper

[pve-devel] [PATCH v6 pve-manager 09/30] api: notification: add api routes for sendmail endpoints

2023-08-03 Thread Lukas Wagner
code. Signed-off-by: Lukas Wagner --- Notes: Changes since v4: - Explain the changes a bit more in the commit message - Factor out permission checks into a common helper - Minor code style improvements PVE/API2/Cluster/Notifications.pm | 305 ++ 1

[pve-devel] [PATCH v6 pve-manager 15/30] ui: backup: allow to select notification target for jobs

2023-08-03 Thread Lukas Wagner
backup jobs. Some logic which automatically migrates from 'mailnotification' has been added. Signed-off-by: Lukas Wagner --- www/manager6/Makefile | 4 +- www/manager6/dc/Backup.js | 84 +-- www/manager6/form/Notifica

[pve-devel] [PATCH v6 proxmox-widget-toolkit 26/30] notification: add gui for gotify notification endpoints

2023-08-03 Thread Lukas Wagner
The GUI is based on the 'plugin-based' dialog window EndpointEditBase that was introduced in an earlier commit. Signed-off-by: Lukas Wagner --- Notes: Changes since v5: - Extended commit message Changes since v3: - Use items/advancedItems instead of col

[pve-devel] [PATCH v6 pve-manager 10/30] api: notification: add api routes for gotify endpoints

2023-08-03 Thread Lukas Wagner
code. Signed-off-by: Lukas Wagner --- Notes: Changes since v4: - Explain the changes a bit more in the commit message - Factor out permission checks into a common helper - Minor code style improvements PVE/API2/Cluster/Notifications.pm | 262 ++ 1

[pve-devel] [PATCH v6 pve-manager 17/30] ui: backup: allow to set notification-target for one-off backups

2023-08-03 Thread Lukas Wagner
In essence the same change as for backup jobs. Signed-off-by: Lukas Wagner --- www/manager6/window/Backup.js | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js index 4b21c746

[pve-devel] [PATCH v6 pve-manager 20/30] ui: perm path: add ACL paths for notifications, usb and pci mappings

2023-08-03 Thread Lukas Wagner
Suggested-by: Dominik Csapak Signed-off-by: Lukas Wagner --- Notes: In future, we could create a new API endpoint that returns all possible ACL and then use a normal store for the perm path combobox? Changes since v3: - Removed API calls that fetch targets/filters

[pve-devel] [PATCH v6 pve-manager 23/30] vzdump: use as a convention for virtual endpoints/groups

2023-08-03 Thread Lukas Wagner
Virtual (or anonymous) endpoints/groups are used for sending one-off notifications to a target that does not exist in the config. VZDump uses this to send out notification mails to those addresses configured by the `mailto` parameter. Suggested-by: Wolfgang Bumiller Signed-off-by: Lukas Wagner

[pve-devel] [PATCH v6 pve-manager 19/30] ui: add notification target configuration panel

2023-08-03 Thread Lukas Wagner
Embed the new notification target configuration panel, implemented in proxmox-widget-toolkit. Signed-off-by: Lukas Wagner --- www/manager6/dc/Config.js | 16 1 file changed, 16 insertions(+) diff --git a/www/manager6/dc/Config.js b/www/manager6/dc/Config.js index aa025c8d

[pve-devel] [PATCH v6 pve-manager 21/30] ui: perm path: increase width of the perm path selector combobox

2023-08-03 Thread Lukas Wagner
ACL paths for notification targets can become quite long, e.g.: /mappings/notifications/ Signed-off-by: Lukas Wagner --- www/manager6/form/PermPathSelector.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/manager6/form/PermPathSelector.js b/www/manager6/form/PermPathSelector.js index

[pve-devel] [PATCH v6 pve-manager 04/30] test: rename mail_test.pl to vzdump_notification_test.pl

2023-08-03 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- test/Makefile | 8 test/{mail_test.pl => vzdump_notification_test.pl} | 0 2 files changed, 4 insertions(+), 4 deletions(-) rename test/{mail_test.pl => vzdump_notification_test.pl} (100%) diff --git a/test/Ma

[pve-devel] [PATCH v6 pve-manager 16/30] ui: backup: adapt backup job details to new notification params

2023-08-03 Thread Lukas Wagner
Adapt the backup job detail view so that it shows notification targets. Signed-off-by: Lukas Wagner --- www/manager6/dc/BackupJobDetail.js | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/www/manager6/dc/BackupJobDetail.js b/www/manager6/dc

[pve-devel] [PATCH v6 pve-ha-manager 01/30] manager: send notifications via new notification module

2023-08-03 Thread Lukas Wagner
#x27; paramter which controls if notifications should be sent at all. If it is not set, we default to the old behavior, which is to send. Also add dependency to the `libpve-notify-perl` package to d/control. Signed-off-by: Lukas Wagner --- debian/control | 2 ++ src/PVE/HA/Env.pm|

[pve-devel] [PATCH v6 pve-manager 02/30] d/control: add dependency to `libpve-notify-perl`

2023-08-03 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Notes: Did not add version number since I do not know which it will be yet. debian/control | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/control b/debian/control index 3206b514..b807dbfe 100644 --- a/debian/control +++ b/debian/control

Re: [pve-devel] applied: [PATCH manager] ui: form: listfield: add 5px padding between grid and 'Add' button

2023-08-02 Thread Lukas Wagner
On Wed Aug 2, 2023 at 10:02 AM CEST, Thomas Lamprecht wrote: > FWIW, it might be also look slightly better, and save some space, if we'd > move the add button inside the grid, i.e., at the right side below the last > row. Would also shorten the way one has to move between adding a new tag input > a

Re: [pve-devel] [PATCH manager 2/2] ui: ldap: add 'Check connection' checkbox as advanced option

2023-07-28 Thread Lukas Wagner
On Thu Jul 27, 2023 at 3:33 PM CEST, Christoph Heiss wrote: > The checkbox is enabled by default for new realms, setting the new > `check-connection` parameter. > > Won't effect existing configurations, i.e. being opt-in for them, to not > break existing setups. As mentioned in my other reply, I th

Re: [pve-devel] [PATCH access-control 1/2] api: domains: add off-by-default `check-connection` parameter

2023-07-28 Thread Lukas Wagner
On Thu Jul 27, 2023 at 3:33 PM CEST, Christoph Heiss wrote: > Removes the dreaded DN regex, instead introducing a connect/bind check > on creation/update, aligning it with the way PBS does it. This is > enabled by default for new realms, but opt-in for existing, to not break > backwards-compatibili

[pve-devel] [PATCH manager] ui: form: listfield: add 5px padding between grid and 'Add' button

2023-07-27 Thread Lukas Wagner
Before, there was zero space between the the grid border line and the button, making it look a bit odd. The ListField form component is currently used in the 'User Tag Access' and 'Registered Tags' dialog windows in datacenter option view. Signed-off-by: Lukas Wagner --

Re: [pve-devel] [PATCH common/access-control v2 0/5] improve LDAP DN and bind creds checking on creation/change

2023-07-27 Thread Lukas Wagner
On 7/24/23 11:03, Christoph Heiss wrote: tl;dr implements the result of the discussion in [0]. First, this removes the dreaded LDAP DN regex, replacing it instead with a proper schema format, which does validation using Net::LDAP::Util::canonical_dn(). Already discussed off-list, but for the s

[pve-devel] [PATCH manager 1/3] ui: ldap: ad: support 'mode' paramter, replacing 'secure'

2023-07-27 Thread Lukas Wagner
ameter. The modified AuthEdit{LDAP,AD} panel will now automatically migrate to the new paramter by hooking into onGetValues/onSetValues. Signed-off-by: Lukas Wagner --- www/manager6/dc/AuthEditAD.js | 43 +++-- www/manager6/dc/AuthEditLDAP.js | 42 +++

[pve-devel] [PATCH manager 2/3] ui: ldap: ad: fix typo for verify certificate combobox

2023-07-27 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- www/manager6/dc/AuthEditAD.js | 2 +- www/manager6/dc/AuthEditLDAP.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/www/manager6/dc/AuthEditAD.js b/www/manager6/dc/AuthEditAD.js index bd46faaa..41390a47 100644 --- a/www/manager6/dc

[pve-devel] [PATCH manager 3/3] ui: ldap: ad: replace occurences of SSL with TLS

2023-07-27 Thread Lukas Wagner
Although 'SSL' is used colloquially, the proper term is 'TLS'. Signed-off-by: Lukas Wagner --- www/manager6/dc/AuthEditAD.js | 2 +- www/manager6/dc/AuthEditLDAP.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/www/manager6/dc/AuthEditAD.

[pve-devel] [PATCH v2 proxmox 3/4] notify: use HttpError from proxmox-http-error

2023-07-26 Thread Lukas Wagner
Also improve API documentation in terms of which HttpError is returned when. Signed-off-by: Lukas Wagner --- Notes: Assumes that the following two patches have been applied before, otherwise there will be a conflict (which is trivial to resolve, though) 1: "notify

[pve-devel] [PATCH v2 proxmox-perl-rs 4/4] notify: use new HttpError type

2023-07-26 Thread Lukas Wagner
Use `proxmox-http-error::HttpError` instead of `proxmox-notify::api::ApiError`. Also factoring out the digest decoding into a small helper. Signed-off-by: Lukas Wagner --- common/src/notify.rs | 77 +++- pve-rs/Cargo.toml| 1 + 2 files changed, 42

[pve-devel] [PATCH v2 proxmox 1/4] http-error: add new http-error crate

2023-07-26 Thread Lukas Wagner
age. Also add some smoke-tests to make sure that the `http_bail` and `http_err` macros actually produce valid code. Suggested-by: Wolfgang Bumiller Signed-off-by: Lukas Wagner --- Cargo.toml| 2 + proxmox-http-error/Cargo.toml | 16 +++ proxmox-http-error/src/l

[pve-devel] [PATCH v2 proxmox{, -perl-rs} 0/4] move `HttpError` from `proxmox-router` into its own crate

2023-07-26 Thread Lukas Wagner
. - Drop unused 'derive' features for the serde dependency proxmox: Lukas Wagner (3): http-error: add new http-error crate router: re-export `HttpError` from `proxmox-http-error` notify: use HttpError from proxmox-http-error Cargo.toml | 2 + proxmox-

[pve-devel] [PATCH v2 proxmox 2/4] router: re-export `HttpError` from `proxmox-http-error`

2023-07-26 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-router/Cargo.toml | 1 + proxmox-router/src/error.rs | 42 + proxmox-router/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 42 deletions(-) diff --git a/proxmox-router/Cargo.toml b/proxmox-router/Cargo.toml

Re: [pve-devel] [pbs-devel] [PATCH proxmox 2/5] router: rest-server: auth-api: use new http-error crate

2023-07-26 Thread Lukas Wagner
On 7/26/23 15:41, Wolfgang Bumiller wrote: I'd like `proxmox-router` to keep re-exporting both the `http_bail/err` macros and the `HttpError` type. This would require much fewer changes at all the call sites, and we don't need to explicitly depend on the new crate everywhere. Its point is mostly

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

2023-07-26 Thread Lukas Wagner
hough, since we do not know if the token has separated privileges enable or not. Signed-off-by: Lukas Wagner --- www/manager6/dc/ACLView.js | 14 ++ 1 file changed, 14 insertions(+) diff --git a/www/manager6/dc/ACLView.js b/www/manager6/dc/ACLView.js index 79f900cd..ec81a487 100644 --

[pve-devel] [PATCH proxmox-backup 5/5] use `HttpError` and macros from `proxmox-http-error` crate

2023-07-26 Thread Lukas Wagner
The `HttpError` type from `proxmox-router` has been moved into its own crate. Signed-off-by: Lukas Wagner --- Cargo.toml | 3 +++ src/api2/access/openid.rs | 5 ++--- src/api2/access/tfa.rs | 3 ++- src/api2/admin/datastore.rs

[pve-devel] [PATCH proxmox-perl-rs 4/5] notify: use new HttpError type

2023-07-26 Thread Lukas Wagner
Use `proxmox-http-error::HttpError` instead of `proxmox-notify::api::ApiError`. Signed-off-by: Lukas Wagner --- common/src/notify.rs | 77 +++- pve-rs/Cargo.toml| 1 + 2 files changed, 42 insertions(+), 36 deletions(-) diff --git a/common/src

[pve-devel] [PATCH proxmox 2/5] router: rest-server: auth-api: use new http-error crate

2023-07-26 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-auth-api/Cargo.toml | 2 ++ proxmox-auth-api/src/api/access.rs | 3 +- proxmox-rest-server/Cargo.toml | 1 + proxmox-rest-server/src/h2service.rs | 2 +- proxmox-rest-server/src/rest.rs | 2 +- proxmox-router/Cargo.toml

[pve-devel] [PATCH proxmox 3/5] notify: use HttpError from proxmox-http-error

2023-07-26 Thread Lukas Wagner
Also improve API documentation in terms of which HttpError is returned when. Signed-off-by: Lukas Wagner --- Notes: Assumes that the following two patches have been applied before, otherwise there will be a conflict (which is trivial to resolve, though) 1: "notify

[pve-devel] [PATCH proxmox{, -perl-rs, -backup} 0/5] move `HttpError` from `proxmox-router` into its own crate

2023-07-26 Thread Lukas Wagner
previously used it's own error type, is now also using the new crate. proxmox: Lukas Wagner (3): http-error: add new http-error crate router: rest-server: auth-api: use new http-error crate notify: use HttpError from proxmox-http-error Cargo.toml | 2 + pr

[pve-devel] [PATCH proxmox 1/5] http-error: add new http-error crate

2023-07-26 Thread Lukas Wagner
age. Also add some smoke-tests to make sure that the `http_bail` and `http_err` macros actually produce valid code. Suggested-by: Wolfgang Bumiller Signed-off-by: Lukas Wagner --- Cargo.toml| 2 + proxmox-http-error/Cargo.toml | 16 +++ proxmox-http-error/src/l

Re: [pve-devel] [PATCH manager] vzdump: use as a convention for virtual endpoints/groups

2023-07-26 Thread Lukas Wagner
Note, this commit has now been included in v5 of the original patch series. On 7/24/23 13:26, Lukas Wagner wrote: Virtual (or anonymous) endpoints/groups are used for sending one-off notifications to a target that does not exist in the config. VZDump uses this to send out notification mails

[pve-devel] [PATCH v5 pve-docs 30/30] add documentation for the new notification system

2023-07-26 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 159 +++ pve-admin-guide.adoc | 2 + pve-gui.adoc | 2 + vzdump.adoc | 5 ++ 4 files changed, 168 insertions(+) create mode 100644 notifications.adoc diff --git a

[pve-devel] [PATCH v5 pve-manager 18/30] ui: allow to configure notification event -> target mapping

2023-07-26 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Notes: Changes since v3: - Show warnings only if 'never' is selected - Also show a warning for disabled package update notifications - Some code style touch ups - Added some comments www/manager6/Makefile |

[pve-devel] [PATCH v5 pve-manager 15/30] ui: backup: allow to select notification target for jobs

2023-07-26 Thread Lukas Wagner
backup jobs. Some logic which automatically migrates from 'mailnotification' has been added. Signed-off-by: Lukas Wagner --- www/manager6/Makefile | 4 +- www/manager6/dc/Backup.js | 84 +-- www/manager6/form/Notifica

[pve-devel] [PATCH v5 pve-manager 03/30] vzdump: send notifications via new notification module

2023-07-26 Thread Lukas Wagner
end_notification` - Breaking out some of the code into helper subs, hopefully reducing the spaghetti factor a bit Signed-off-by: Lukas Wagner --- PVE/API2/VZDump.pm | 10 +- PVE/VZDump.pm | 335 + test/mail_test.pl | 36 ++--- 3 files c

[pve-devel] [PATCH v5 pve-manager 24/30] api: notification: make the 'mail-to-root' target visible to any user

2023-07-26 Thread Lukas Wagner
update API compat in the case that a notification shall be sent, but without any configured notification target (which will then default to 'mail-to-root'). Signed-off-by: Lukas Wagner --- Notes: New in v5 PVE/API2/Cluster/Notifications.pm | 31 ++- 1 fil

[pve-devel] [PATCH v5 pve-manager 10/30] api: notification: add api routes for gotify endpoints

2023-07-26 Thread Lukas Wagner
code. Signed-off-by: Lukas Wagner --- Notes: Changes since v4: - Explain the changes a bit more in the commit message - Factor out permission checks into a common helper - Minor code style improvements PVE/API2/Cluster/Notifications.pm | 262 ++ 1

[pve-devel] [PATCH v5 pve-manager 23/30] vzdump: use as a convention for virtual endpoints/groups

2023-07-26 Thread Lukas Wagner
Virtual (or anonymous) endpoints/groups are used for sending one-off notifications to a target that does not exist in the config. VZDump uses this to send out notification mails to those addresses configured by the `mailto` parameter. Suggested-by: Wolfgang Bumiller Signed-off-by: Lukas Wagner

[pve-devel] [PATCH v5 proxmox-widget-toolkit 26/30] notification: add gui for gotify notification endpoints

2023-07-26 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Notes: Changes since v3: - Use items/advancedItems instead of columns src/Makefile | 1 + src/Schema.js| 5 src/panel/GotifyEditPanel.js | 44 3 files changed, 50 insertions

[pve-devel] [PATCH v5 pve-manager 19/30] ui: add notification target configuration panel

2023-07-26 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- www/manager6/dc/Config.js | 16 1 file changed, 16 insertions(+) diff --git a/www/manager6/dc/Config.js b/www/manager6/dc/Config.js index aa025c8d..9ba7b301 100644 --- a/www/manager6/dc/Config.js +++ b/www/manager6/dc/Config.js @@ -329,6 +329,22

[pve-devel] [PATCH v5 pve-manager 20/30] ui: perm path: add ACL paths for notifications, usb and pci mappings

2023-07-26 Thread Lukas Wagner
Suggested-by: Dominik Csapak Signed-off-by: Lukas Wagner --- Notes: In future, we could create a new API endpoint that returns all possible ACL and then use a normal store for the perm path combobox? Changes since v3: - Removed API calls that fetch targets/filters

[pve-devel] [PATCH v5 pve-ha-manager 01/30] manager: send notifications via new notification module

2023-07-26 Thread Lukas Wagner
#x27; paramter which controls if notifications should be sent at all. If it is not set, we default to the old behavior, which is to send. Also add dependency to the `libpve-notify-perl` package to d/control. Signed-off-by: Lukas Wagner --- debian/control | 2 ++ src/PVE/HA/Env.pm|

[pve-devel] [PATCH v5 pve-manager 07/30] api: prepare api handler module for notification config

2023-07-26 Thread Lukas Wagner
This commit adds a new Perl module, PVE::API2::Cluster::Notification. The module will contain all API handlers for the new notification subsystem. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster.pm | 7 +++ PVE/API2/Cluster/Makefile | 1 + PVE/API2/Cluster

[pve-devel] [PATCH v5 pve-manager 06/30] api: replication: send notifications via new notification module

2023-07-26 Thread Lukas Wagner
ls whether to send a notification at all. Signed-off-by: Lukas Wagner --- PVE/API2/Replication.pm | 63 - 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/PVE/API2/Replication.pm b/PVE/API2/Replication.pm index 89c5a802..d61518ba 100644 --- a/PVE/API2/

[pve-devel] [PATCH v5 proxmox-widget-toolkit 28/30] notification: allow to select filter for notification targets

2023-07-26 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile| 1 + src/form/NotificationFilterSelector.js | 58 + src/panel/GotifyEditPanel.js| 9 src/panel/NotificationConfigView.js | 4 ++ src/panel/NotificationGroupEditPanel.js | 9

[pve-devel] [PATCH v5 proxmox-widget-toolkit 25/30] notification: add gui for sendmail notification endpoints

2023-07-26 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Notes: Changes since v3: - extracted validator function - use items/advancedItems instead of columns src/Makefile | 4 + src/Schema.js| 8 ++ src/data/model/NotificationConfig.js | 8 ++ src

[pve-devel] [PATCH v5 pve-manager 09/30] api: notification: add api routes for sendmail endpoints

2023-07-26 Thread Lukas Wagner
code. Signed-off-by: Lukas Wagner --- Notes: Changes since v4: - Explain the changes a bit more in the commit message - Factor out permission checks into a common helper - Minor code style improvements PVE/API2/Cluster/Notifications.pm | 305 ++ 1

[pve-devel] [PATCH v5 proxmox-widget-toolkit 29/30] notification: add ui for managing notification filters

2023-07-26 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Notes: Changes since v3: - use items/advancedItems instead of columns src/Makefile | 3 +- src/data/model/NotificationConfig.js | 9 ++ src/panel/NotificationConfigView.js | 119 +++ src/window

[pve-devel] [PATCH v5 proxmox-widget-toolkit 27/30] notification: add gui for notification groups

2023-07-26 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Notes: Changes since v3: - Use items/advancedItems instead of columns - Call initField in EndpointSelector - Minor code style improvements src/Makefile| 1 + src/Schema.js | 5 + src

[pve-devel] [PATCH v5 pve-manager 11/30] api: notification: add api routes for filters

2023-07-26 Thread Lukas Wagner
code. Signed-off-by: Lukas Wagner --- Notes: Changes since v4: - Explain the changes a bit more in the commit message - Factor out permission checks into a common helper - Minor code style improvements PVE/API2/Cluster/Notifications.pm | 255 ++ 1

[pve-devel] [PATCH v5 pve-manager 22/30] ui: dc: remove notify key from datacenter option view

2023-07-26 Thread Lukas Wagner
Settings for notifications have been moved to their own view. Signed-off-by: Lukas Wagner --- Notes: Changes since v3: - New in v4 www/manager6/dc/OptionView.js | 20 1 file changed, 20 deletions(-) diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc

<    2   3   4   5   6   7   8   9   10   >