Implement start/stop obsessing hosts/services
Added action and mask to start/stop obsessing over hosts and services. refs #4355
This commit is contained in:
parent
3f88e3322b
commit
9b858b9a82
|
@ -411,6 +411,40 @@ class Monitoring_CommandController extends ModuleActionController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function startobsessingAction()
|
||||||
|
{
|
||||||
|
$form = new SendCommand("Start obsessing?");
|
||||||
|
if ($this->_request->isPost()) {
|
||||||
|
if ($form->isValid()) {
|
||||||
|
$targets = $this->selectCommandTargets($form->getHosts(), $form->getServices());
|
||||||
|
$this->target->startObsessing($targets);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$form->setServices($this->getParameter("services", false));
|
||||||
|
$form->setHosts($this->getParameter("hosts"));
|
||||||
|
$form->setAction($this->view->url());
|
||||||
|
$form->addSubmitButton("Commit");
|
||||||
|
$this->view->form = $form;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function stopobsessingAction()
|
||||||
|
{
|
||||||
|
$form = new SendCommand("Stop obsessing?");
|
||||||
|
if ($this->_request->isPost()) {
|
||||||
|
if ($form->isValid()) {
|
||||||
|
$targets = $this->selectCommandTargets($form->getHosts(), $form->getServices());
|
||||||
|
$this->target->stopObsessing($targets);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$form->setServices($this->getParameter("services", false));
|
||||||
|
$form->setHosts($this->getParameter("hosts"));
|
||||||
|
$form->setAction($this->view->url());
|
||||||
|
$form->addSubmitButton("Commit");
|
||||||
|
$this->view->form = $form;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function sendComment()
|
public function sendComment()
|
||||||
{
|
{
|
||||||
$author = "AUTHOR"; //@TODO: get from auth backend
|
$author = "AUTHOR"; //@TODO: get from auth backend
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<?= $this->form ?>
|
|
@ -0,0 +1 @@
|
||||||
|
<?= $this->form ?>
|
Loading…
Reference in New Issue