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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 83E779A0D5 for ; Fri, 5 May 2023 15:11:32 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6D78427F08 for ; Fri, 5 May 2023 15:11:32 +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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 5 May 2023 15:11:30 +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 539A84762F for ; Fri, 5 May 2023 15:11:30 +0200 (CEST) From: Aaron Lauterer To: pve-devel@lists.proxmox.com Date: Fri, 5 May 2023 15:11:28 +0200 Message-Id: <20230505131129.3555469-3-a.lauterer@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230505131129.3555469-1-a.lauterer@proxmox.com> References: <20230505131129.3555469-1-a.lauterer@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.093 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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 manager 2/3] ui: osd: details: add created_at and created_version 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: Fri, 05 May 2023 13:11:32 -0000 Useful for OSDs created with at least Ceph version 17.2.6. For OSDs created prior to that, we show "n/a". Signed-off-by: Aaron Lauterer --- www/manager6/ceph/OSDDetails.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/www/manager6/ceph/OSDDetails.js b/www/manager6/ceph/OSDDetails.js index f0765d4f..43cf72d0 100644 --- a/www/manager6/ceph/OSDDetails.js +++ b/www/manager6/ceph/OSDDetails.js @@ -130,11 +130,32 @@ Ext.define('PVE.CephOsdDetails', { name: 'version', text: gettext('Version'), }, + { + xtype: 'text', + name: 'version_when_created', + text: gettext('Version (created)'), + renderer: function(value) { + // expects the following string format: + // ceph version 17.2.6 (995dec2cdae920da21db2d455e55efbc339bde24) quincy (stable) + if (value) { + value = value.trim(); + let parts = value.split(' '); + return `${parts[2]} (${parts[4]})`; + } + return gettext('n/a'); + }, + }, { xtype: 'text', name: 'hostname', text: gettext('Hostname'), }, + { + xtype: 'text', + name: 'created_at', + text: gettext('Creation time'), + renderer: (v) => v ? Date(v).toLocaleString() : gettext('n/a'), + }, { xtype: 'text', name: 'osd_data', -- 2.30.2