mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 06:44:33 +02:00
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 = new DeleteDowntimeCommand();
|
||||||
$cmd
|
$cmd
|
||||||
|
->setAuthor($this->Auth()->getUser()->getUsername())
|
||||||
->setDowntimeId($this->getElement('downtime_id')->getValue())
|
->setDowntimeId($this->getElement('downtime_id')->getValue())
|
||||||
->setDowntimeName($this->getElement('downtime_name')->getValue())
|
->setDowntimeName($this->getElement('downtime_name')->getValue())
|
||||||
->setIsService($this->getElement('downtime_is_service')->getValue());
|
->setIsService($this->getElement('downtime_is_service')->getValue());
|
||||||
|
@ -73,6 +73,7 @@ class DeleteDowntimesCommandForm extends CommandForm
|
|||||||
$delDowntime
|
$delDowntime
|
||||||
->setDowntimeId($downtime->id)
|
->setDowntimeId($downtime->id)
|
||||||
->setDowntimeName($downtime->name)
|
->setDowntimeName($downtime->name)
|
||||||
|
->setAuthor($this->Auth()->getUser()->getUsername())
|
||||||
->setIsService(isset($downtime->service_description));
|
->setIsService(isset($downtime->service_description));
|
||||||
$this->getTransport($this->request)->send($delDowntime);
|
$this->getTransport($this->request)->send($delDowntime);
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,8 @@ use Icinga\Module\Monitoring\Command\IcingaCommand;
|
|||||||
*/
|
*/
|
||||||
class DeleteDowntimeCommand extends IcingaCommand
|
class DeleteDowntimeCommand extends IcingaCommand
|
||||||
{
|
{
|
||||||
|
use CommandAuthor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of the downtime that is to be deleted
|
* ID of the downtime that is to be deleted
|
||||||
*
|
*
|
||||||
|
@ -247,9 +247,10 @@ class IcingaApiCommandRenderer implements IcingaCommandRendererInterface
|
|||||||
public function renderDeleteDowntime(DeleteDowntimeCommand $command)
|
public function renderDeleteDowntime(DeleteDowntimeCommand $command)
|
||||||
{
|
{
|
||||||
$endpoint = 'actions/remove-downtime';
|
$endpoint = 'actions/remove-downtime';
|
||||||
$data = array(
|
$data = [
|
||||||
'downtime' => $command->getDowntimeName()
|
'author' => $command->getAuthor(),
|
||||||
);
|
'downtime' => $command->getDowntimeName()
|
||||||
|
];
|
||||||
return IcingaApiCommand::create($endpoint, $data);
|
return IcingaApiCommand::create($endpoint, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user