all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 2/3] ui: osd: details: add created_at and created_version
Date: Fri,  5 May 2023 15:11:28 +0200	[thread overview]
Message-ID: <20230505131129.3555469-3-a.lauterer@proxmox.com> (raw)
In-Reply-To: <20230505131129.3555469-1-a.lauterer@proxmox.com>

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 <a.lauterer@proxmox.com>
---
 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





  parent reply	other threads:[~2023-05-05 13:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 13:11 [pve-devel] [PATCH manager 0/3] osd details: add created_at & created_version Aaron Lauterer
2023-05-05 13:11 ` [pve-devel] [PATCH manager 1/3] api: osd: details: add created_at and created_version Aaron Lauterer
2023-05-05 13:11 ` Aaron Lauterer [this message]
2023-05-05 13:11 ` [pve-devel] [PATCH manager 3/3] ui: osd: details: move hostname to top Aaron Lauterer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230505131129.3555469-3-a.lauterer@proxmox.com \
    --to=a.lauterer@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal