Warning when SMART reports unreadable sectors. Parse Seagate drive hours correctly.

This commit is contained in:
Roland 2026-06-24 15:59:34 -06:00
parent 16070e98b3
commit c3110f3940
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
7 changed files with 208 additions and 27 deletions

View file

@ -559,7 +559,7 @@ const formatPowerOnHours = (hours) => {
function SmartDetailsModal({drive, open, onClose}) {
if (!drive) return null;
const healthColor = getHealthColor(drive.assessment);
const healthColor = getHealthColor(drive.health || drive.assessment);
return (
<Modal open={open} onClose={onClose} size='small'>
@ -617,6 +617,14 @@ function SmartDetailsModal({drive, open, onClose}) {
: '-'}
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Uncorrectable Sectors</Table.Cell>
<Table.Cell style={{color: drive.offline_uncorrectable > 0 ? 'orange' : 'inherit'}}>
{drive.offline_uncorrectable !== null && drive.offline_uncorrectable !== undefined
? drive.offline_uncorrectable
: '-'}
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>SMART Enabled</Table.Cell>
<Table.Cell>{drive.smart_enabled ? 'Yes' : 'No'}</Table.Cell>
@ -1065,9 +1073,9 @@ function DiskSection() {
<Table.Cell>
<Icon
name='circle'
color={getHealthColor(drive.assessment)}
color={getHealthColor(drive.health || drive.assessment)}
/>
{drive.assessment || 'Unknown'}
{drive.health || drive.assessment || 'Unknown'}
</Table.Cell>
<Table.Cell>
{drive.temperature !== null && drive.temperature !== undefined