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 EB9C46720C for ; Tue, 25 Aug 2020 17:30:40 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E8F948E8E for ; Tue, 25 Aug 2020 17:30:40 +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 ESMTPS id 49A758E83 for ; Tue, 25 Aug 2020 17:30:40 +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 1590144673 for ; Tue, 25 Aug 2020 17:30:40 +0200 (CEST) From: Thomas Lamprecht To: pbs-devel@lists.proxmox.com Date: Tue, 25 Aug 2020 17:30:28 +0200 Message-Id: <20200825153028.22466-2-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200825153028.22466-1-t.lamprecht@proxmox.com> References: <20200825153028.22466-1-t.lamprecht@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.081 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [rec.data, parentnode.id] Subject: [pbs-devel] [PATCH backup 2/2] ui: datastore content: show last verify result from a snapshot 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: Tue, 25 Aug 2020 15:30:41 -0000 Double-click on the verify grid-cell of a specific snapshot (not the group) opens the relevant task log. The date of the last verify is shown as tool-tip. Signed-off-by: Thomas Lamprecht --- The double-click to open the last verify task log of a snapshot could be more intuitive if it was a full blown button, or action button - as now one needs to know/guess that they can double-click that field. Could be definitively improved. www/DataStoreContent.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/www/DataStoreContent.js b/www/DataStoreContent.js index 62e57817..6a5cec0e 100644 --- a/www/DataStoreContent.js +++ b/www/DataStoreContent.js @@ -10,6 +10,7 @@ Ext.define('pbs-data-store-snapshots', { }, 'files', 'owner', + 'verification', { name: 'size', type: 'int', allowNull: true, }, { name: 'crypt-mode', @@ -209,6 +210,10 @@ Ext.define('PBS.DataStoreContent', { group.size = item.size; group.owner = item.owner; } + if (item.verification && + (!group.verification || group.verification.state !== 'failed')) { + group.verification = item.verification; + } } group.count = group.children.length; @@ -563,6 +568,41 @@ Ext.define('PBS.DataStoreContent', { return (iconTxt + PBS.Utils.cryptText[v]) || Proxmox.Utils.unknownText } }, + { + header: gettext('Verify State'), + sortable: true, + dataIndex: 'verification', + renderer: (v, meta, record) => { + if (v === undefined || v === null || !v.state) { + //meta.tdCls = "x-grid-row-loading"; + return record.data.leaf ? '' : gettext('None'); + } + let task = Proxmox.Utils.parse_task_upid(v.upid); + let verify_time = Proxmox.Utils.render_timestamp(task.starttime); + let iconCls = v.state === 'ok' ? 'check good' : 'times critical'; + let tip = `Verify task started on ${verify_time}`; + if (record.parentNode.id === 'root') { + tip = v.state === 'ok' + ? 'All verification OK in backup group' + : 'At least one failed verification in backup group!'; + } + return ` + ${v.state} + `; + }, + listeners: { + dblclick: function(view, el, row, col, ev, rec) { + let data = rec.data || {}; + let verify = data.verification; + if (verify && verify.upid && rec.parentNode.id !== 'root') { + let win = Ext.create('Proxmox.window.TaskViewer', { + upid: verify.upid, + }); + win.show(); + } + }, + }, + }, ], tbar: [ -- 2.27.0