ServiceController: Implement method getCommandTargetsUrl()

This commit is contained in:
Johannes Meyer 2019-10-24 14:59:31 +02:00 committed by Eric Lippmann
parent 24223b950e
commit 67bb5f2685

View file

@ -7,6 +7,7 @@ use Icinga\Module\Eagle\Common\CommandActions;
use Icinga\Module\Eagle\Model\Service;
use Icinga\Module\Eagle\Web\Controller;
use Icinga\Module\Eagle\Widget\ServiceListItem;
use ipl\Web\Url;
class ServiceController extends Controller
{
@ -38,6 +39,14 @@ class ServiceController extends Controller
$this->service = $service;
}
public function getCommandTargetsUrl()
{
return Url::fromPath('eagle/service', [
'name' => $this->service->name,
'host_name' => $this->service->host->name
]);
}
public function fetchCommandTargets()
{
return [$this->service];