diff options
author | Simon Rettberg | 2021-08-24 16:31:13 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-03-09 15:06:25 +0100 |
commit | 291837061ba13647f49cc32092fd0a3ec89d51ed (patch) | |
tree | a3aa5d197d052189bc10273ef0d8ae5168f06e24 /modules-available/statistics/pages | |
parent | [statistics_reporting] Gather some more os infos (diff) | |
download | slx-admin-291837061ba13647f49cc32092fd0a3ec89d51ed.tar.gz slx-admin-291837061ba13647f49cc32092fd0a3ec89d51ed.tar.xz slx-admin-291837061ba13647f49cc32092fd0a3ec89d51ed.zip |
[statistics] Support new json-format of hardware info from client
We now try to use JSON output mode from any tool on the client
to supply information, for easier parsability and hopefully, a more
stable format.
Diffstat (limited to 'modules-available/statistics/pages')
-rw-r--r-- | modules-available/statistics/pages/machine.inc.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules-available/statistics/pages/machine.inc.php b/modules-available/statistics/pages/machine.inc.php index 677ff580..f3af4f47 100644 --- a/modules-available/statistics/pages/machine.inc.php +++ b/modules-available/statistics/pages/machine.inc.php @@ -143,21 +143,21 @@ class SubPage if (preg_match_all('/##### ([^#]+) #+$(.*?)^#####/ims', $client['data'] . '########', $out, PREG_SET_ORDER)) { foreach ($out as $section) { if ($section[1] === 'CPU') { - Parser::parseCpu($client, $section[2]); + HardwareParser::parseCpu($client, $section[2]); } if ($section[1] === 'dmidecode') { - Parser::parseDmiDecode($client, $section[2]); + HardwareParser::parseDmiDecode($client, $section[2]); } if ($section[1] === 'Partition tables') { - Parser::parseHdd($hdds, $section[2]); + HardwareParser::parseHdd($hdds, $section[2]); } if ($section[1] === 'PCI ID') { $client['lspci1'] = $client['lspci2'] = array(); - Parser::parsePci($client['lspci1'], $client['lspci2'], $section[2]); + HardwareParser::parsePci($client['lspci1'], $client['lspci2'], $section[2]); } if (isset($hdds['hdds']) && $section[1] === 'smartctl') { // This currently requires that the partition table section comes first... - Parser::parseSmartctl($hdds['hdds'], $section[2]); + HardwareParser::parseSmartctl($hdds['hdds'], $section[2]); } } } |