public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH v6 proxmox-backup 5/5] ui: dashboard: nicely display kernel version
Date: Wed, 29 Nov 2023 14:29:01 +0100	[thread overview]
Message-ID: <20231129132901.160282-6-g.goller@proxmox.com> (raw)
In-Reply-To: <20231129132901.160282-1-g.goller@proxmox.com>

Extract and display the build version and kernel
release nicely.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
 www/panel/NodeInfo.js | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/www/panel/NodeInfo.js b/www/panel/NodeInfo.js
index cba6d2a1..72f97c7c 100644
--- a/www/panel/NodeInfo.js
+++ b/www/panel/NodeInfo.js
@@ -140,11 +140,20 @@ Ext.define('PBS.NodeInfoPanel', {
 	    value: '',
 	},
 	{
-	    itemId: 'kversion',
 	    colspan: 2,
 	    title: gettext('Kernel Version'),
 	    printBar: false,
-	    textField: 'kversion',
+	    // TODO: remove with next major and only use newish current-kernel textfield
+	    multiField: true,
+	    //textField: 'current-kernel',
+	    renderer: ({ data }) => {
+		if (!data['current-kernel']) {
+		    return data.kversion;
+		}
+		let kernel = data['current-kernel'];
+		let buildDate = kernel.version.match(/\((.+)\)\s*$/)[1] ?? 'unknown';
+		return `${kernel.sysname} ${kernel.release} (${buildDate})`;
+	    },
 	    value: '',
 	},
 	{
-- 
2.39.2





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

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 13:28 [pbs-devel] [PATCH v6 proxmox{, -backup} 0/5] Add boot_mode, improve " Gabriel Goller
2023-11-29 13:28 ` [pbs-devel] [PATCH v6 proxmox 1/5] sys: add helper to get bootmode and secureboot status Gabriel Goller
2023-11-29 13:58   ` [pbs-devel] applied: " Wolfgang Bumiller
2023-11-29 13:28 ` [pbs-devel] [PATCH v6 proxmox-backup 2/5] node: status: added bootmode Gabriel Goller
2023-11-29 13:40   ` Lukas Wagner
2023-11-29 13:50     ` Lukas Wagner
2023-11-29 13:28 ` [pbs-devel] [PATCH v6 proxmox-backup 3/5] ui: dashboard: show the bootmode Gabriel Goller
2023-11-29 13:29 ` [pbs-devel] [PATCH v6 proxmox-backup 4/5] node: status: declutter kernel-version Gabriel Goller
2023-11-29 13:29 ` Gabriel Goller [this message]
2023-11-29 13:55 ` [pbs-devel] [PATCH v6 proxmox{, -backup} 0/5] Add boot_mode, improve kernel version Lukas Wagner
2023-11-29 14:31 ` [pbs-devel] applied-series: " Wolfgang Bumiller

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=20231129132901.160282-6-g.goller@proxmox.com \
    --to=g.goller@proxmox.com \
    --cc=pbs-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal