From 291837061ba13647f49cc32092fd0a3ec89d51ed Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 24 Aug 2021 16:31:13 +0200 Subject: [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. --- modules-available/statistics/pages/machine.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules-available/statistics/pages') 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]); } } } -- cgit v1.2.3-55-g7522