mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
DowntimeController: Already fetch required relations with the first query
This commit is contained in:
parent
382f2ef198
commit
13300577ce
1 changed files with 8 additions and 1 deletions
|
|
@ -23,7 +23,14 @@ class DowntimeController extends Controller
|
|||
|
||||
$name = $this->params->shiftRequired('name');
|
||||
|
||||
$query = Downtime::on($this->getDb());
|
||||
$query = Downtime::on($this->getDb())->with([
|
||||
'host',
|
||||
'host.state',
|
||||
'service',
|
||||
'service.state',
|
||||
'service.host',
|
||||
'service.host.state'
|
||||
]);
|
||||
$query->getSelectBase()
|
||||
->where(['downtime.name = ?' => $name]);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue