First sample notifications

This commit is contained in:
Thomas Gelf 2014-03-07 23:18:23 +00:00
parent 296d8c7969
commit e2ecd35314
1 changed files with 3 additions and 0 deletions

View File

@ -37,6 +37,7 @@ use Icinga\Module\Monitoring\Form\Command\DisableNotificationWithExpireForm;
use Icinga\Module\Monitoring\Form\Command\SingleArgumentCommandForm; use Icinga\Module\Monitoring\Form\Command\SingleArgumentCommandForm;
use Icinga\Web\Form; use Icinga\Web\Form;
use Icinga\Web\Url; use Icinga\Web\Url;
use Icinga\Web\Notification;
use Icinga\Web\Controller\ActionController; use Icinga\Web\Controller\ActionController;
use Icinga\Protocol\Commandpipe\CommandPipe; use Icinga\Protocol\Commandpipe\CommandPipe;
use Icinga\Exception\ConfigurationError; use Icinga\Exception\ConfigurationError;
@ -893,6 +894,7 @@ class Monitoring_CommandController extends ActionController
if ($form->IsSubmittedAndValid() === true) { if ($form->IsSubmittedAndValid() === true) {
$this->target->sendCommand($form->createCommand(), $this->view->objects); $this->target->sendCommand($form->createCommand(), $this->view->objects);
Notification::success('New comment has been sent');
} }
} }
@ -948,6 +950,7 @@ class Monitoring_CommandController extends ActionController
if ($form->IsSubmittedAndValid() === true) { if ($form->IsSubmittedAndValid() === true) {
$this->target->sendCommand($form->createCommand(), $this->view->objects); $this->target->sendCommand($form->createCommand(), $this->view->objects);
Notification::success('Acknowledgement has been sent');
} }
$this->setForm($form); $this->setForm($form);