From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] applied: [PATCH gui 1/4] dashboard: reduce noise in current kernel version
Date: Mon, 26 Feb 2024 17:28:50 +0100 [thread overview]
Message-ID: <20240226162853.2519262-1-t.lamprecht@proxmox.com> (raw)
use the new 'current-kernel' object returned by the node status API to
render a more usable (less noise) version information.
Keep fallback for old one to better work with upgrades (major and
minor) to this version in a cluster, where the web UI one uses might
be the new one, but a node one looks at still have the old API daemon.
Mirrors commit be04f8ee ("ui: node summary: reduce noise in current
kernel version") and commit 4fb7e9e4 ("fix #5121: ui: node status:
avoid invalid array access for certain foreign kernels") from
pve-manager.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
js/dashboard/NodeInfo.js | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/js/dashboard/NodeInfo.js b/js/dashboard/NodeInfo.js
index 99eb4d3..1c3cfa3 100644
--- a/js/dashboard/NodeInfo.js
+++ b/js/dashboard/NodeInfo.js
@@ -84,11 +84,20 @@ Ext.define('PMG.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
next reply other threads:[~2024-02-26 18:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 16:28 Thomas Lamprecht [this message]
2024-02-26 16:28 ` [pmg-devel] applied: [PATCH gui 2/4] dashboard: show boot-mode information Thomas Lamprecht
2024-02-26 16:28 ` [pmg-devel] applied [PATCH gui 3/4] dashboard: increase height of node-info and top-receiver panel to 300 Thomas Lamprecht
2024-02-26 16:28 ` [pmg-devel] applied: [PATCH gui 4/4] dashboard: show ten of the current top receiver Thomas Lamprecht
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=20240226162853.2519262-1-t.lamprecht@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pmg-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