mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 02:58:57 -05:00
parity_history: code optimization
This commit is contained in:
@@ -59,15 +59,11 @@ if (file_exists($log)) {
|
||||
// handle both old and new speed notation
|
||||
$speed = $speed ? (is_numeric($speed) ? my_scale($speed,$unit,1)." $unit/s" : $speed) : _('Unavailable');
|
||||
$status = $status==0 ? _('OK') : ($status==-4 ? _('Canceled') : $status);
|
||||
$list[] = "<tr><td>$action</td><td>$date</td><td>$size</td><td>$duration</td><td>$speed</td><td>$status</td><td>$error</td></tr>";
|
||||
array_unshift($list, "<tr><td>$action</td><td>$date</td><td>$size</td><td>$duration</td><td>$speed</td><td>$status</td><td>$error</td></tr>");
|
||||
}
|
||||
fclose($handle);
|
||||
}
|
||||
if ($list) {
|
||||
$list = array_reverse($list);
|
||||
} else {
|
||||
$list[] = "<tr><td colspan='7' style='text-align:center;padding-top:12px'>"._('No parity check history present')."!</td></tr>";
|
||||
}
|
||||
if (!$list) $list[] = "<tr><td colspan='7' style='text-align:center;padding-top:12px'>"._('No parity check history present')."!</td></tr>";
|
||||
echo implode($list);
|
||||
?>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user