[icinga-checkins] icinga.org: icingaweb2-module-director/feature/icinga-legacy-config-13049: config/file: unify look and feel, link back

git at icinga.org git at icinga.org
Fri Nov 11 10:44:00 CET 2016


Module: icingaweb2-module-director
Branch: feature/icinga-legacy-config-13049
Commit: 64f00940b185c13e488d6aabd99f31432fe11726
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=64f00940b185c13e488d6aabd99f31432fe11726

Author: Thomas Gelf <thomas at gelf.net>
Date:   Tue Nov  8 22:16:56 2016 +0100

config/file: unify look and feel, link back

fixes #13087

---

 application/controllers/ConfigController.php |   15 +++++++++------
 library/Director/StartupLogRenderer.php      |    3 +--
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php
index 2696be4..91a30f8 100644
--- a/application/controllers/ConfigController.php
+++ b/application/controllers/ConfigController.php
@@ -189,16 +189,19 @@ class ConfigController extends ActionController
             'url'       => $this->getRequest()->getUrl(),
         ))->activate('file');
 
-        if ($fileOnly) {
-            $tabs->remove('config');
-            if ($tabs->has('deployment')) {
-                $tabs->remove('deployment');
-            }
+        $params = $this->getConfigTabParams();
+        if ('deployment' === $this->params->get('backTo')) {
+            $this->view->addLink = $this->view->qlink(
+                $this->translate('back'),
+                'director/deployment',
+                array('id' => $params['deployment_id']),
+                array('class' => 'icon-left-big')
+            );
         } else {
             $this->view->addLink = $this->view->qlink(
                 $this->translate('back'),
                 'director/config/files',
-                $this->getConfigTabParams(),
+                $params,
                 array('class' => 'icon-left-big')
             );
         }
diff --git a/library/Director/StartupLogRenderer.php b/library/Director/StartupLogRenderer.php
index 599f5a7..feba39b 100644
--- a/library/Director/StartupLogRenderer.php
+++ b/library/Director/StartupLogRenderer.php
@@ -78,7 +78,7 @@ class StartupLogRenderer
             'config_checksum' => $deploymentLog->getConfigHexChecksum(),
             'deployment_id'   => $deploymentLog->get('id'),
             'file_path'       => $filename,
-            'fileOnly'        => true,
+            'backTo'          => 'deployment'
         );
         if ($lineNumber !== null) {
             $params['highlight'] = $lineNumber;
@@ -90,7 +90,6 @@ class StartupLogRenderer
             'director/config/file',
             $params,
             array(
-                'data-base-target' => '_next',
                 'title' => $stageDir . $filename
             )
         ) . $suffix;



More information about the icinga-checkins mailing list