mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 17:24:18 +02:00
CubeLinks: cleanup, comments
This commit is contained in:
parent
d258cb433e
commit
1b71df732e
@ -2,14 +2,17 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Director\ProvidedHook;
|
namespace Icinga\Module\Director\ProvidedHook;
|
||||||
|
|
||||||
use Icinga\Module\Cube\Hook\ActionsHook;
|
|
||||||
use Icinga\Module\Cube\Cube;
|
|
||||||
use Icinga\Module\Cube\Ido\IdoHostStatusCube;
|
|
||||||
use Icinga\Data\Filter\Filter;
|
use Icinga\Data\Filter\Filter;
|
||||||
|
use Icinga\Module\Cube\Cube;
|
||||||
|
use Icinga\Module\Cube\Hook\ActionsHook;
|
||||||
|
use Icinga\Module\Cube\Ido\IdoHostStatusCube;
|
||||||
use Icinga\Web\View;
|
use Icinga\Web\View;
|
||||||
|
|
||||||
class CubeLinks extends ActionsHook
|
class CubeLinks extends ActionsHook
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
public function prepareActionLinks(Cube $cube, View $view)
|
public function prepareActionLinks(Cube $cube, View $view)
|
||||||
{
|
{
|
||||||
if (! $cube instanceof IdoHostStatusCube) {
|
if (! $cube instanceof IdoHostStatusCube) {
|
||||||
@ -38,7 +41,7 @@ class CubeLinks extends ActionsHook
|
|||||||
$params = null;
|
$params = null;
|
||||||
|
|
||||||
$filter = Filter::matchAny();
|
$filter = Filter::matchAny();
|
||||||
foreach($hosts as $host) {
|
foreach ($hosts as $host) {
|
||||||
$filter->addFilter(
|
$filter->addFilter(
|
||||||
Filter::matchAny(Filter::expression('name', '=', $host))
|
Filter::matchAny(Filter::expression('name', '=', $host))
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user