mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07: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:
@@ -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
|
||||
|
||||
+7
-2
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user