diff --git a/net-mgmt/zabbix-agent/Makefile b/net-mgmt/zabbix-agent/Makefile index df5fdb1eb..d41d2a106 100644 --- a/net-mgmt/zabbix-agent/Makefile +++ b/net-mgmt/zabbix-agent/Makefile @@ -1,6 +1,5 @@ PLUGIN_NAME= zabbix-agent -PLUGIN_VERSION= 1.1 -PLUGIN_REVISION= 1 +PLUGIN_VERSION= 1.2 PLUGIN_COMMENT= Enterprise-class open source distributed monitoring agent PLUGIN_DEPENDS= zabbix34-agent PLUGIN_MAINTAINER= opnsense@moov.de diff --git a/net-mgmt/zabbix-agent/src/etc/inc/plugins.inc.d/zabbixagent.inc b/net-mgmt/zabbix-agent/src/etc/inc/plugins.inc.d/zabbixagent.inc index 709d9c49c..4fd006a4f 100644 --- a/net-mgmt/zabbix-agent/src/etc/inc/plugins.inc.d/zabbixagent.inc +++ b/net-mgmt/zabbix-agent/src/etc/inc/plugins.inc.d/zabbixagent.inc @@ -58,7 +58,7 @@ function zabbixagent_services() } $services[] = array( - 'description' => gettext('Enterprise-class open source distributed monitoring agent'), + 'description' => gettext('Zabbix Agent'), 'pidfile' => '/var/run/zabbix/zabbix_agentd.pid', 'configd' => array( 'restart' => array('zabbix_agentd restart'), diff --git a/net-mgmt/zabbix-agent/src/opnsense/mvc/app/controllers/OPNsense/ZabbixAgent/Api/ServiceController.php b/net-mgmt/zabbix-agent/src/opnsense/mvc/app/controllers/OPNsense/ZabbixAgent/Api/ServiceController.php index 35c66c70b..008956b17 100644 --- a/net-mgmt/zabbix-agent/src/opnsense/mvc/app/controllers/OPNsense/ZabbixAgent/Api/ServiceController.php +++ b/net-mgmt/zabbix-agent/src/opnsense/mvc/app/controllers/OPNsense/ZabbixAgent/Api/ServiceController.php @@ -46,8 +46,10 @@ class ServiceController extends ApiControllerBase public function startAction() { if ($this->request->isPost()) { + // close session for long running action + $this->sessionClose(); $backend = new Backend(); - $response = $backend->configdRun("zabbixagent start", true); + $response = $backend->configdRun("zabbixagent start"); return array("response" => $response); } else { return array("response" => array()); @@ -61,6 +63,8 @@ class ServiceController extends ApiControllerBase public function stopAction() { if ($this->request->isPost()) { + // close session for long running action + $this->sessionClose(); $backend = new Backend(); $response = $backend->configdRun("zabbixagent stop"); return array("response" => $response); @@ -76,6 +80,8 @@ class ServiceController extends ApiControllerBase public function restartAction() { if ($this->request->isPost()) { + // close session for long running action + $this->sessionClose(); $backend = new Backend(); $response = $backend->configdRun("zabbixagent restart"); return array("response" => $response); diff --git a/net-mgmt/zabbix-agent/src/opnsense/mvc/app/controllers/OPNsense/ZabbixAgent/IndexController.php b/net-mgmt/zabbix-agent/src/opnsense/mvc/app/controllers/OPNsense/ZabbixAgent/IndexController.php index 4a9afa5c4..8b784d788 100644 --- a/net-mgmt/zabbix-agent/src/opnsense/mvc/app/controllers/OPNsense/ZabbixAgent/IndexController.php +++ b/net-mgmt/zabbix-agent/src/opnsense/mvc/app/controllers/OPNsense/ZabbixAgent/IndexController.php @@ -41,8 +41,6 @@ class IndexController extends \OPNsense\Base\IndexController */ public function indexAction() { - // set page title - $this->view->title = gettext('Zabbix Agent Settings'); // include form definitions $this->view->settingsForm = $this->getForm("settings"); // pick the template to serve diff --git a/net-mgmt/zabbix-agent/src/opnsense/mvc/app/views/OPNsense/ZabbixAgent/index.volt b/net-mgmt/zabbix-agent/src/opnsense/mvc/app/views/OPNsense/ZabbixAgent/index.volt index fc5a8bf9f..23760f1df 100644 --- a/net-mgmt/zabbix-agent/src/opnsense/mvc/app/views/OPNsense/ZabbixAgent/index.volt +++ b/net-mgmt/zabbix-agent/src/opnsense/mvc/app/views/OPNsense/ZabbixAgent/index.volt @@ -71,12 +71,9 @@ POSSIBILITY OF SUCH DAMAGE. draggable: true }); } else { - // request service status after successful save and update status box (wait a few seconds before update) - setTimeout(function(){ - ajaxCall(url="/api/zabbixagent/service/status", sendData={}, callback=function(data,status) { - updateServiceStatusUI(data['status']); - }); - },3000); + ajaxCall(url="/api/zabbixagent/service/status", sendData={}, callback=function(data,status) { + updateServiceStatusUI(data['status']); + }); } }); }); diff --git a/net-mgmt/zabbix-agent/src/opnsense/service/conf/actions.d/actions_zabbixagent.conf b/net-mgmt/zabbix-agent/src/opnsense/service/conf/actions.d/actions_zabbixagent.conf index ec61e646b..7b902830f 100644 --- a/net-mgmt/zabbix-agent/src/opnsense/service/conf/actions.d/actions_zabbixagent.conf +++ b/net-mgmt/zabbix-agent/src/opnsense/service/conf/actions.d/actions_zabbixagent.conf @@ -17,7 +17,7 @@ type:script message:restarting zabbix_agentd [status] -command:/usr/local/etc/rc.d/zabbix_agentd status +command:/usr/local/etc/rc.d/zabbix_agentd status; exit 0 parameters: type:script_output message:requesting zabbix_agentd status