mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Implement command to delay notifications
Added command and mask to delay notifications for hosts/services. refs #4355
This commit is contained in:
parent
72efe7e8a0
commit
f102f75eb9
@ -541,6 +541,25 @@ class Monitoring_CommandController extends ModuleActionController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function delaynotificationAction()
|
||||||
|
{
|
||||||
|
$form = new SendCommand("Delay a notification");
|
||||||
|
$form->addNumberBox("delay", "Notification delay (minutes from now):");
|
||||||
|
|
||||||
|
if ($this->_request->isPost()) {
|
||||||
|
if ($form->isValid()) {
|
||||||
|
$targets = $this->selectCommandTargets($form->getHosts(), $form->getServices());
|
||||||
|
$this->target->delayNotification($targets, $form->getNumber("delay"));
|
||||||
|
}
|
||||||
|
} 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 ?>
|
Loading…
x
Reference in New Issue
Block a user