parent
a4e5bb5559
commit
0aff644749
|
@ -70,23 +70,26 @@ class HostController extends ObjectController
|
||||||
{
|
{
|
||||||
return $this->getHostgroupRestriction()->allowsHost($object);
|
return $this->getHostgroupRestriction()->allowsHost($object);
|
||||||
}
|
}
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public function editAction()
|
public function editAction()
|
||||||
{
|
{
|
||||||
parent::editAction();
|
parent::editAction();
|
||||||
$host = $this->object;
|
$host = $this->object;
|
||||||
$mon = $this->monitoring();
|
try {
|
||||||
if ($host->isObject() && $mon->isAvailable() && $mon->hasHost($host->object_name)) {
|
$mon = $this->monitoring();
|
||||||
$this->actions()->add(Link::create(
|
if ($host->isObject() && $mon->isAvailable() && $mon->hasHost($host->object_name)) {
|
||||||
$this->translate('Show'),
|
$this->actions()->add(Link::create(
|
||||||
'monitoring/host/show',
|
$this->translate('Show'),
|
||||||
array('host' => $host->object_name),
|
'monitoring/host/show',
|
||||||
array(
|
array('host' => $host->object_name),
|
||||||
'class' => 'icon-globe critical',
|
array(
|
||||||
'data-base-target' => '_next'
|
'class' => 'icon-globe critical',
|
||||||
)
|
'data-base-target' => '_next'
|
||||||
));
|
)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// Silently ignore errors in the monitoring module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue