icingaweb2-module-businessp.../application/controllers/IdoHostController.php
Sukhwinder Dhillon 9a91854d4c Remove monitoring module dependency
By separating `monitoring` module controllers.

- Adjust view-script paths accordingly
2026-01-13 08:52:01 +01:00

25 lines
672 B
PHP

<?php
namespace Icinga\Module\Businessprocess\Controllers;
use Icinga\Module\Monitoring\Controller;
use Icinga\Web\Url;
class IdoHostController extends Controller
{
public function showAction(): void
{
$hostName = $this->params->get('host');
$query = $this->backend->select()
->from('hoststatus', array('host_name'))
->where('host_name', $hostName);
$this->applyRestriction('monitoring/filter/objects', $query);
if ($query->fetchRow() !== false) {
$this->redirectNow(Url::fromPath('monitoring/host/show')->setParams($this->params));
}
$this->view->host = $hostName;
}
}