diff --git a/application/controllers/HostController.php b/application/controllers/HostController.php index b62aa56..886d34d 100644 --- a/application/controllers/HostController.php +++ b/application/controllers/HostController.php @@ -5,6 +5,7 @@ namespace Icinga\Module\Businessprocess\Controllers; use Icinga\Module\Businessprocess\IcingaDbObject; use Icinga\Module\Icingadb\Model\Host; use Icinga\Web\Url; +use ipl\Html\HtmlString; use ipl\Stdlib\Filter; use ipl\Web\Compat\CompatController; @@ -27,6 +28,10 @@ class HostController extends CompatController $this->redirectNow(Url::fromPath('icingadb/host')->setParams($this->params)); } + $this->getTabs()->disableLegacyExtensions(); + $this->view->host = $hostName; + $this->view->tabs = null; // compatController already creates tabs + $this->addContent(HtmlString::create($this->view->render('ido-host/show.phtml'))); } } diff --git a/application/controllers/ServiceController.php b/application/controllers/ServiceController.php index d807936..241155b 100644 --- a/application/controllers/ServiceController.php +++ b/application/controllers/ServiceController.php @@ -5,6 +5,7 @@ namespace Icinga\Module\Businessprocess\Controllers; use Icinga\Module\Businessprocess\IcingaDbObject; use Icinga\Module\Icingadb\Model\Service; use Icinga\Web\Url; +use ipl\Html\HtmlString; use ipl\Stdlib\Filter; use ipl\Web\Compat\CompatController; @@ -32,7 +33,11 @@ class ServiceController extends CompatController $this->redirectNow(Url::fromPath('icingadb/service')->setParams($this->params)); } + $this->getTabs()->disableLegacyExtensions(); + $this->view->host = $hostName; $this->view->service = $serviceName; + $this->view->tabs = null; // compatController already creates tabs + $this->addContent(HtmlString::create($this->view->render('ido-service/show.phtml'))); } } diff --git a/application/views/scripts/ido-host/show.phtml b/application/views/scripts/ido-host/show.phtml index 413baf2..5cfc3f5 100644 --- a/application/views/scripts/ido-host/show.phtml +++ b/application/views/scripts/ido-host/show.phtml @@ -3,9 +3,11 @@ /** @var \Icinga\Web\Widget\Tabs $tabs */ /** @var string $host */ ?> +
showOnlyCloseButton() ?>
+

translate('Access Denied') ?>

translate('You are lacking permission to access host "%s".'), $this->escape($host)) ?>

diff --git a/application/views/scripts/ido-service/show.phtml b/application/views/scripts/ido-service/show.phtml index 205b3f7..6da90c9 100644 --- a/application/views/scripts/ido-service/show.phtml +++ b/application/views/scripts/ido-service/show.phtml @@ -4,9 +4,11 @@ /** @var string $host */ /** @var string $service */ ?> +
showOnlyCloseButton() ?>
+

escape($this->translate('Access Denied')) ?>

escape(sprintf($this->translate('You are lacking permission to access service "%s" on host "%s"'), $service, $host)) ?>