Suppress output when no SMART devices available (#365)

* Suppress output when no SMART devices available

Small fix. Prevents empty form dropdowns when no SMART devices are available (i.e. running in a VM with a vdisk)

* use gettext for text

* better conditional check
This commit is contained in:
ljm42 2017-11-09 18:14:52 -08:00 committed by Franco Fichtner
parent 54aa92e0e3
commit dffa1b7de1

View file

@ -137,6 +137,8 @@ switch($action) {
// Get all AD* and DA* (IDE and SCSI) devices currently installed and stores them in the $devs array
exec("ls /dev | grep '^\(ad\|da\|ada\)[0-9]\{1,2\}$'", $devs);
if (count($devs) > 0) {
?>
<div class="content-box tab-content table-responsive">
@ -302,6 +304,9 @@ switch($action) {
</section>
<?php
} else {
echo gettext("No SMART devices.");
}
break;
}
}