mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-06-09 00:32:05 -04:00
(Host|Service)Controller: Let the init() render the object header
This commit is contained in:
parent
7847f6eb94
commit
645ae00155
2 changed files with 10 additions and 28 deletions
|
|
@ -57,6 +57,11 @@ class HostController extends Controller
|
|||
$this->host = $host;
|
||||
$this->loadTabsForObject($host);
|
||||
|
||||
$this->addControl((new HostList([$host]))
|
||||
->setViewMode('objectHeader')
|
||||
->setDetailActionsDisabled()
|
||||
->setNoSubjectLink());
|
||||
|
||||
$this->setTitleTab($this->getRequest()->getActionName());
|
||||
$this->setTitle($host->display_name);
|
||||
}
|
||||
|
|
@ -72,10 +77,6 @@ class HostController extends Controller
|
|||
$this->controls->addAttributes(['class' => 'overdue']);
|
||||
}
|
||||
|
||||
$this->addControl((new HostList([$this->host]))
|
||||
->setViewMode('objectHeader')
|
||||
->setDetailActionsDisabled()
|
||||
->setNoSubjectLink());
|
||||
$this->addControl(new HostMetaInfo($this->host));
|
||||
$this->addControl(new QuickActions($this->host));
|
||||
|
||||
|
|
@ -97,10 +98,6 @@ class HostController extends Controller
|
|||
$this->controls->addAttributes(['class' => 'overdue']);
|
||||
}
|
||||
|
||||
$this->addControl((new HostList([$this->host]))
|
||||
->setViewMode('objectHeader')
|
||||
->setDetailActionsDisabled()
|
||||
->setNoSubjectLink());
|
||||
$this->addContent(new HostInspectionDetail(
|
||||
$this->host,
|
||||
reset($apiResult)
|
||||
|
|
@ -158,10 +155,6 @@ class HostController extends Controller
|
|||
|
||||
yield $this->export($history);
|
||||
|
||||
$this->addControl((new HostList([$this->host]))
|
||||
->setViewMode('objectHeader')
|
||||
->setDetailActionsDisabled()
|
||||
->setNoSubjectLink());
|
||||
$this->addControl($sortControl);
|
||||
$this->addControl($limitControl);
|
||||
$this->addControl($viewModeSwitcher);
|
||||
|
|
@ -221,10 +214,6 @@ class HostController extends Controller
|
|||
$serviceList = (new ServiceList($services))
|
||||
->setViewMode($viewModeSwitcher->getViewMode());
|
||||
|
||||
$this->addControl((new HostList([$this->host]))
|
||||
->setViewMode('objectHeader')
|
||||
->setDetailActionsDisabled()
|
||||
->setNoSubjectLink());
|
||||
$this->addControl($paginationControl);
|
||||
$this->addControl($sortControl);
|
||||
$this->addControl($limitControl);
|
||||
|
|
|
|||
|
|
@ -69,6 +69,11 @@ class ServiceController extends Controller
|
|||
$this->service = $service;
|
||||
$this->loadTabsForObject($service);
|
||||
|
||||
$this->addControl((new ServiceList([$service]))
|
||||
->setViewMode('objectHeader')
|
||||
->setDetailActionsDisabled()
|
||||
->setNoSubjectLink());
|
||||
|
||||
$this->setTitleTab($this->getRequest()->getActionName());
|
||||
$this->setTitle(
|
||||
t('%s on %s', '<service> on <host>'),
|
||||
|
|
@ -83,10 +88,6 @@ class ServiceController extends Controller
|
|||
$this->controls->addAttributes(['class' => 'overdue']);
|
||||
}
|
||||
|
||||
$this->addControl((new ServiceList([$this->service]))
|
||||
->setViewMode('objectHeader')
|
||||
->setDetailActionsDisabled()
|
||||
->setNoSubjectLink());
|
||||
$this->addControl(new ServiceMetaInfo($this->service));
|
||||
$this->addControl(new QuickActions($this->service));
|
||||
|
||||
|
|
@ -108,10 +109,6 @@ class ServiceController extends Controller
|
|||
$this->controls->addAttributes(['class' => 'overdue']);
|
||||
}
|
||||
|
||||
$this->addControl((new ServiceList([$this->service]))
|
||||
->setViewMode('objectHeader')
|
||||
->setDetailActionsDisabled()
|
||||
->setNoSubjectLink());
|
||||
$this->addContent(new ServiceInspectionDetail(
|
||||
$this->service,
|
||||
reset($apiResult)
|
||||
|
|
@ -170,10 +167,6 @@ class ServiceController extends Controller
|
|||
|
||||
yield $this->export($history);
|
||||
|
||||
$this->addControl((new ServiceList([$this->service]))
|
||||
->setViewMode('objectHeader')
|
||||
->setDetailActionsDisabled()
|
||||
->setNoSubjectLink());
|
||||
$this->addControl($sortControl);
|
||||
$this->addControl($limitControl);
|
||||
$this->addControl($viewModeSwitcher);
|
||||
|
|
|
|||
Loading…
Reference in a new issue