2015-06-30 05:19:31 -04:00
|
|
|
<?php
|
|
|
|
|
|
2015-10-20 16:34:04 -04:00
|
|
|
namespace Icinga\Module\Director\Controllers;
|
|
|
|
|
|
2015-06-30 05:19:31 -04:00
|
|
|
use Icinga\Module\Director\Web\Controller\ObjectController;
|
|
|
|
|
|
2015-10-20 16:34:04 -04:00
|
|
|
class EndpointController extends ObjectController
|
2015-06-30 05:19:31 -04:00
|
|
|
{
|
2015-12-17 04:49:10 -05:00
|
|
|
public function init()
|
|
|
|
|
{
|
|
|
|
|
parent::init();
|
2016-02-17 10:47:03 -05:00
|
|
|
if ($this->object && $this->object->hasApiUser()) {
|
2015-12-17 04:49:10 -05:00
|
|
|
$params['endpoint'] = $this->object->object_name;
|
|
|
|
|
|
|
|
|
|
$this->getTabs()->add('inspect', array(
|
|
|
|
|
'url' => 'director/inspect/types',
|
|
|
|
|
'urlParams' => $params,
|
|
|
|
|
'label' => $this->translate('Inspect')
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-06-30 05:19:31 -04:00
|
|
|
}
|