mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
sysutils/smart: widget needs a rework
I'd rather emulate the old network which used the detailed list backend call. Funnel this through the API on request but no time to do this now.
This commit is contained in:
parent
5ff5294340
commit
c86e31a0d0
2 changed files with 9 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue