Transmit the user who clears an acknowledgement
This commit is contained in:
parent
08bc671fb7
commit
f6edad9336
|
@ -107,6 +107,7 @@ class RemoveAcknowledgementCommandForm extends ObjectsCommandForm
|
|||
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
||||
$removeAck = new RemoveAcknowledgementCommand();
|
||||
$removeAck->setObject($object);
|
||||
$removeAck->setAuthor($this->Auth()->getUser()->getUsername());
|
||||
$this->getTransport($this->request)->send($removeAck);
|
||||
}
|
||||
Notification::success(mtp(
|
||||
|
|
|
@ -8,6 +8,8 @@ namespace Icinga\Module\Monitoring\Command\Object;
|
|||
*/
|
||||
class RemoveAcknowledgementCommand extends ObjectCommand
|
||||
{
|
||||
use CommandAuthor;
|
||||
|
||||
/**
|
||||
* (non-PHPDoc)
|
||||
* @see \Icinga\Module\Monitoring\Command\Object\ObjectCommand::$allowedObjects For the property documentation.
|
||||
|
|
|
@ -257,7 +257,7 @@ class IcingaApiCommandRenderer implements IcingaCommandRendererInterface
|
|||
public function renderRemoveAcknowledgement(RemoveAcknowledgementCommand $command)
|
||||
{
|
||||
$endpoint = 'actions/remove-acknowledgement';
|
||||
$data = array();
|
||||
$data = ['author' => $command->getAuthor()];
|
||||
$this->applyFilter($data, $command->getObject());
|
||||
return IcingaApiCommand::create($endpoint, $data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue