mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
modules/command: Add command description to `DisableNotificationsCommandForm'
refs #6593
This commit is contained in:
parent
ed645b1eeb
commit
6f8fc3eb6d
@ -32,6 +32,16 @@ class DisableNotificationsCommandForm extends CommandForm
|
|||||||
*/
|
*/
|
||||||
public function createElements(array $formData = array())
|
public function createElements(array $formData = array())
|
||||||
{
|
{
|
||||||
|
$this->addElement(
|
||||||
|
'note',
|
||||||
|
'command-info',
|
||||||
|
array(
|
||||||
|
'value' => mt(
|
||||||
|
'monitoring',
|
||||||
|
'This command is used to disable host and service notifications for a specific time.'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
$expire = new DateTime();
|
$expire = new DateTime();
|
||||||
$expire->add(new DateInterval('PT1H'));
|
$expire->add(new DateInterval('PT1H'));
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
@ -69,7 +79,7 @@ class DisableNotificationsCommandForm extends CommandForm
|
|||||||
->disable()
|
->disable()
|
||||||
->setExpire($this->getElement('expire')->getValue());
|
->setExpire($this->getElement('expire')->getValue());
|
||||||
$this->getTransport($request)->send($toggleNotifications);
|
$this->getTransport($request)->send($toggleNotifications);
|
||||||
Notification::success(mt('monitoring', 'Command sent'));
|
Notification::success(mt('monitoring', 'Disabling host and service notifications..'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user