From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 4BADB70580 for ; Wed, 12 May 2021 21:24:51 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 37652827F for ; Wed, 12 May 2021 21:24:51 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id A4A6C8250 for ; Wed, 12 May 2021 21:24:50 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 6EF7046556 for ; Wed, 12 May 2021 21:24:50 +0200 (CEST) Message-ID: <119fc81a-0bf6-3bc9-8eac-7b2572e9f94c@proxmox.com> Date: Wed, 12 May 2021 21:24:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Thunderbird/89.0 Content-Language: en-US To: Proxmox Backup Server development discussion , Dominik Csapak References: <20210512144232.5643-1-d.csapak@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20210512144232.5643-1-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.007 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pbs-devel] [PATCH proxmox-backup] ui: add node options under 'Configuration -> Options' X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2021 19:24:51 -0000 On 12.05.21 16:42, Dominik Csapak wrote: > for now only http-proxy lives there, but we will add more options later, > such as > * email from > * default gui language > that combination of quite general names, configuration and options, both meaning basically the same general thing, is really confusing.. I'll see if I can come up with a better name or alternative placing.. > Signed-off-by: Dominik Csapak > --- > www/Makefile | 1 + > www/SystemConfiguration.js | 5 +++++ > www/config/NodeOptionView.js | 42 ++++++++++++++++++++++++++++++++++++ > 3 files changed, 48 insertions(+) > create mode 100644 www/config/NodeOptionView.js > > diff --git a/www/Makefile b/www/Makefile > index f0b795ca..517cbd23 100644 > --- a/www/Makefile > +++ b/www/Makefile > @@ -54,6 +54,7 @@ JSSRC= \ > config/VerifyView.js \ > config/WebauthnView.js \ > config/CertificateView.js \ > + config/NodeOptionView.js \ > window/ACLEdit.js \ > window/AddTfaRecovery.js \ > window/AddTotp.js \ > diff --git a/www/SystemConfiguration.js b/www/SystemConfiguration.js > index 025e0273..211c9c08 100644 > --- a/www/SystemConfiguration.js > +++ b/www/SystemConfiguration.js > @@ -65,6 +65,11 @@ Ext.define('PBS.SystemConfiguration', { > }, > ], > }, > + { > + title: gettext('Options'), > + itemId: 'options', > + xtype: 'pbsNodeOptionView', > + }, > ], > > initComponent: function() { > diff --git a/www/config/NodeOptionView.js b/www/config/NodeOptionView.js > new file mode 100644 > index 00000000..beeea35f > --- /dev/null > +++ b/www/config/NodeOptionView.js > @@ -0,0 +1,42 @@ > +Ext.define('PBS.NodeOptionView', { > + extend: 'Proxmox.grid.ObjectGrid', > + alias: 'widget.pbsNodeOptionView', > + > + monStoreErrors: true, > + > + url: `/api2/json/nodes/${Proxmox.NodeName}/config`, > + editorConfig: { > + url: `/api2/extjs/nodes/${Proxmox.NodeName}/config`, > + }, > + interval: 5000, > + cwidth1: 200, > + > + listeners: { > + itemdblclick: function() { this.run_editor() }, > + }, > + > + tbar: [ > + { > + text: gettext('Edit'), > + xtype: 'proxmoxButton', > + disabled: true, > + handler: function() { this.up('grid').run_editor(); }, > + } > + ], > + > + initComponent: function() { > + let me = this; > + > + me.add_text_row('http-proxy', gettext('HTTP proxy'), { > + defaultValue: Proxmox.Utils.noneText, > + vtype: 'HttpProxy', > + deleteEmpty: true, > + }); > + > + me.callParent(); > + > + me.on('activate', me.rstore.startUpdate); > + me.on('destroy', me.rstore.stopUpdate); > + me.on('deactivate', me.rstore.stopUpdate); > + }, > +}); >