[icinga-checkins] icinga.org: icingaweb2-module-director/master: EndpointController: remove peer detection

git at icinga.org git at icinga.org
Wed Feb 17 16:49:46 CET 2016


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

Author: Thomas Gelf <thomas at gelf.net>
Date:   Wed Feb 17 16:47:03 2016 +0100

EndpointController: remove peer detection

---

 application/controllers/EndpointController.php |   17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/application/controllers/EndpointController.php b/application/controllers/EndpointController.php
index 2330834..93be515 100644
--- a/application/controllers/EndpointController.php
+++ b/application/controllers/EndpointController.php
@@ -9,7 +9,7 @@ class EndpointController extends ObjectController
     public function init()
     {
         parent::init();
-        if ($this->isPeer()) {
+        if ($this->object && $this->object->hasApiUser()) {
             $params['endpoint'] = $this->object->object_name;
 
             $this->getTabs()->add('inspect', array(
@@ -19,19 +19,4 @@ class EndpointController extends ObjectController
             ));
         }
     }
-
-    protected function isPeer()
-    {
-        if (! $this->object) return false;
-
-        $apiconfig = $this->Config()->getSection('api');
-        $host = $apiconfig->get('address');
-        $port = $apiconfig->get('port');
-
-        if ($host === $this->object->host
-            && $port === $this->object->port
-        ) {
-            return true;
-        }
-    }
 }



More information about the icinga-checkins mailing list