Files

28 lines
582 B
PHP

<?php
function sat_data($data)
{
$tests = $data->ata_smart_self_test_log->standard->table; ?>
<h2>SMART self-test log</h2>
<table>
<thead>
<tr>
<th>Type</th>
<th>Status</th>
<th>Lifetime (hours)</th>
</tr>
</thead>
<tbody>
<?php foreach ($tests as $test) { ?>
<tr>
<td><?= $test->type->string ?></td>
<td><?= $test->status->string ?></td>
<td><?= $test->lifetime_hours ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php
} ?>