Improve organization & SAS support
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
function nvme_data($data)
|
||||
{
|
||||
$health = $data->nvme_smart_health_information_log; ?>
|
||||
<h2>SMART data</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Property</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Data Units Read</td>
|
||||
<td><?= number_format($health->data_units_read) .
|
||||
" (" .
|
||||
data_unit($health->data_units_read) .
|
||||
")" ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Data Units Written</td>
|
||||
<td><?= number_format($health->data_units_written) .
|
||||
" (" .
|
||||
data_unit($health->data_units_written) .
|
||||
")" ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
} ?>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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
|
||||
} ?>
|
||||
Reference in New Issue
Block a user