all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] applied: [PATCH gui 1/4] dashboard: reduce noise in current kernel version
@ 2024-02-26 16:28 Thomas Lamprecht
  2024-02-26 16:28 ` [pmg-devel] applied: [PATCH gui 2/4] dashboard: show boot-mode information Thomas Lamprecht
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2024-02-26 16:28 UTC (permalink / raw)
  To: pmg-devel

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-26 18:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-26 16:28 [pmg-devel] applied: [PATCH gui 1/4] dashboard: reduce noise in current kernel version Thomas Lamprecht
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

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