Skip to content

Commit

Permalink
monitoring/commands: Support 'DISABLE_NOTIFICATIONS_EXPIRE_TIME'
Browse files Browse the repository at this point in the history
refs #6593
  • Loading branch information
lippserd committed Sep 12, 2014
1 parent 3f216f2 commit 1d54c7f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Expand Up @@ -66,7 +66,7 @@ public function onSuccess(Request $request)
{
$disableNotifications = new DisableNotificationsExpireCommand();
$disableNotifications
->setExpireTime($this->getElement('expire_time')->getValue());
->setExpireTime($this->getElement('expire_time')->getValue()->getTimestamp());
$this->getTransport($request)->send($disableNotifications);
Notification::success(mt('monitoring', 'Disabling host and service notifications..'));
return true;
Expand Down
Expand Up @@ -2,6 +2,7 @@

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\AddCommentCommand;
use Icinga\Module\Monitoring\Command\Object\DeleteCommentCommand;
Expand Down Expand Up @@ -386,4 +387,13 @@ public function renderRemoveAcknowledgement(RemoveAcknowledgementCommand $comman
}
return $commandString;
}

public function renderDisableNotificationsExpire(DisableNotificationsExpireCommand $command)
{
return sprintf(
'%s;%u',
'DISABLE_NOTIFICATIONS_EXPIRE_TIME',
$command->getExpireTime()
);
}
}

0 comments on commit 1d54c7f

Please sign in to comment.