mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
net-mgmt/collectd: merge cleanups from master
This commit is contained in:
parent
18a1e3a4a4
commit
4f890b2de1
3 changed files with 9 additions and 5 deletions
|
|
@ -48,8 +48,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("collectd start", true);
|
||||
$response = $backend->configdRun("collectd start");
|
||||
return array("response" => $response);
|
||||
} else {
|
||||
return array("response" => array());
|
||||
|
|
@ -63,6 +65,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("collectd stop");
|
||||
return array("response" => $response);
|
||||
|
|
@ -78,6 +82,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("collectd restart");
|
||||
return array("response" => $response);
|
||||
|
|
@ -111,7 +117,6 @@ class ServiceController extends ApiControllerBase
|
|||
$status = "unkown";
|
||||
}
|
||||
|
||||
|
||||
return array("status" => $status);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ class GeneralController extends \OPNsense\Base\IndexController
|
|||
{
|
||||
public function indexAction()
|
||||
{
|
||||
$this->view->title = gettext("Collectd Settings");
|
||||
$this->view->generalForm = $this->getForm("general");
|
||||
$this->view->pick('OPNsense/Collectd/general');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#}
|
||||
<div class="content-box" style="padding-bottom: 1.5em;">
|
||||
{{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_general_settings'])}}
|
||||
<hr />
|
||||
<div class="col-md-12">
|
||||
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b><i id="saveAct_progress" class=""></i></button>
|
||||
<hr />
|
||||
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b> <i id="saveAct_progress"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue