mirror of
https://github.com/henrygd/beszel.git
synced 2026-03-23 14:06:18 +01:00
SMART: add eMMC health via sysfs (#1736)
* SMART: add eMMC health via sysfs Read eMMC wear/EOL indicators from /sys/class/block/mmcblk*/device and expose in SMART device list. Includes mocked sysfs tests and UI tweaks for unknown temps. * small optimizations for emmc scan and parsing * smart: keep smartctl optional only for Linux hosts with eMMC * update smart alerts to handle warning state * refactor: rename binPath to smartctlPath and replace hasSmartctl with smartctlPath checks --------- Co-authored-by: henrygd <hank@henrygd.me>
This commit is contained in:
@@ -206,7 +206,12 @@ export const columns: ColumnDef<SmartDeviceRecord>[] = [
|
||||
invertSorting: true,
|
||||
header: ({ column }) => <HeaderButton column={column} name={t`Temp`} Icon={ThermometerIcon} />,
|
||||
cell: ({ getValue }) => {
|
||||
const { value, unit } = formatTemperature(getValue() as number)
|
||||
const temp = getValue() as number | undefined | null
|
||||
// Most devices won't report a real 0C temperature; treat 0 as "unknown".
|
||||
if (temp == null || temp === 0) {
|
||||
return <div className="text-muted-foreground ms-1.5">N/A</div>
|
||||
}
|
||||
const { value, unit } = formatTemperature(temp)
|
||||
return <span className="ms-1.5">{`${value} ${unit}`}</span>
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user