[pbs-devel] [PATCH proxmox-backup 4/4] ui: add new options tab under configuration

Dominik Csapak d.csapak at proxmox.com
Thu Dec 16 11:04:07 CET 2021


if i remember correctly, thomas did not like the
'configuration' -> 'options' approach (too generic)
or did that change @thomas?

(also the 'general' panel does make this not better imho)

On 12/14/21 13:44, Hannes Laimer wrote:
> ... and add email-from + move http-proxy there
> 
> Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
> ---
>   www/SystemConfiguration.js   | 25 +++++++++++++++++++++++--
>   www/config/NodeOptionView.js |  9 +++++++++
>   2 files changed, 32 insertions(+), 2 deletions(-)
> 
> diff --git a/www/SystemConfiguration.js b/www/SystemConfiguration.js
> index 86371193..ac24bff9 100644
> --- a/www/SystemConfiguration.js
> +++ b/www/SystemConfiguration.js
> @@ -63,9 +63,25 @@ Ext.define('PBS.SystemConfiguration', {
>   		    title: gettext('Webauthn'),
>   		    xtype: 'pbsWebauthnConfigView',
>   		},
> +	    ],
> +	},
> +	{
> +	    title: gettext('Options'),
> +	    itemId: 'options',
> +	    xtype: 'panel',
> +	    layout: {
> +		type: 'vbox',
> +		align: 'stretch',
> +		multi: true,
> +	    },
> +	    defaults: {
> +		collapsible: true,
> +		animCollapse: false,
> +		margin: '10 10 0 10',
> +	    },
> +	    items: [
>   		{
> -		    // FIXME: this is only a semi-OK place as long as there's only the http-proxy in there
> -		    title: gettext('HTTP proxy'),
> +		    title: gettext('General'),
>   		    xtype: 'pbsNodeOptionView',
>   		},
>   	    ],
> @@ -86,6 +102,11 @@ Ext.define('PBS.SystemConfiguration', {
>   	Ext.Array.forEach(authentication.query(), function(item) {
>   	    item.relayEvents(authentication, ['activate', 'deactivate', 'destroy']);
>   	});
> +
> +	let options = me.getComponent('options');
> +	Ext.Array.forEach(options.query(), function(item) {
> +	    item.relayEvents(options, ['activate', 'deactivate', 'destroy']);
> +	});
>       },
>   });
>   
> diff --git a/www/config/NodeOptionView.js b/www/config/NodeOptionView.js
> index 55271a91..64f3d792 100644
> --- a/www/config/NodeOptionView.js
> +++ b/www/config/NodeOptionView.js
> @@ -34,6 +34,15 @@ Ext.define('PBS.NodeOptionView', {
>   	    deleteEmpty: true,
>   	    onlineHelp: 'node_options_http_proxy',
>   	},
> +	{
> +	    xtype: 'text',
> +	    name: 'email-from',
> +	    defaultValue: gettext('root@$hostname'),
> +	    text: gettext('Email from address'),
> +	    vtype: 'proxmoxMail',
> +	    deleteEmpty: true,
> +	},
> +
>       ],
>   
>       initComponent: function() {






More information about the pbs-devel mailing list