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 ESMTPS id B9A6C7BEB0 for ; Wed, 3 Nov 2021 10:21:39 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id AEF3A110D6 for ; Wed, 3 Nov 2021 10:21:39 +0100 (CET) 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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 1F627110C8 for ; Wed, 3 Nov 2021 10:21:39 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E7DB146038 for ; Wed, 3 Nov 2021 10:21:38 +0100 (CET) To: pve-devel@lists.proxmox.com, Dominik Csapak References: <20211007082727.1385888-1-d.csapak@proxmox.com> <20211007082727.1385888-9-d.csapak@proxmox.com> From: Fabian Ebner Message-ID: Date: Wed, 3 Nov 2021 10:21:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211007082727.1385888-9-d.csapak@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 1.509 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -2.549 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: [pve-devel] [PATCH manager 7/7] ui: dc/backup: show id+schedule instead of dow+starttime X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2021 09:21:39 -0000 Am 07.10.21 um 10:27 schrieb Dominik Csapak: > we can now show the id (since its not autogenerated anymore), But it's hidden below ;) I get that the ID is not very telling for existing jobs, but for jobs with user-chosen IDs it would allow to distinguish them more quickly. > and we can always show/edit the schedule instead of the dow+starttime > > also add an 'ID' field to the edit/create window and update the > backupinfo window as well > > Signed-off-by: Dominik Csapak > --- > www/manager6/dc/Backup.js | 47 ++++++++++++++---------------- > www/manager6/dc/BackupJobDetail.js | 10 ++----- > 2 files changed, 24 insertions(+), 33 deletions(-) > > diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js > index adefc5f4..87b3d70a 100644 > --- a/www/manager6/dc/Backup.js > +++ b/www/manager6/dc/Backup.js > @@ -176,24 +176,22 @@ Ext.define('PVE.dc.BackupEdit', { > }); > > let column1 = [ > - nodesel, > - storagesel, > { > - xtype: 'pveDayOfWeekSelector', > - name: 'dow', > - fieldLabel: gettext('Day of week'), > - multiSelect: true, > - value: ['sat'], > + xtype: 'pmxDisplayEditField', > + name: 'id', > + fieldLabel: gettext('ID'), > + renderer: Ext.htmlEncode, > allowBlank: false, > + minLength: 4, > + editable: me.isCreate, > }, > + nodesel, > + storagesel, > { > - xtype: 'timefield', > - fieldLabel: gettext('Start Time'), > - name: 'starttime', > - format: 'H:i', > - formatText: 'HH:MM', > - value: '00:00', > + xtype: 'pveCalendarEvent', > + fieldLabel: gettext('Schedule'), > allowBlank: false, > + name: 'schedule', > }, > selModeField, > selPool, > @@ -390,7 +388,7 @@ Ext.define('PVE.dc.BackupEdit', { > success: function(response, options) { > let data = response.result.data; > > - data.dow = data.dow.split(','); > + data.dow = (data.dow || '').split(','); > > if (data.all || data.exclude) { > if (data.exclude) { > @@ -532,6 +530,8 @@ Ext.define('PVE.dc.BackupView', { > delete job.starttime; > delete job.dow; > delete job.id; > + delete job.schedule; > + delete job.type; > delete job.node; > job.all = job.all === true ? 1 : 0; > > @@ -714,6 +714,11 @@ Ext.define('PVE.dc.BackupView', { > disabledCls: 'x-item-enabled', > stopSelection: false, > }, > + { > + header: gettext('ID'), > + dataIndex: 'id', > + hidden: true Here (also misses trailing comma). > + }, > { > header: gettext('Node'), > width: 100, > @@ -727,17 +732,9 @@ Ext.define('PVE.dc.BackupView', { > }, > }, > { > - header: gettext('Day of week'), > - width: 200, > - sortable: false, > - dataIndex: 'dow', > - renderer: PVE.Utils.render_backup_days_of_week, > - }, > - { > - header: gettext('Start Time'), > - width: 60, > - sortable: true, > - dataIndex: 'starttime', > + header: gettext('Schedule'), > + width: 150, > + dataIndex: 'schedule', > }, > { > header: gettext('Storage'), > diff --git a/www/manager6/dc/BackupJobDetail.js b/www/manager6/dc/BackupJobDetail.js > index b91cb1b7..19b3b1a3 100644 > --- a/www/manager6/dc/BackupJobDetail.js > +++ b/www/manager6/dc/BackupJobDetail.js > @@ -184,14 +184,8 @@ Ext.define('PVE.dc.BackupInfo', { > }, > { > xtype: 'displayfield', > - name: 'dow', > - fieldLabel: gettext('Day of week'), > - renderer: PVE.Utils.render_backup_days_of_week, > - }, > - { > - xtype: 'displayfield', > - name: 'starttime', > - fieldLabel: gettext('Start Time'), > + name: 'schedule', > + fieldLabel: gettext('Schedule'), > }, > { > xtype: 'displayfield', >