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
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
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
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
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
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
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
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
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
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
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(().unwrap
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
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(().unwrap
Signed-off-by: Lukas Wagner
---
common/src/apt/repositories.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/src/apt/repositories.rs b/common/src/apt/repositories.rs
index e710819..6e0a196 100644
--- a/common/src/apt/repositories.rs
+++ b/common/src/apt
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
On 2024-06-20 12:21, Fabian Grünbichler wrote:
> with a follow-up to adapt the Makefiles - please test builds when
> touching the build system ;)
>
Sorry, only did a `cargo build` - :S My bad
--
- Lukas
___
pve-devel mailing list
Whoops, seems like I was on stable rust (1.78) and the warning only appears
there
but not on 1.77 (packaged rust) - but we can apply that already anyway,
saves us the trouble once we are on 1.78 :)
On 2024-06-20 10:59, Lukas Wagner wrote:
> Fixes the following new warning that appeared af
Fixes the following new warning that appeared after switching
to rust 1.77:
warning: `proxmox-perl-rs/pve-rs/.cargo/config` is deprecated in
favor of `config.toml`
Signed-off-by: Lukas Wagner
---
pmg-rs/.cargo/{config => config.toml} | 0
pve-rs/.cargo/{config => config.toml} | 0
2
Most of the changes were done when adapting the PVE docs to
the new PBS notification system, so now we 'backport' those
improvements.
Signed-off-by: Lukas Wagner
---
notifications.adoc | 99 +++---
1 file changed, 67 insertions(+), 32 deletions(-)
diff
of known fields/values is retrieved from new API endpoints.
Some values are marked 'internal' by the backend. This means that the
'value' field was not user-created (counter example: backup job
IDs) and can therefore be used as a base for translations.
Signed-off-by: Lukas Wagner
Tested
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
Signed-off-by: Lukas Wagner
---
www/manager6/Utils.js | 11 +++
1 file changed, 11 insertions(+)
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 5b0d51eb..ea448bfb 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -2060,6 +2060,17 @@ Ext.define
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.pm | 3
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
'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(-)
diff --git a/src/PVE
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
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
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
Signed-off-by: Lukas Wagner
---
notifications.adoc | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/notifications.adoc b/notifications.adoc
index 57053c8..dec878a 100644
--- a/notifications.adoc
+++ b/notifications.adoc
@@ -289,19 +289,21 @@ Notification
Signed-off-by: Lukas Wagner
---
notifications.adoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/notifications.adoc b/notifications.adoc
index 07f0b3e..9c5228c 100644
--- a/notifications.adoc
+++ b/notifications.adoc
@@ -295,7 +295,7 @@ Notification Events
[width=&quo
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
Signed-off-by: Lukas Wagner
---
notifications.adoc | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/notifications.adoc b/notifications.adoc
index dec878a..07f0b3e 100644
--- a/notifications.adoc
+++ b/notifications.adoc
@@ -221,11 +221,16 @@ configurable
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(-)
ler in UI patches
pve-guest-common:
Lukas Wagner (1):
vzdump: common: allow 'job-id' as a parameter without being in schema
src/PVE/VZDump/Common.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
pve-manager:
Lukas Wagner (9):
api: jobs: vzdump: pass job 'job-id' parameter
ui: dc
This might be useful if somebody wants to match on the new
'backup-job' field in a notification match rule.
Signed-off-by: Lukas Wagner
---
www/manager6/Utils.js | 1 +
www/manager6/dc/Backup.js | 4
www/manager6/panel/BackupAdvancedOptions.js | 23
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
This allows users to create notification match rules for specific
replication jobs, if they so desire.
Signed-off-by: Lukas Wagner
---
PVE/API2/Replication.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/API2/Replication.pm b/PVE/API2/Replication.pm
index d84ac1ab
Signed-off-by: Lukas Wagner
---
www/manager6/dc/Backup.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index 4ba80b31..4b45b5c6 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -604,11 +604,12
On 2024-04-30 17:28, Max Carrara wrote:
> Make the regex more maintainable declaring it as a variable, breaking it
> up and commenting it by using the x flag.
>
> Also remove the part that parses our Debian revision (e.g. -pve1) from
> the version, as we do not actually include that in our
On 2024-04-30 17:28, Max Carrara wrote:
> The logic of the `render_version` function is split up in order to
> handle how the version is displayed depending on the type of the row.
>
> If the parsed version is `undefined` or the row marks the beginning of
> the tree, an empty string is now
On 2024-04-30 17:28, Max Carrara wrote:
> This commit adds `PVE.Utils.parse_ceph_buildcommit`, which can be used
> to get the full hash "eccf199d..." in parentheses from a string like
> the following:
>
> ceph version 17.2.7 (eccf199d63457659c09677399928203b7903c888) quincy
> (stable)
>
>
et uses a different
icon to
signal an outdated OSD than the version column in the OSD tree view - maybe
it would make sense
to use the same icon here?
- The 'Detail' view for OSDs could also show the commit hash, right now it
only shows e.g. 18.2.2 (reef)
With the nits
Signed-off-by: Lukas Wagner
---
debian/pve-ha-manager.install | 3 +++
src/Makefile | 1 +
src/PVE/HA/Env/PVE2.pm| 4 ++--
src/PVE/HA/NodeStatus.pm | 20 +--
src/PVE/HA/Sim/Env.pm
proxmox_notify's api functions have been changed so that they take
ownership of config structs.
Signed-off-by: Lukas Wagner
---
common/src/notify.rs | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/common/src/notify.rs b/common/src/notify.rs
index
cosmetics/style
proxmox-perl-rs:
Lukas Wagner (3):
notify: use file based notification templates
notify: don't pass config structs by reference
notify: adapt to Option> to Vec changes in proxmox_notify
common/src/notify.rs | 48 +---
1 file changed,
Signed-off-by: Lukas Wagner
---
common/src/notify.rs | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/common/src/notify.rs b/common/src/notify.rs
index 00a6056..e1b006b 100644
--- a/common/src/notify.rs
+++ b/common/src/notify.rs
@@ -153,8 +153,8 @@ mod export
This commit adapts notification sending for
- package update
- replication
- backups
to use named templates (installed in /usr/share/pve-manager/templates)
instead of passing template strings defined in code to the
notification stack.
Signed-off-by: Lukas Wagner
---
Makefile
testing if
the backup logs are shortened if they ware too long - so they are just
removed.
Signed-off-by: Lukas Wagner
---
test/Makefile| 6 +-
test/vzdump_notification_test.pl | 101 ---
2 files changed, 1 insertion(+), 106 deletions(-)
delete
Signed-off-by: Lukas Wagner
---
.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index e8d1eb27..481ae1e0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,5 @@ dest/
/www/mobile/pvemanager-mobile.js
/www/touch/touch-[0-9]*/
/pve-manager-[0-9
The notification system will now load template files from a defined
location. The template to use is now passed to proxmox_notify, instead
of separate template strings for subject/body.
Signed-off-by: Lukas Wagner
---
src/PVE/Notify.pm | 29 -
1 file changed, 12
Instead of passing literal template strings to the notification
system, we now only pass an identifier. This identifier will be used
load the template files from a product-specific directory.
Signed-off-by: Lukas Wagner
---
common/src/notify.rs | 8 +++-
1 file changed, 3 insertions(+), 5
On 2024-04-22 11:10, Fiona Ebner wrote:
>> +| Cluster node fenced |`fencing` | `error` |
>> `hostname`
>> +| Storage replication job failed |`replication` | `error` |
>> `hostname`, `job-id`
>> +| Backup succeeded |`vzdump` | `info`
Signed-off-by: Lukas Wagner
---
notifications.adoc | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/notifications.adoc b/notifications.adoc
index 57053c8..dec878a 100644
--- a/notifications.adoc
+++ b/notifications.adoc
@@ -289,19 +289,21 @@ Notification
Signed-off-by: Lukas Wagner
---
notifications.adoc | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/notifications.adoc b/notifications.adoc
index dec878a..07f0b3e 100644
--- a/notifications.adoc
+++ b/notifications.adoc
@@ -221,11 +221,16 @@ configurable
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
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
This might be useful if somebody wants to match on the new
'backup-job' field in a notification match rule.
Signed-off-by: Lukas Wagner
---
www/manager6/Utils.js | 1 +
www/manager6/panel/BackupAdvancedOptions.js | 15 +++
2 files changed, 16 insertions
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
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 5216198b..89929d21 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -2060,6 +2060,17 @@ Ext.define
of known fields/values is retrieved from new API endpoints.
Some values are marked 'internal' by the backend. This means that the
'value' field was not user-created (counter example: backup job
IDs) and can therefore be used as a base for translations.
Signed-off-by: Lukas Wagner
Tested
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
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
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
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
-b trailer in UI patches
pve-guest-common:
Lukas Wagner (1):
vzdump: common: allow 'job-id' as a parameter without being in schema
src/PVE/VZDump/Common.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
pve-manager:
Lukas Wagner (8):
api: jobs: vzdump: pass job 'job-id' parameter
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.pm | 3
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
Signed-off-by: Lukas Wagner
---
www/manager6/dc/Backup.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index 2619a77b..d68f553c 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -586,11 +586,12
'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(-)
diff --git a/src/PVE
' HTML/plaintext formatting. However,
in hindsight this turned out to be pretty finicky. Since the
current changes lay the foundations for user-customizable notification
templates, I ripped these abstractions out. Now there are simply two
templates, one for plaintext, one for HTML.
Signed-off-by: Lukas
This saves us from some of the awkward cloning steps when updating.
Suggested-by: Wolfgang Bumiller
Signed-off-by: Lukas Wagner
Tested-by: Folke Gleumes
Reviewed-by: Fiona Ebner
---
proxmox-notify/src/api/gotify.rs | 46 +-
proxmox-notify/src/api/matcher.rs | 38
Suggested-by: Wolfgang Bumiller
Signed-off-by: Lukas Wagner
Tested-by: Folke Gleumes
Reviewed-by: Fiona Ebner
---
proxmox-notify/src/api/matcher.rs | 27 +++
proxmox-notify/src/api/mod.rs | 22 +---
proxmox-notify/src/api/sendmail.rs | 22
proxmox_notify's api functions have been changed so that they take
ownership of config structs.
Signed-off-by: Lukas Wagner
Tested-by: Folke Gleumes
Reviewed-by: Fiona Ebner
---
common/src/notify.rs | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git
The API endpoints in Proxmox Backup Server require ApiType to be
implemented for any deserialized parameter.
Signed-off-by: Lukas Wagner
Reviewed-by: Fiona Ebner
---
proxmox-notify/src/endpoints/gotify.rs | 3 +++
proxmox-notify/src/endpoints/sendmail.rs | 7 +++
proxmox-notify/src
Instead of passing literal template strings to the notification
system, we now only pass an identifier. This identifier will be used
load the template files from a product-specific directory.
Signed-off-by: Lukas Wagner
Tested-by: Folke Gleumes
Reviewed-by: Fiona Ebner
---
common/src
Signed-off-by: Lukas Wagner
Tested-by: Folke Gleumes
Reviewed-by: Fiona Ebner
---
common/src/notify.rs | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/common/src/notify.rs b/common/src/notify.rs
index 00a6056..e1b006b 100644
--- a/common/src/notify.rs
+++ b
Signed-off-by: Lukas Wagner
Reviewed-by: Fiona Ebner
---
proxmox-notify/src/lib.rs | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs
index 91c0b61..292396b 100644
--- a/proxmox-notify/src/lib.rs
+++ b/proxmox
The old notification stack in proxmox-backup includes the nodename, so
we include it here as well.
Signed-off-by: Lukas Wagner
Reviewed-by: Fiona Ebner
---
proxmox-notify/src/context/pbs.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proxmox-notify/src/context/pbs.rs
b
This method allows us to get a list of all notification targets.
Signed-off-by: Lukas Wagner
Reviewed-by: Fiona Ebner
---
proxmox-notify/src/api/mod.rs | 77 +++
1 file changed, 77 insertions(+)
diff --git a/proxmox-notify/src/api/mod.rs b/proxmox-notify/src
We need this for queuing notifications on PBS from the unprivileged
proxy process.
Signed-off-by: Lukas Wagner
Reviewed-by: Fiona Ebner
---
proxmox-notify/Cargo.toml | 1 +
proxmox-notify/src/lib.rs | 11 +++
2 files changed, 12 insertions(+)
diff --git a/proxmox-notify/Cargo.toml b
This commit adapts notification sending for
- package update
- replication
- backups
to use named templates (installed in /usr/share/pve-manager/templates)
instead of passing template strings defined in code to the
notification stack.
Signed-off-by: Lukas Wagner
Tested-by: Folke
Signed-off-by: Lukas Wagner
Tested-by: Folke Gleumes
Reviewed-by: Fiona Ebner
---
debian/pve-ha-manager.install | 3 +++
src/Makefile | 1 +
src/PVE/HA/Env/PVE2.pm| 4 ++--
src/PVE/HA/NodeStatus.pm
testing if
the backup logs are shortened if they ware too long - so they are just
removed.
Signed-off-by: Lukas Wagner
Reviewed-by: Fiona Ebner
---
test/Makefile| 6 +-
test/vzdump_notification_test.pl | 101 ---
2 files changed, 1 insertion
The notification system will now load template files from a defined
location. The template to use is now passed to proxmox_notify, instead
of separate template strings for subject/body.
Signed-off-by: Lukas Wagner
Tested-by: Folke Gleumes
Reviewed-by: Fiona Ebner
---
src/PVE/Notify.pm | 29
Tests now have their own context, so requiring pve-context is not
necessary any more.
Signed-off-by: Lukas Wagner
Tested-by: Folke Gleumes
Reviewed-by: Fiona Ebner
---
proxmox-notify/src/api/gotify.rs | 2 +-
proxmox-notify/src/api/matcher.rs | 2 +-
proxmox-notify/src/api/sendmail.rs
Signed-off-by: Lukas Wagner
Reviewed-by: Fiona Ebner
---
.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index e8d1eb27..481ae1e0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,5 @@ dest/
/www/mobile/pvemanager-mobile.js
/www/touch/touch-[0-9
Signed-off-by: Lukas Wagner
Reviewed-by: Fiona Ebner
---
proxmox-notify/src/renderer/mod.rs | 29 +
1 file changed, 29 insertions(+)
diff --git a/proxmox-notify/src/renderer/mod.rs
b/proxmox-notify/src/renderer/mod.rs
index a51ece6..ddb241d 100644
--- a/proxmox
Signed-off-by: Lukas Wagner
Reviewed-by: Fiona Ebner
---
proxmox-notify/Cargo.toml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/proxmox-notify/Cargo.toml b/proxmox-notify/Cargo.toml
index 3e8d253..185b50a 100644
--- a/proxmox-notify/Cargo.toml
+++ b/proxmox-notify
It uses proxmox_sys::nodename - the dep is needed, otherwise the code
does not compile in some feature flag permutations.
Signed-off-by: Lukas Wagner
Tested-by: Folke Gleumes
Reviewed-by: Fiona Ebner
---
proxmox-notify/Cargo.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
noteworthy: Change template path from /usr/share/proxmox-ve
to /usr/share/
- apart from that mostly just cosmetics/style
proxmox:
Lukas Wagner (12):
notify: switch to file-based templating system
notify: make api methods take config struct ownership
notify: convert Option> -&g
On 2024-04-19 15:45, Fiona Ebner wrote:
> Am 15.04.24 um 10:26 schrieb Lukas Wagner:
>> +
>> +__PACKAGE__->register_method ({
>> +name => 'get_field_values',
>> +path => 'values',
>> +method => 'GET',
>> +descrip
On 2024-04-19 15:11, Fiona Ebner wrote:
> Am 19.04.24 um 14:22 schrieb Lukas Wagner:
>>
>>
>> On 2024-04-19 14:02, Fiona Ebner wrote:
>>> Am 15.04.24 um 10:26 schrieb Lukas Wagner:
>>>> This allows users to create notification match rules for specifi
On 2024-04-19 10:34, Fiona Ebner wrote:
> Am 09.04.24 um 15:25 schrieb Lukas Wagner:
>> +/// Get a list of all notification targets.
>> +pub fn get_targets(config: ) -> Result, HttpError> {
>> +let mut targets = Vec::new();
>> +
>> +#[cfg(fe
On 2024-04-19 10:45, Fiona Ebner wrote:
> Nit: I always like a quick sentence for who needs it for such changes.
>
> Am 09.04.24 um 15:25 schrieb Lukas Wagner:
>> Signed-off-by: Lukas Wagner
>> ---
>> proxmox-notify/src/lib.rs | 10 +++---
>> 1 file chan
On 2024-04-19 12:31, Fiona Ebner wrote:
> Am 15.04.24 um 10:26 schrieb 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/
On 2024-04-19 14:02, Fiona Ebner wrote:
> Am 15.04.24 um 10:26 schrieb 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/Repl
On 2024-04-19 13:22, Fabian Grünbichler wrote:
> On April 19, 2024 12:09 pm, Fiona Ebner wrote:
>> Am 09.04.24 um 15:25 schrieb Lukas Wagner:
>>> Bumps/dependencies:
>>> - proxmox_notify
>>> - libproxmox-rs-perl/libpve-rs-perl (needs bumped proxmox_n
On 2024-04-19 11:59, Fiona Ebner wrote:
> Am 09.04.24 um 15:25 schrieb Lukas Wagner:
>> diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
>> index 152eb3e5..2ea626f0 100644
>> --- a/PVE/VZDump.pm
>> +++ b/PVE/VZDump.pm
>
> The existing $subject_template and $body_tem
On 2024-04-19 10:57, Fiona Ebner wrote:
> Am 19.04.24 um 10:45 schrieb Lukas Wagner:
>>> Who adds the template files? I don't see a patch for proxmox-ve in this
>>> series. Does this series require some versioned breaks to some package?
>>
>> The pve-manage
On 2024-04-19 10:14, Fiona Ebner wrote:
> Am 09.04.24 um 15:25 schrieb Lukas Wagner:
>> Instead of passing the template strings for subject and body when
>> constructing a notification, we pass only the name of a template.
>> When rendering the template, the name of
1 - 100 of 894 matches
Mail list logo