diff --git a/application/controllers/InspectController.php b/application/controllers/InspectController.php index 02248aa2..2814af10 100644 --- a/application/controllers/InspectController.php +++ b/application/controllers/InspectController.php @@ -98,6 +98,10 @@ class InspectController extends ActionController protected function api() { $this->view->endpoint = $this->params->get('endpoint'); + if ($this->view->endpoint === null) { + $this->view->endpoint = $this->db()->getDeploymentEndpointName(); + } + $endpoint = IcingaEndpoint::load($this->view->endpoint, $this->db()); $apiconfig = $this->Config()->getSection('api'); $client = new RestApiClient($endpoint->host, $endpoint->port);