[pve-devel] [PATCH manager 2/2] ui: one-shot backup: remove 'auto' notification mode for clarity

Lukas Wagner l.wagner at proxmox.com
Tue Jun 17 10:26:03 CEST 2025


Thanks for testing and the review!

On  2025-06-13 15:51, Michael Köppl wrote:
>> --- a/www/manager6/window/Backup.js
>> +++ b/www/manager6/window/Backup.js
>> @@ -33,22 +33,22 @@ Ext.define('PVE.window.Backup', {
>>  	let mailtoField = Ext.create('Ext.form.field.Text', {
>>  	    fieldLabel: gettext('Send email to'),
>>  	    name: 'mailto',
>> +	    hidden: true,
>>  	    emptyText: Proxmox.Utils.noneText,
>>  	});
>>  
>>  	let notificationModeSelector = Ext.create({
>>  	    xtype: 'proxmoxKVComboBox',
>>  	    comboItems: [
>> -		['auto', gettext('Auto')],
>> -		['legacy-sendmail', gettext('Email (legacy)')],
>> -		['notification-system', gettext('Notification system')],
>> +		['notification-system', gettext('Use global settings')],
>> +		['legacy-sendmail', gettext('Use sendmail')],
>>  	    ],
>> -	    fieldLabel: gettext('Notification mode'),
>> +	    fieldLabel: gettext('Notification'),
>>  	    name: 'notification-mode',
>> -	    value: 'auto',
>> +	    value: 'notification-system',
>>  	    listeners: {
>>  		change: function(field, value) {
>> -		    mailtoField.setDisabled(value === 'notification-system');
>> +		    mailtoField.setHidden(value === 'notification-system');
> 
> While this does work, I think I'd prefer it if the field is always
> visible and is enabled or disabled depending on the selection of the
> notification system. With the hidden field, UI shifts a tiny bit once it
> becomes visible (Firefox 139.0.1). Since the Backup window is not super
> cluttered, I think this additional field could always be visible, but
> that's just my two cents.
> 

In my first draft I left the field in the 'disabled' state, but later I realized that this
can become misleading in some rare cases. The fields in this dialog are pre-filled with
the values from /etc/vzdump.conf. If there is a setting for 'mailto' in this file,
this field in the UI will contain the configured email address, even if the field is
disabled (which is the case when "Use global settings" is selected).
I think some users could interpret this is a "The global settings will send to this address" -
for this reason I opted to hide the field.

Admittedly, this is somewhat of an edge case, but I think I'd prefer to keep
hiding the field. Regarding the small shift of UI elements I'll include a fix
in v2.

-- 
- Lukas





More information about the pve-devel mailing list