[icinga-checkins] icinga.org: icingaweb2-module-director/feature/icinga1-config-12919: IndexController: Hide Kickstart for Legacy Config

git at icinga.org git at icinga.org
Wed Oct 19 13:17:43 CEST 2016


Module: icingaweb2-module-director
Branch: feature/icinga1-config-12919
Commit: ed047fda488d6464bf2abce50e6edfa22abee463
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=ed047fda488d6464bf2abce50e6edfa22abee463

Author: Markus Frosch <markus.frosch at icinga.com>
Date:   Wed Oct 19 10:31:17 2016 +0200

IndexController: Hide Kickstart for Legacy Config

---

 application/controllers/IndexController.php |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php
index 34f0679..319296e 100644
--- a/application/controllers/IndexController.php
+++ b/application/controllers/IndexController.php
@@ -127,10 +127,15 @@ class IndexController extends ActionController
 
     protected function hasDeploymentEndpoint()
     {
-        try {
-            $this->view->hasDeploymentEndpoint = $this->db()->hasDeploymentEndpoint();
-        } catch (Exception $e) {
-            return false;
+        if ($this->IcingaConfig()->isLegacy()) {
+            $this->view->hasDeploymentEndpoint = true;
+        }
+        else {
+            try {
+                $this->view->hasDeploymentEndpoint = $this->db()->hasDeploymentEndpoint();
+            } catch (Exception $e) {
+                $this->view->hasDeploymentEndpoint = false;
+            }
         }
 
         return $this->view->hasDeploymentEndpoint;



More information about the icinga-checkins mailing list