HostController: show inspect link

fixes #1396
This commit is contained in:
Thomas Gelf 2018-02-20 15:33:28 +01:00
parent 0ae1ed1319
commit fae6162133

View File

@ -356,12 +356,36 @@ class HostController extends ObjectController
'data-base-target' => '_next'
]
));
// Intentionally placed here, show it only for deployed Hosts
$this->addOptionalInspectLink();
}
} catch (Exception $e) {
// Silently ignore errors in the monitoring module
}
}
protected function addOptionalInspectLink()
{
if (! $this->hasPermission('director/inspect')) {
return;
}
$this->actions()->add(Link::create(
$this->translate('Inspect'),
'director/inspect/object',
[
'type' => 'host',
'plural' => 'hosts',
'name' => $this->object->getObjectName()
],
[
'class' => 'icon-zoom-in',
'data-base-target' => '_next'
]
));
}
/**
* @return IcingaHost
*/