mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
Handle dev.pchtherm temperatures in the thermal dashboard widget (#8062)
This commit is contained in:
parent
cc16ba7b33
commit
e511d52e95
@ -240,13 +240,15 @@ class SystemController extends ApiControllerBase
|
||||
$tempItem['temperature'] = trim(str_replace('C', '', $value));
|
||||
$tempItem['type_translated'] = gettext('CPU');
|
||||
$tempItem['type'] = 'cpu';
|
||||
if (strpos($tempItem['device'], 'hw.acpi') !== false) {
|
||||
if (str_starts_with($tempItem['device'], 'hw.acpi.')) {
|
||||
$tempItem['type_translated'] = gettext('Zone');
|
||||
$tempItem['type'] = 'zone';
|
||||
/* XXX may or may not be a good idea */
|
||||
} elseif (strpos($tempItem['device'], 'dev.amdtemp') !== false) {
|
||||
} elseif (str_starts_with($tempItem['device'], 'dev.amdtemp.')) {
|
||||
$tempItem['type_translated'] = gettext('AMD');
|
||||
$tempItem['type'] = 'amd';
|
||||
} else if (str_starts_with($tempItem['device'], 'dev.pchtherm.')) {
|
||||
$tempItem['type'] = 'platform';
|
||||
$tempItem['type_translated'] = gettext('Platform');
|
||||
}
|
||||
$result[] = $tempItem;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user