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 B539F73478 for ; Thu, 7 Oct 2021 10:28:08 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id AC2C216658 for ; Thu, 7 Oct 2021 10:27:38 +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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id D68A216617 for ; Thu, 7 Oct 2021 10:27:33 +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 A4B4744626 for ; Thu, 7 Oct 2021 10:27:28 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Thu, 7 Oct 2021 10:27:27 +0200 Message-Id: <20211007082727.1385888-9-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211007082727.1385888-1-d.csapak@proxmox.com> References: <20211007082727.1385888-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.308 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [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: Thu, 07 Oct 2021 08:28:08 -0000 we can now show the id (since its not autogenerated anymore), 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, + }, { 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', -- 2.30.2