mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
net-mgmt/telegraf: merge cleanups from master
This commit is contained in:
parent
4f890b2de1
commit
6545561be5
7 changed files with 13 additions and 11 deletions
|
|
@ -49,8 +49,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("telegraf start", true);
|
||||
$response = $backend->configdRun("telegraf start");
|
||||
return array("response" => $response);
|
||||
} else {
|
||||
return array("response" => array());
|
||||
|
|
@ -64,6 +66,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("telegraf stop");
|
||||
return array("response" => $response);
|
||||
|
|
@ -79,6 +83,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("telegraf restart");
|
||||
return array("response" => $response);
|
||||
|
|
@ -112,7 +118,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("Telegraf Settings");
|
||||
$this->view->generalForm = $this->getForm("general");
|
||||
$this->view->pick('OPNsense/Telegraf/general');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ class InputController extends \OPNsense\Base\IndexController
|
|||
{
|
||||
public function indexAction()
|
||||
{
|
||||
$this->view->title = gettext("Telegraf Inputs");
|
||||
$this->view->inputForm = $this->getForm("input");
|
||||
$this->view->pick('OPNsense/Telegraf/input');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ class OutputController extends \OPNsense\Base\IndexController
|
|||
{
|
||||
public function indexAction()
|
||||
{
|
||||
$this->view->title = gettext("Telegraf Outputs");
|
||||
$this->view->outputForm = $this->getForm("output");
|
||||
$this->view->pick('OPNsense/Telegraf/output');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
<div id="general" class="tab-pane fade in active">
|
||||
<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>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
<div id="input" class="tab-pane fade in active">
|
||||
<div class="content-box" style="padding-bottom: 1.5em;">
|
||||
{{ partial("layout_partials/base_form",['fields':inputForm,'id':'frm_input_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>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
<div id="output" class="tab-pane fade in active">
|
||||
<div class="content-box" style="padding-bottom: 1.5em;">
|
||||
{{ partial("layout_partials/base_form",['fields':outputForm,'id':'frm_output_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>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue