mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
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:
parent
54aa92e0e3
commit
dffa1b7de1
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue