2015-06-30 11:19:31 +02:00
|
|
|
<?php
|
|
|
|
|
2015-10-20 22:34:04 +02:00
|
|
|
namespace Icinga\Module\Director\Controllers;
|
|
|
|
|
2015-06-30 11:19:31 +02:00
|
|
|
use Icinga\Module\Director\Web\Controller\ObjectController;
|
|
|
|
|
2015-10-20 22:34:04 +02:00
|
|
|
class EndpointController extends ObjectController
|
2015-06-30 11:19:31 +02:00
|
|
|
{
|
2015-12-17 10:49:10 +01:00
|
|
|
public function init()
|
|
|
|
{
|
2016-11-03 11:49:04 +01:00
|
|
|
$this->assertPermission('director/inspect');
|
2015-12-17 10:49:10 +01:00
|
|
|
parent::init();
|
2016-02-17 16:47:03 +01:00
|
|
|
if ($this->object && $this->object->hasApiUser()) {
|
2015-12-17 10:49:10 +01: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 11:19:31 +02:00
|
|
|
}
|