icingaweb2-module-businessp.../library/Businessprocess/ProvidedHook/Monitoring/ServiceActions.php
Thomas Gelf b3df39d1b0 NodeController: add business impact action
Show all paths to a specific node to visualize it's business impact

fixes #8573
2017-01-10 16:49:53 +01:00

25 lines
692 B
PHP

<?php
namespace Icinga\Module\Businessprocess\ProvidedHook\Monitoring;
use Exception;
use Icinga\Application\Config;
use Icinga\Module\Monitoring\Hook\ServiceActionsHook;
use Icinga\Module\Monitoring\Object\Service;
use Icinga\Web\Url;
class ServiceActions extends ServiceActionsHook
{
public function getActionsForService(Service $service)
{
$label = mt('businessprocess', 'Business Impact');
return array(
$label => sprintf(
'businessprocess/node/impact?name=%s',
rawurlencode(
sprintf('%s;%s', $service->getHost()->getName(), $service->getName())
)
)
);
}
}