[icinga-checkins] icinga.org: icingaweb2-module-director/master: inspect/types: fix tabs

git at icinga.org git at icinga.org
Sun Feb 28 18:23:27 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: ad72eeb158db36ed4bf21368ec7f128e1d357b54
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=ad72eeb158db36ed4bf21368ec7f128e1d357b54

Author: Thomas Gelf <thomas at gelf.net>
Date:   Sun Feb 28 18:23:03 2016 +0100

inspect/types: fix tabs

fixes #11254

---

 application/controllers/InspectController.php |   20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/application/controllers/InspectController.php b/application/controllers/InspectController.php
index 48ad799..668bd36 100644
--- a/application/controllers/InspectController.php
+++ b/application/controllers/InspectController.php
@@ -8,11 +8,29 @@ class InspectController extends ActionController
 {
     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->translate('Icinga2 Objects: %s'),
             $this->view->endpoint
         );
-        $api = $this->api();
         $types = $api->getTypes();
         $rootNodes = array();
         foreach ($types as $name => $type) {



More information about the icinga-checkins mailing list