summaryrefslogtreecommitdiffstats
path: root/library/Businessprocess/ProvidedHook/Icingadb/HostActions.php
blob: ac1895936e8368502d32c52380759743259c6b78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

namespace Icinga\Module\Businessprocess\ProvidedHook\Icingadb;

use Icinga\Module\Businessprocess\BpConfig;
use Icinga\Module\Icingadb\Hook\HostActionsHook;
use Icinga\Module\Icingadb\Model\Host;
use ipl\Web\Widget\Link;

class HostActions extends HostActionsHook
{
    public function getActionsForObject(Host $host): array
    {
        $label = mt('businessprocess', 'Business Impact');
        return array(
            new Link(
                $label,
                'businessprocess/node/impact?name='
                . rawurlencode(BpConfig::joinNodeName($host->name, 'Hoststatus'))
            )
        );
    }
}