From 21c42b992285418bdfae017839da98699f8b05b1 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 16 Oct 2015 18:03:32 +0200 Subject: [PATCH] ConfigController: show tabs, also related... ...deployment if linked from there --- application/controllers/ConfigController.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php index 9b1885b1..1c060ea0 100644 --- a/application/controllers/ConfigController.php +++ b/application/controllers/ConfigController.php @@ -31,6 +31,23 @@ class Director_ConfigController extends ActionController public function showAction() { + $tabs = $this->getTabs(); + + if ($deploymentId = $this->params->get('deployment_id')) { + $tabs->add('deployment', array( + 'label' => $this->translate('Deployment'), + 'url' => 'director/deployment/show', + 'urlParams' => array( + 'id' => $deploymentId + ) + )); + } + + $tabs->add('config', array( + 'label' => $this->translate('Config'), + 'url' => $this->getRequest()->getUrl(), + ))->activate('config'); + $this->view->config = IcingaConfig::fromDb(Util::hex2binary($this->params->get('checksum')), $this->db()); }