mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-02-02 08:29:26 -05:00
Controllers: Add an else case to improve readability
This commit is contained in:
parent
d17c4501b2
commit
86b5557c1e
4 changed files with 18 additions and 18 deletions
|
|
@ -26,12 +26,12 @@ class HostController extends CompatController
|
|||
|
||||
if ($host !== null) {
|
||||
$this->redirectNow(Url::fromPath('icingadb/host')->setParams($this->params));
|
||||
} else {
|
||||
$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')));
|
||||
}
|
||||
|
||||
$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')));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ class IdoHostController extends Controller
|
|||
$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;
|
||||
}
|
||||
|
||||
$this->view->host = $hostName;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ class IdoServiceController extends Controller
|
|||
$this->applyRestriction('monitoring/filter/objects', $query);
|
||||
if ($query->fetchRow() !== false) {
|
||||
$this->redirectNow(Url::fromPath('monitoring/service/show')->setParams($this->params));
|
||||
} else {
|
||||
$this->view->host = $hostName;
|
||||
$this->view->service = $serviceName;
|
||||
}
|
||||
|
||||
$this->view->host = $hostName;
|
||||
$this->view->service = $serviceName;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,13 +31,13 @@ class ServiceController extends CompatController
|
|||
|
||||
if ($service !== null) {
|
||||
$this->redirectNow(Url::fromPath('icingadb/service')->setParams($this->params));
|
||||
} else {
|
||||
$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')));
|
||||
}
|
||||
|
||||
$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')));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue