Skip to content

Commit 44922b7

Browse files
author
Till Brehm
committed
Merge branch 'patch-4' into 'master'
Update show_sys_state.php to display current kernel info. See merge request ispconfig/ispconfig3!790
2 parents d933f1e + 15012ce commit 44922b7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

interface/web/monitor/show_sys_state.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ function _getServerState($serverId, $serverName) {
195195
$osData = null;
196196
$veInfo = null;
197197
$ispcData = null;
198+
$kernelInfo = null;
198199
foreach($records as $record) {
199200
/* get the state from the db-data */
200201
$tmp = _processDbState($record['type'], $serverId, $serverState, $messages);
@@ -209,6 +210,10 @@ function _getServerState($serverId, $serverName) {
209210
if ($record['type'] == 'ispc_info') {
210211
$ispcData = unserialize($record['data']);
211212
}
213+
/* if we have the kernel-info, get it */
214+
if ($record['type'] == 'kernel_info') {
215+
$kernelInfo = unserialize($record['data']);
216+
}
212217
/* if we have the ve-info, get it */
213218
if ($record['type'] == 'openvz_veinfo') {
214219
$veInfo = unserialize($record['data']);
@@ -248,6 +253,7 @@ function _getServerState($serverId, $serverName) {
248253
else {
249254
$html_ve .= '</h3>';
250255
}
256+
$html_ve .= '<p><h3>' . $app->lng("monitor_serverstate_kernel_txt") . ': ' . $kernelInfo['version'] . '</h3></p>';
251257
$html_ve .= '<p>' . $app->lng("monitor_serverstate_state_txt") . ': ' . $serverState . '</p>';
252258

253259
/*
@@ -294,7 +300,7 @@ function _getServerState($serverId, $serverName) {
294300
else {
295301
$html_server .= '</h3>';
296302
}
297-
303+
$html_server .= '<p><h3>' . $app->lng("monitor_serverstate_kernel_txt") . ': ' . $kernelInfo['version'] . '</h3></p>';
298304
$html_server .= '<p>' . $app->lng("monitor_serverstate_state_txt") . ': ' . $serverState . ' (';
299305
$html_server .= sizeof((isset($messages[$app->lng("monitor_serverstate_listunknown_txt")]) ? $messages[$app->lng("monitor_serverstate_listunknown_txt")] : array())) . ' ' . $app->lng("monitor_serverstate_unknown_txt") . ', ';
300306
$html_server .= sizeof((isset($messages[$app->lng("monitor_serverstate_listinfo_txt")]) ? $messages[$app->lng("monitor_serverstate_listinfo_txt")] : array())) . ' ' . $app->lng("monitor_serverstate_info_txt") . ', ';

0 commit comments

Comments
 (0)