mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
monitoring/commands: Support 'DISABLE_NOTIFICATIONS_EXPIRE_TIME'
refs #6593
This commit is contained in:
parent
3f216f26ff
commit
1d54c7f836
@ -66,7 +66,7 @@ class DisableNotificationsExpireCommandForm extends CommandForm
|
|||||||
{
|
{
|
||||||
$disableNotifications = new DisableNotificationsExpireCommand();
|
$disableNotifications = new DisableNotificationsExpireCommand();
|
||||||
$disableNotifications
|
$disableNotifications
|
||||||
->setExpireTime($this->getElement('expire_time')->getValue());
|
->setExpireTime($this->getElement('expire_time')->getValue()->getTimestamp());
|
||||||
$this->getTransport($request)->send($disableNotifications);
|
$this->getTransport($request)->send($disableNotifications);
|
||||||
Notification::success(mt('monitoring', 'Disabling host and service notifications..'));
|
Notification::success(mt('monitoring', 'Disabling host and service notifications..'));
|
||||||
return true;
|
return true;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Monitoring\Command\Renderer;
|
namespace Icinga\Module\Monitoring\Command\Renderer;
|
||||||
|
|
||||||
|
use Icinga\Module\Monitoring\Command\Instance\DisableNotificationsExpireCommand;
|
||||||
use Icinga\Module\Monitoring\Command\Object\AcknowledgeProblemCommand;
|
use Icinga\Module\Monitoring\Command\Object\AcknowledgeProblemCommand;
|
||||||
use Icinga\Module\Monitoring\Command\Object\AddCommentCommand;
|
use Icinga\Module\Monitoring\Command\Object\AddCommentCommand;
|
||||||
use Icinga\Module\Monitoring\Command\Object\DeleteCommentCommand;
|
use Icinga\Module\Monitoring\Command\Object\DeleteCommentCommand;
|
||||||
@ -386,4 +387,13 @@ class IcingaCommandFileCommandRenderer implements IcingaCommandRendererInterface
|
|||||||
}
|
}
|
||||||
return $commandString;
|
return $commandString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function renderDisableNotificationsExpire(DisableNotificationsExpireCommand $command)
|
||||||
|
{
|
||||||
|
return sprintf(
|
||||||
|
'%s;%u',
|
||||||
|
'DISABLE_NOTIFICATIONS_EXPIRE_TIME',
|
||||||
|
$command->getExpireTime()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user