Added distro information in About and Diagnostic info

This commit is contained in:
Jorge Rincon 2023-09-07 10:25:09 +02:00
parent b1518fb6a6
commit d48cd703bc
2 changed files with 13 additions and 1 deletions

View File

@ -728,7 +728,7 @@ class Diagnostics extends Wizard
$cpuModelName = 'cat /proc/cpuinfo | grep "model name" | tail -1 | cut -f 2 -d ":"';
$cpuProcessor = 'cat /proc/cpuinfo | grep "processor" | wc -l';
$ramMemTotal = 'cat /proc/meminfo | grep "MemTotal"';
$distroInfo = 'cat /etc/os-release | grep "PRETTY_NAME" | cut -f 2 -d "="';
exec(
"ifconfig | awk '{ print $2}' | grep -E -o '([0-9]{1,3}[\.]){3}[0-9]{1,3}'",
$output
@ -747,6 +747,10 @@ class Diagnostics extends Wizard
'name' => __('RAM'),
'value' => exec($ramMemTotal),
],
'distroInfo' => [
'name' => __('Distro'),
'value' => str_replace('"', '', exec($distroInfo)),
],
'osInfo' => [
'name' => __('Os'),
'value' => exec('uname -a'),

View File

@ -1164,6 +1164,14 @@ if (is_ajax()) {
<p style="font-size: 10pt;">'.$sys_info->data->ramInfo->value.'</p>
</th>
</tr>
<tr>
<th style="width: 15%;">
<p><span>'.$sys_info->data->distroInfo->name.'</span></p>
</th>
<th style="width: 85%;">
<p style="font-size: 10pt;">'.$sys_info->data->distroInfo->value.'</p>
</th>
</tr>
<tr>
<th style="width: 15%;">
<p><span>'.$sys_info->data->osInfo->name.'</span></p>