diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/ServiceController.php b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/ServiceController.php index 269363bfe..7d21f736f 100644 --- a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/ServiceController.php +++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/ServiceController.php @@ -58,6 +58,8 @@ 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('postfix start'); return array("response" => $response); @@ -73,6 +75,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("postfix stop"); return array("response" => $response); @@ -88,6 +92,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("postfix restart"); return array("response" => $response); @@ -121,7 +127,6 @@ class ServiceController extends ApiControllerBase $status = "unkown"; } - return array("status" => $status); } diff --git a/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Recipient.xml b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Recipient.xml index 5789e3cd6..40b5c48b4 100644 --- a/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Recipient.xml +++ b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Recipient.xml @@ -17,7 +17,7 @@ OK REJECT - + diff --git a/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/general.volt b/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/general.volt index 47f62653e..ece16ffdb 100644 --- a/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/general.volt +++ b/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/general.volt @@ -34,21 +34,21 @@ POSSIBILITY OF SUCH DAMAGE.
{{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_general_settings'])}} -
- +
+
-
@@ -68,7 +68,7 @@ POSSIBILITY OF SUCH DAMAGE. // check if Rspamd plugin is installed ajaxCall(url="/api/postfix/service/checkrspamd", sendData={}, callback=function(data,status) { - if (data == "0") { + if (data == "0") { $('#missing_rspamd').show(); } }); @@ -76,7 +76,7 @@ POSSIBILITY OF SUCH DAMAGE. // link save button to API set action $("#saveAct").click(function () { saveFormToEndpoint(url="/api/postfix/general/set", formid='frm_general_settings',callback_ok=function () { - $("#saveAct_progress").addClass("fa fa-spinner fa-pulse"); + $("#saveAct_progress").addClass("fa fa-spinner fa-pulse"); ajaxCall(url="/api/postfix/service/reconfigure", sendData={}, callback=function (data,status) { ajaxCall(url="/api/postfix/service/status", sendData={}, callback=function (data,status) { updateServiceStatusUI(data['status']); @@ -87,12 +87,12 @@ POSSIBILITY OF SUCH DAMAGE. }); $("#saveAct2").click(function(){ saveFormToEndpoint(url="/api/postfix/antispam/set", formid='frm_antispam_settings',callback_ok=function(){ - $("#saveAct2_progress").addClass("fa fa-spinner fa-pulse"); + $("#saveAct2_progress").addClass("fa fa-spinner fa-pulse"); ajaxCall(url="/api/postfix/service/reconfigure", sendData={}, callback=function(data,status) { ajaxCall(url="/api/postfix/service/status", sendData={}, callback=function(data,status) { updateServiceStatusUI(data['status']); }); - $("#saveAct2_progress").removeClass("fa fa-spinner fa-pulse"); + $("#saveAct2_progress").removeClass("fa fa-spinner fa-pulse"); }); }); });