Transmit the user who cancels a downtime
This commit is contained in:
parent
287edb7932
commit
08bc671fb7
|
@ -94,6 +94,7 @@ class DeleteDowntimeCommandForm extends CommandForm
|
|||
{
|
||||
$cmd = new DeleteDowntimeCommand();
|
||||
$cmd
|
||||
->setAuthor($this->Auth()->getUser()->getUsername())
|
||||
->setDowntimeId($this->getElement('downtime_id')->getValue())
|
||||
->setDowntimeName($this->getElement('downtime_name')->getValue())
|
||||
->setIsService($this->getElement('downtime_is_service')->getValue());
|
||||
|
|
|
@ -73,6 +73,7 @@ class DeleteDowntimesCommandForm extends CommandForm
|
|||
$delDowntime
|
||||
->setDowntimeId($downtime->id)
|
||||
->setDowntimeName($downtime->name)
|
||||
->setAuthor($this->Auth()->getUser()->getUsername())
|
||||
->setIsService(isset($downtime->service_description));
|
||||
$this->getTransport($this->request)->send($delDowntime);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ use Icinga\Module\Monitoring\Command\IcingaCommand;
|
|||
*/
|
||||
class DeleteDowntimeCommand extends IcingaCommand
|
||||
{
|
||||
use CommandAuthor;
|
||||
|
||||
/**
|
||||
* ID of the downtime that is to be deleted
|
||||
*
|
||||
|
|
|
@ -247,9 +247,10 @@ class IcingaApiCommandRenderer implements IcingaCommandRendererInterface
|
|||
public function renderDeleteDowntime(DeleteDowntimeCommand $command)
|
||||
{
|
||||
$endpoint = 'actions/remove-downtime';
|
||||
$data = array(
|
||||
'downtime' => $command->getDowntimeName()
|
||||
);
|
||||
$data = [
|
||||
'author' => $command->getAuthor(),
|
||||
'downtime' => $command->getDowntimeName()
|
||||
];
|
||||
return IcingaApiCommand::create($endpoint, $data);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue