Skip to content

Commit

Permalink
ui: dashboard: nicely display kernel version
Browse files Browse the repository at this point in the history
Extract and display the build version and kernel
release nicely.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
  • Loading branch information
kaffarell authored and Blub committed Nov 29, 2023
1 parent de99031 commit 4879227
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions www/panel/NodeInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
},
{
Expand Down

0 comments on commit 4879227

Please sign in to comment.