parent
5e4b611860
commit
5e94d65a6c
|
@ -9,6 +9,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\ScheduleHostCheckCommandForm;
|
|||
use Icinga\Module\Monitoring\Forms\Command\Object\ScheduleHostDowntimeCommandForm;
|
||||
use Icinga\Module\Monitoring\Object\Host;
|
||||
use Icinga\Module\Monitoring\Web\Controller\MonitoredObjectController;
|
||||
use Icinga\Web\Hook;
|
||||
|
||||
class Monitoring_HostController extends MonitoredObjectController
|
||||
{
|
||||
|
@ -33,12 +34,26 @@ class Monitoring_HostController extends MonitoredObjectController
|
|||
$this->createTabs();
|
||||
}
|
||||
|
||||
protected function getHostActions()
|
||||
{
|
||||
$urls = array();
|
||||
|
||||
foreach (Hook::all('Monitoring\\HostActions') as $hook) {
|
||||
foreach ($hook->getActionsForHost($this->object) as $id => $url) {
|
||||
$urls[$id] = $url;
|
||||
}
|
||||
}
|
||||
|
||||
return $urls;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a host
|
||||
*/
|
||||
public function showAction()
|
||||
{
|
||||
$this->getTabs()->activate('host');
|
||||
$this->view->hostActions = $this->getHostActions();
|
||||
parent::showAction();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue