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 887D563DB6 for ; Wed, 25 Nov 2020 16:37:49 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 70E461C4FF for ; Wed, 25 Nov 2020 16:37:09 +0100 (CET) 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 620091C4F5 for ; Wed, 25 Nov 2020 16:37:08 +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 2B4C343B84 for ; Wed, 25 Nov 2020 16:37:08 +0100 (CET) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Wed, 25 Nov 2020 16:37:07 +0100 Message-Id: <20201125153707.9615-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.20.1 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 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 Subject: [pve-devel] [PATCH widget-toolkit] grid/DiskList: restore info about ceph 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, 25 Nov 2020 15:37:49 -0000 previously we printed this ceph info, but it got lost during refactoring to widget-toolkit, restore a slightly modified version of the code Signed-off-by: Dominik Csapak --- src/grid/DiskList.js | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/grid/DiskList.js b/src/grid/DiskList.js index 4d8ef1b..54f58f8 100644 --- a/src/grid/DiskList.js +++ b/src/grid/DiskList.js @@ -3,7 +3,7 @@ Ext.define('pmx-disk-list', { fields: [ 'devpath', 'used', { name: 'size', type: 'number' }, - { name: 'osdid', type: 'number' }, + { name: 'osdid', type: 'number', defaultValue: -1 }, { name: 'status', convert: function(value, rec) { @@ -169,7 +169,28 @@ Ext.define('Proxmox.DiskList', { header: gettext('Usage'), width: 150, sortable: false, - renderer: v => v || Proxmox.Utils.noText, + renderer: function(v, metaData, rec) { + let extendedInfo = ' '; + if (rec) { + let types = []; + if (rec.data.osdid !== undefined && rec.data.osdid >= 0) { + types.push(`OSD.${rec.data.osdid.toString()}`); + } + if (rec.data.journals > 0) { + types.push('Journal'); + } + if (rec.data.db > 0) { + types.push('DB'); + } + if (rec.data.wal > 0) { + types.push('WAL'); + } + if (types.length > 0) { + extendedInfo = `, Ceph (${types.join(', ')})`; + } + } + return v ? `${v}${extendedInfo}` : Proxmox.Utils.noText; + }, dataIndex: 'used', }, { -- 2.20.1