mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-08-14 06:18:10 +02:00
parent
0ae1ed1319
commit
fae6162133
@ -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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user