mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-04-13 21:16:16 -04:00
Add SPDX license headers and mark source files as GPL-3.0-or-later to preserve the option to relicense under later GPL versions.
28 lines
803 B
PHP
28 lines
803 B
PHP
<?php
|
|
|
|
// SPDX-FileCopyrightText: 2026 Icinga GmbH <https://icinga.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
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));
|
|
} else {
|
|
$this->view->host = $hostName;
|
|
}
|
|
}
|
|
}
|