From: Lukas Wagner <l.wagner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 5/9] ui: tape backup job: move notification settings to a separate tab
Date: Mon, 23 Jun 2025 16:13:11 +0200 [thread overview]
Message-ID: <20250623141315.288681-7-l.wagner@proxmox.com> (raw)
In-Reply-To: <20250623141315.288681-1-l.wagner@proxmox.com>
For consistency, use the same UI approach as for PVE's backup jobs. Tape
backup jobs now gain a new tab for all notification related settings:
( ) Use global notification settings
(x) Use sendmail to send an email (legacy)
Recipient: [ ]
'Recipient' is disabled when the first radio control is selected.
The term 'Notification System' is altogether from the UI. It is not
necessarily clear to a user that this refers to the settings in
Configuration > Notifications.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
www/tape/window/TapeBackupJob.js | 109 +++++++++++++++++++------------
1 file changed, 67 insertions(+), 42 deletions(-)
diff --git a/www/tape/window/TapeBackupJob.js b/www/tape/window/TapeBackupJob.js
index c06311bf..ad03b607 100644
--- a/www/tape/window/TapeBackupJob.js
+++ b/www/tape/window/TapeBackupJob.js
@@ -46,23 +46,6 @@ Ext.define('PBS.TapeManagement.BackupJobEdit', {
},
},
- viewModel: {
- data: {
- notificationMode: '__default__',
- },
- formulas: {
- notificationSystemSelected: (get) => get('notificationMode') === 'notification-system',
- },
- },
-
- initComponent: function () {
- let me = this;
- // Automatically select the new system for new jobs
- let mode = me.isCreate ? 'notification-system' : '__default__';
- me.getViewModel().set('notificationMode', mode);
- me.callParent();
- },
-
items: {
xtype: 'tabpanel',
bodyPadding: 10,
@@ -126,31 +109,6 @@ Ext.define('PBS.TapeManagement.BackupJobEdit', {
fieldLabel: gettext('Drive'),
name: 'drive',
},
- {
- xtype: 'proxmoxKVComboBox',
- comboItems: [
- ['__default__', `${Proxmox.Utils.defaultText} (Email)`],
- ['legacy-sendmail', gettext('Email (legacy)')],
- ['notification-system', gettext('Notification system')],
- ],
- fieldLabel: gettext('Notification mode'),
- name: 'notification-mode',
- bind: {
- value: '{notificationMode}',
- },
- },
- {
- xtype: 'pmxUserSelector',
- name: 'notify-user',
- fieldLabel: gettext('Notify User'),
- emptyText: 'root@pam',
- allowBlank: true,
- value: null,
- renderer: Ext.String.htmlEncode,
- bind: {
- disabled: '{notificationSystemSelected}',
- },
- },
],
column2: [
@@ -260,6 +218,73 @@ Ext.define('PBS.TapeManagement.BackupJobEdit', {
},
],
},
+ {
+ xtype: 'inputpanel',
+ title: gettext('Notifications'),
+
+ viewModel: {
+ data: {
+ notificationMode: undefined,
+ },
+ formulas: {
+ notificationSystemSelected: (get) =>
+ get('notificationMode')['notification-mode'] === 'notification-system',
+ },
+ },
+
+ onSetValues: function (values) {
+ let me = this;
+
+ let mode = values['notification-mode'];
+ me.getViewModel().set('notificationMode', { 'notification-mode': mode });
+
+ return values;
+ },
+
+ items: [
+ {
+ 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('Recipient'),
+ emptyText: 'root@pam',
+ allowBlank: false,
+ value: null,
+ renderer: Ext.String.htmlEncode,
+ padding: '0 0 0 50',
+ disabled: true,
+ bind: {
+ disabled: '{notificationSystemSelected}',
+ },
+ },
+ ],
+ },
],
},
});
--
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 ` Lukas Wagner [this message]
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 ` [pbs-devel] [PATCH proxmox-backup 9/9] ui: datastore options: notification: use radio controls to select mode Lukas Wagner
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-7-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