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)) (No client certificate requested) by lists.proxmox.com (Postfix) with UTF8SMTPS id 5AEC660786 for ; Thu, 8 Oct 2020 11:59:01 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with UTF8SMTP id 4719ADB95 for ; Thu, 8 Oct 2020 11:59:01 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with UTF8SMTPS id 97959DB87 for ; Thu, 8 Oct 2020 11:59:00 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with UTF8SMTP id 55C7345C35 for ; Thu, 8 Oct 2020 11:59:00 +0200 (CEST) To: pbs-devel@lists.proxmox.com References: <20201007090324.42928-1-h.laimer@proxmox.com> <20201007090324.42928-10-h.laimer@proxmox.com> From: Dominik Csapak Message-ID: <63716ca1-3519-5752-4924-5f5c36deabbd@proxmox.com> Date: Thu, 8 Oct 2020 11:58:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:82.0) Gecko/20100101 Thunderbird/82.0 MIME-Version: 1.0 In-Reply-To: <20201007090324.42928-10-h.laimer@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.502 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) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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 v2 proxmox-backup 09/15] ui: add verify job edit window 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: Thu, 08 Oct 2020 09:59:01 -0000 one comment inline On 10/7/20 11:03 AM, Hannes Laimer wrote: > Signed-off-by: Hannes Laimer > --- > www/Makefile | 1 + > www/window/VerifyJobEdit.js | 89 +++++++++++++++++++++++++++++++++++++ > 2 files changed, 90 insertions(+) > create mode 100644 www/window/VerifyJobEdit.js > > diff --git a/www/Makefile b/www/Makefile > index a6c46718..e04af930 100644 > --- a/www/Makefile > +++ b/www/Makefile > @@ -20,6 +20,7 @@ JSSRC= \ > config/DataStoreConfig.js \ > window/UserEdit.js \ > window/UserPassword.js \ > + window/VerifyJobEdit.js \ > window/RemoteEdit.js \ > window/SyncJobEdit.js \ > window/ACLEdit.js \ > diff --git a/www/window/VerifyJobEdit.js b/www/window/VerifyJobEdit.js > new file mode 100644 > index 00000000..985d2ef6 > --- /dev/null > +++ b/www/window/VerifyJobEdit.js > @@ -0,0 +1,89 @@ > +Ext.define('PBS.window.VerifyJobEdit', { > + extend: 'Proxmox.window.Edit', > + alias: 'widget.pbsVerifyJobEdit', > + mixins: ['Proxmox.Mixin.CBind'], > + > + userid: undefined, > + > + onlineHelp: 'verifyjobs', > + > + isAdd: true, > + > + subject: gettext('VerifyJob'), > + > + fieldDefaults: { labelWidth: 120 }, > + > + cbindData: function(initialConfig) { > + let me = this; > + > + let baseurl = '/api2/extjs/config/verify'; > + let id = initialConfig.id; > + > + me.isCreate = !id; > + me.url = id ? `${baseurl}/${id}` : baseurl; > + me.method = id ? 'PUT' : 'POST'; > + me.autoLoad = !!id; > + return { }; > + }, > + > + items: { > + xtype: 'inputpanel', > + column1: [ > + { > + fieldLabel: gettext('Verify Job ID'), > + xtype: 'pmxDisplayEditField', > + name: 'id', > + renderer: Ext.htmlEncode, > + allowBlank: false, > + minLength: 4, > + cbind: { > + editable: '{isCreate}', > + }, > + }, > + { > + fieldLabel: gettext('Datastore'), > + xtype: 'pbsDataStoreSelector', > + allowBlank: false, > + name: 'store', > + }, > + { > + xtype: 'proxmoxintegerfield', > + fieldLabel: gettext('Days valid'), > + minValue: 1, > + value: '', > + allowBlank: true, > + name: 'outdated-after' i would also add a cbind: { deleteEmpty: '{!isCreate}' } here (basically every field that is optional and can be empty should have that) > + }, > + ], > + > + column2: [ > + { > + fieldLabel: gettext('Ignore verified'), > + xtype: 'proxmoxcheckbox', > + name: 'ignore-verified', > + uncheckedValue: false, > + value: true, > + }, > + { > + fieldLabel: gettext('Schedule'), > + xtype: 'pbsCalendarEvent', > + name: 'schedule', > + emptyText: gettext('none'), > + cbind: { > + deleteEmpty: '{!isCreate}', > + }, > + }, > + ], > + > + columnB: [ > + { > + fieldLabel: gettext('Comment'), > + xtype: 'proxmoxtextfield', > + name: 'comment', > + cbind: { > + deleteEmpty: '{!isCreate}', > + }, > + }, > + ], > + }, > +}); >