inspect/types: fix tabs

fixes #11254
This commit is contained in:
Thomas Gelf 2016-02-28 18:23:03 +01:00
parent 489fb661d9
commit ad72eeb158
1 changed files with 19 additions and 1 deletions

View File

@ -8,11 +8,29 @@ class InspectController extends ActionController
{ {
public function typesAction() public function typesAction()
{ {
$api = $this->api();
$params = array('name' => $this->view->endpoint);
$this->getTabs()->add('modify', array(
'url' => 'director/endpoint',
'urlParams' => $params,
'label' => $this->translate('Endpoint')
))->add('render', array(
'url' => 'director/endpoint/render',
'urlParams' => $params,
'label' => $this->translate('Preview'),
))->add('history', array(
'url' => 'director/endpoint/history',
'urlParams' => $params,
'label' => $this->translate('History')
))->add('inspect', array(
'url' => $this->getRequest()->getUrl(),
'label' => $this->translate('Inspect')
))->activate('inspect');
$this->view->title = sprintf( $this->view->title = sprintf(
$this->translate('Icinga2 Objects: %s'), $this->translate('Icinga2 Objects: %s'),
$this->view->endpoint $this->view->endpoint
); );
$api = $this->api();
$types = $api->getTypes(); $types = $api->getTypes();
$rootNodes = array(); $rootNodes = array();
foreach ($types as $name => $type) { foreach ($types as $name => $type) {