diff --git a/sysutils/smart/Makefile b/sysutils/smart/Makefile index 2afa17e45..bdacbc9e0 100644 --- a/sysutils/smart/Makefile +++ b/sysutils/smart/Makefile @@ -1,5 +1,6 @@ PLUGIN_NAME= smart -PLUGIN_VERSION= 2.3 +PLUGIN_VERSION= 2.2 +PLUGIN_REVISION= 6 PLUGIN_COMMENT= SMART tools PLUGIN_DEPENDS= smartmontools PLUGIN_MAINTAINER= franco@opnsense.org diff --git a/sysutils/smart/src/opnsense/mvc/app/controllers/OPNsense/Smart/Api/ServiceController.php b/sysutils/smart/src/opnsense/mvc/app/controllers/OPNsense/Smart/Api/ServiceController.php index 874ba272f..d35feb29b 100644 --- a/sysutils/smart/src/opnsense/mvc/app/controllers/OPNsense/Smart/Api/ServiceController.php +++ b/sysutils/smart/src/opnsense/mvc/app/controllers/OPNsense/Smart/Api/ServiceController.php @@ -43,10 +43,15 @@ class ServiceController extends ApiControllerBase return $devices; } - public function listAction() + public function listAction($details = null) { if ($this->request->isPost()) { - return array("devices" => $this->getDevices()); + $backend = new Backend(); + + $devices = empty($details) ? $this->getDevices() : + json_decode(trim($backend->configdRun('smart detailed list')), true); + + return ['devices' => $devices]; } return array("message" => "Unable to run list action");