mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
ScheduleDowntimeForm: replace obsolete ::fromRequest
A serious fix would involve passing the current backend to our command forms.
This commit is contained in:
parent
ba9a633b73
commit
4d42b4d2c4
@ -39,6 +39,7 @@ use Icinga\Module\Monitoring\Backend;
|
|||||||
use Icinga\Module\Monitoring\Command\ScheduleDowntimeCommand;
|
use Icinga\Module\Monitoring\Command\ScheduleDowntimeCommand;
|
||||||
use Icinga\Module\Monitoring\Object\AbstractObject;
|
use Icinga\Module\Monitoring\Object\AbstractObject;
|
||||||
use Icinga\Module\Monitoring\Object\Service;
|
use Icinga\Module\Monitoring\Object\Service;
|
||||||
|
use Icinga\Web\Url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form for scheduling downtimes
|
* Form for scheduling downtimes
|
||||||
@ -91,7 +92,7 @@ class ScheduleDowntimeForm extends WithChildrenCommandForm
|
|||||||
|
|
||||||
$cfg = $this->getConfiguration();
|
$cfg = $this->getConfiguration();
|
||||||
$preferences = $this->getUserPreferences();
|
$preferences = $this->getUserPreferences();
|
||||||
$object = AbstractObject::fromRequest($this->getRequest());
|
$object = AbstractObject::fromParams(Url::fromRequest()->getParams());
|
||||||
$object->fetchDowntimes();
|
$object->fetchDowntimes();
|
||||||
$downtimes = $object->downtimes;
|
$downtimes = $object->downtimes;
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user