mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
ServiceController: Use trait CommandActions
This commit is contained in:
parent
623fd8b1ff
commit
edbc2af7a6
1 changed files with 8 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
namespace Icinga\Module\Eagle\Controllers;
|
||||
|
||||
use Icinga\Exception\NotFoundError;
|
||||
use Icinga\Module\Eagle\Common\CommandActions;
|
||||
use Icinga\Module\Eagle\Model\Service;
|
||||
use Icinga\Module\Eagle\Redis\VolatileState;
|
||||
use Icinga\Module\Eagle\Web\Controller;
|
||||
|
|
@ -10,6 +11,8 @@ use Icinga\Module\Eagle\Widget\ServiceListItem;
|
|||
|
||||
class ServiceController extends Controller
|
||||
{
|
||||
use CommandActions;
|
||||
|
||||
/** @var Service The service object */
|
||||
protected $service;
|
||||
|
||||
|
|
@ -40,6 +43,11 @@ class ServiceController extends Controller
|
|||
$this->service = $service;
|
||||
}
|
||||
|
||||
public function fetchCommandTargets()
|
||||
{
|
||||
return [$this->service];
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->addContent((new ServiceListItem($this->service))->setTag('div'));
|
||||
|
|
|
|||
Loading…
Reference in a new issue