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 8721792E0 for ; Thu, 31 Mar 2022 12:47:28 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 818401A140 for ; Thu, 31 Mar 2022 12:47:28 +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 3E7351A12F for ; Thu, 31 Mar 2022 12:47:27 +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 09E9E41BAD for ; Thu, 31 Mar 2022 12:47:27 +0200 (CEST) From: Matthias Heiserer To: pve-devel@lists.proxmox.com Date: Thu, 31 Mar 2022 12:47:20 +0200 Message-Id: <20220331104720.4005157-5-m.heiserer@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220331104720.4005157-1-m.heiserer@proxmox.com> References: <20220331104720.4005157-1-m.heiserer@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.006 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 T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH v3 manager 4/4] ui: content view: remove dead code 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, 31 Mar 2022 10:47:28 -0000 These lines were only used by grid/BackupView, which gets deleted in this series. Signed-off-by: Matthias Heiserer --- www/manager6/storage/ContentView.js | 43 ++++++----------------------- 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/www/manager6/storage/ContentView.js b/www/manager6/storage/ContentView.js index 2874b71e..56c11037 100644 --- a/www/manager6/storage/ContentView.js +++ b/www/manager6/storage/ContentView.js @@ -147,58 +147,31 @@ Ext.define('PVE.storage.ContentView', { }, ); - let availableColumns = { - 'name': { + const columns = [ + { header: gettext('Name'), flex: 2, sortable: true, renderer: PVE.Utils.render_storage_content, dataIndex: 'text', }, - 'notes': { - header: gettext('Notes'), - flex: 1, - renderer: Ext.htmlEncode, - dataIndex: 'notes', - }, - 'protected': { - header: ``, - tooltip: gettext('Protected'), - width: 30, - renderer: v => v ? `` : '', - sorter: (a, b) => (b.data.protected || 0) - (a.data.protected || 0), - dataIndex: 'protected', - }, - 'date': { + { header: gettext('Date'), width: 150, dataIndex: 'vdate', }, - 'format': { + { header: gettext('Format'), width: 100, dataIndex: 'format', }, - 'size': { + { header: gettext('Size'), width: 100, renderer: Proxmox.Utils.format_size, dataIndex: 'size', }, - }; - - let showColumns = me.showColumns || ['name', 'date', 'format', 'size']; - - Object.keys(availableColumns).forEach(function(key) { - if (!showColumns.includes(key)) { - delete availableColumns[key]; - } - }); - - if (me.extraColumns && typeof me.extraColumns === 'object') { - Object.assign(availableColumns, me.extraColumns); - } - const columns = Object.values(availableColumns); + ]; Ext.apply(me, { store: store, @@ -216,8 +189,8 @@ Ext.define('PVE.storage.ContentView', { Ext.define('pve-storage-content', { extend: 'Ext.data.Model', fields: [ - 'volid', 'content', 'format', 'size', 'used', 'vmid', - 'channel', 'id', 'lun', 'notes', 'verification', + 'volid', 'content', 'format', 'size', 'used', + 'channel', 'id', 'lun', { name: 'text', convert: function(value, record) { -- 2.30.2