From: Lukas Wagner <l.wagner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 9/9] ui: datastore options: notification: use radio controls to select mode
Date: Mon, 23 Jun 2025 16:13:15 +0200 [thread overview]
Message-ID: <20250623141315.288681-11-l.wagner@proxmox.com> (raw)
In-Reply-To: <20250623141315.288681-1-l.wagner@proxmox.com>
This makes it consistent with tape backup job options and PVE's backup
jobs. It also visualizes the dependency of 'notify' and 'notify-user'
onto 'notification-mode'.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
www/window/NotifyOptions.js | 43 ++++++++++++++++++++++++++-----------
1 file changed, 31 insertions(+), 12 deletions(-)
diff --git a/www/window/NotifyOptions.js b/www/window/NotifyOptions.js
index 12a2e561..fc43de65 100644
--- a/www/window/NotifyOptions.js
+++ b/www/window/NotifyOptions.js
@@ -49,7 +49,8 @@ Ext.define('PBS.window.NotifyOptions', {
notificationMode: '__default__',
},
formulas: {
- notificationSystemSelected: (get) => get('notificationMode') === 'notification-system',
+ notificationSystemSelected: (get) =>
+ get('notificationMode')['notification-mode'] === 'notification-system',
},
},
@@ -74,23 +75,36 @@ Ext.define('PBS.window.NotifyOptions', {
},
items: [
{
- xtype: 'proxmoxKVComboBox',
- comboItems: [
- ['__default__', `${Proxmox.Utils.defaultText} (Email)`],
- ['legacy-sendmail', gettext('Email (legacy)')],
- ['notification-system', gettext('Notification system')],
- ],
- deleteEmpty: true,
- fieldLabel: gettext('Notification mode'),
- name: 'notification-mode',
+ xtype: 'radiogroup',
+ height: '15px',
+ layout: {
+ type: 'vbox',
+ },
bind: {
value: '{notificationMode}',
},
+ items: [
+ {
+ xtype: 'radiofield',
+ name: 'notification-mode',
+ inputValue: 'notification-system',
+ boxLabel: gettext('Use global notification settings'),
+ cbind: {
+ checked: '{isCreate}',
+ },
+ },
+ {
+ xtype: 'radiofield',
+ name: 'notification-mode',
+ inputValue: 'legacy-sendmail',
+ boxLabel: gettext('Use sendmail to send an email (legacy)'),
+ },
+ ],
},
{
xtype: 'pmxUserSelector',
name: 'notify-user',
- fieldLabel: gettext('Notify User'),
+ fieldLabel: gettext('Recipient'),
emptyText: 'root@pam',
value: null,
allowBlank: true,
@@ -99,6 +113,7 @@ Ext.define('PBS.window.NotifyOptions', {
bind: {
disabled: '{notificationSystemSelected}',
},
+ padding: '0 0 0 50',
},
{
xtype: 'pbsNotifyType',
@@ -109,6 +124,7 @@ Ext.define('PBS.window.NotifyOptions', {
bind: {
disabled: '{notificationSystemSelected}',
},
+ padding: '0 0 0 50',
},
{
xtype: 'pbsNotifyType',
@@ -119,6 +135,7 @@ Ext.define('PBS.window.NotifyOptions', {
bind: {
disabled: '{notificationSystemSelected}',
},
+ padding: '0 0 0 50',
},
{
xtype: 'pbsNotifyErrorDefaultType',
@@ -129,6 +146,7 @@ Ext.define('PBS.window.NotifyOptions', {
bind: {
disabled: '{notificationSystemSelected}',
},
+ padding: '0 0 0 50',
},
{
xtype: 'pbsNotifyType',
@@ -139,6 +157,7 @@ Ext.define('PBS.window.NotifyOptions', {
bind: {
disabled: '{notificationSystemSelected}',
},
+ padding: '0 0 0 50',
},
],
},
@@ -151,7 +170,7 @@ Ext.define('PBS.window.NotifyOptions', {
'verify-new': values['verify-new'],
'notification-mode': values['notification-mode']
? values['notification-mode']
- : '__default__',
+ : 'notification-system',
};
let notify = {};
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2025-06-23 14:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 14:13 [pbs-devel] [PATCH proxmox{,-backup} 00/10] change of default notification-mode; UX improvements Lukas Wagner
2025-06-23 14:13 ` [pbs-devel] [PATCH proxmox 1/1] pbs-api-types: change default notification mode to 'notification-system' Lukas Wagner
2025-07-15 22:47 ` [pbs-devel] applied: " Thomas Lamprecht
2025-06-23 14:13 ` [pbs-devel] [PATCH proxmox-backup 1/9] cli: manager: move update-to-prune-jobs command to new migrate-config sub-command Lukas Wagner
2025-07-15 23:09 ` Thomas Lamprecht
2025-07-15 23:10 ` Thomas Lamprecht
2025-06-23 14:13 ` [pbs-devel] [PATCH proxmox-backup 2/9] cli: manager: add 'migrate-config default-notification-mode' command Lukas Wagner
2025-06-23 14:13 ` [pbs-devel] [PATCH proxmox-backup 3/9] d/postinst: migrate notification mode default on update Lukas Wagner
2025-06-23 14:13 ` [pbs-devel] [PATCH proxmox-backup 4/9] ui: datastore options view: switch to new notification-mode default Lukas Wagner
2025-06-23 14:13 ` [pbs-devel] [PATCH proxmox-backup 5/9] ui: tape backup job: move notification settings to a separate tab Lukas Wagner
2025-06-23 14:13 ` [pbs-devel] [PATCH proxmox-backup 6/9] ui: one-shot tape backup: use same wording as tape-backup jobs Lukas Wagner
2025-06-23 14:13 ` [pbs-devel] [PATCH proxmox-backup 7/9] ui: datastore options: notifications: use same jargon as tape-jobs and PVE Lukas Wagner
2025-06-23 14:13 ` [pbs-devel] [PATCH proxmox-backup 8/9] ui: datastore options: drop notify and notify-user rows Lukas Wagner
2025-06-23 14:13 ` Lukas Wagner [this message]
2025-07-15 23:13 ` [pbs-devel] [PATCH proxmox{,-backup} 00/10] change of default notification-mode; UX improvements Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250623141315.288681-11-l.wagner@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox