[icinga-checkins] icinga.org: icingaweb2-module-director/master: ServiceController: provide a 'back'-link for...

git at icinga.org git at icinga.org
Mon Jan 2 11:20:51 CET 2017


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

Author: Thomas Gelf <thomas at gelf.net>
Date:   Mon Jan  2 11:20:28 2017 +0100

ServiceController: provide a 'back'-link for...

...services belonging to a single host

---

 application/controllers/ServiceController.php |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/application/controllers/ServiceController.php b/application/controllers/ServiceController.php
index d61c232..12291cf 100644
--- a/application/controllers/ServiceController.php
+++ b/application/controllers/ServiceController.php
@@ -125,6 +125,12 @@ class ServiceController extends ObjectController
 
             $object->vars = $this->host->getOverriddenServiceVars($object->object_name);
             $object->imports()->add($parent);
+            $this->view->actionLinks = $this->view->qlink(
+                $this->translate('back'),
+                'director/host/services',
+                array('name' => $this->host->object_name),
+                array('class' => 'icon-left-big')
+            );
         }
 
         $this->getTabs()->activate('modify');
@@ -134,7 +140,7 @@ class ServiceController extends ObjectController
             ->setObject($object);
 
         $this->view->form->handleRequest();
-        $this->view->actionLinks = $this->createCloneLink();
+        $this->view->actionLinks .= $this->createCloneLink();
 
         $this->view->title = $object->object_name;
         if ($this->host) {



More information about the icinga-checkins mailing list