diff --git a/sysutils/smart/Makefile b/sysutils/smart/Makefile index 9e9df5d5f..812f9d2db 100644 --- a/sysutils/smart/Makefile +++ b/sysutils/smart/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= smart -PLUGIN_VERSION= 2.0 +PLUGIN_VERSION= 2.1 PLUGIN_COMMENT= SMART tools PLUGIN_DEPENDS= smartmontools PLUGIN_MAINTAINER= franco@opnsense.org diff --git a/sysutils/smart/src/www/widgets/widgets/smart_status.widget.php b/sysutils/smart/src/www/widgets/widgets/smart_status.widget.php index 6467466e0..cdfcf9499 100644 --- a/sysutils/smart/src/www/widgets/widgets/smart_status.widget.php +++ b/sysutils/smart/src/www/widgets/widgets/smart_status.widget.php @@ -28,38 +28,47 @@ * POSSIBILITY OF SUCH DAMAGE. */ -require_once("guiconfig.inc"); -require_once("widgets/include/smart_status.inc"); +require_once('guiconfig.inc'); +require_once('widgets/include/smart_status.inc'); + +$devs = json_decode(configd_run('smart detailed list')); ?> - +
+ - - - + + + + +state->smart_status->passed)) { + if ($dev->state->smart_status->passed) { + $dev_state_translated = gettext('OK'); + $color = 'success'; + } else { + $dev_state_translated = gettext('FAILED'); + $color = 'danger'; + } + } + +?> + + + + + - -foreach ($devs as $dev) { - $dev_state_translated = ""; - - if ($dev->state->smart_status->passed) { - $dev_state_translated = gettext('OK'); - $color = "success"; - } else { - $dev_state_translated = gettext('Unknown'); - $color = "warning"; - } -?> - - - - - - +
+ + +
device) ?>ident) ?>
device ?>ident ?>