mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-08-02 23:49:51 +00:00
dashboard: reduce noise in current kernel version
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>
This commit is contained in:
parent
9d89cc9073
commit
378a1024cb
@ -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: '',
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user