mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-03 12:04:24 +02:00
Add new tab to switch between host and service multi-selection
refs #8565
This commit is contained in:
parent
5619ac960c
commit
45a0982beb
@ -25,9 +25,14 @@ class Monitoring_HostsController extends Controller
|
|||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
|
// Support switching from service-view using the host and service selection. The filter would error
|
||||||
|
// on any occurrence of a filter based on service.
|
||||||
|
$filterString = preg_replace('/(service=[^)&]*)/', '', (string)$this->params);
|
||||||
|
|
||||||
$hostList = new HostList($this->backend);
|
$hostList = new HostList($this->backend);
|
||||||
$hostList->setFilter(Filter::fromQueryString((string) $this->params));
|
$hostList->setFilter(Filter::fromQueryString($filterString));
|
||||||
$this->hostList = $hostList;
|
$this->hostList = $hostList;
|
||||||
|
|
||||||
$this->getTabs()->add(
|
$this->getTabs()->add(
|
||||||
'show',
|
'show',
|
||||||
array(
|
array(
|
||||||
@ -40,6 +45,19 @@ class Monitoring_HostsController extends Controller
|
|||||||
'icon' => 'host'
|
'icon' => 'host'
|
||||||
)
|
)
|
||||||
)->activate('show');
|
)->activate('show');
|
||||||
|
|
||||||
|
$this->getTabs()->add(
|
||||||
|
'services',
|
||||||
|
array(
|
||||||
|
'title' => sprintf(
|
||||||
|
$this->translate('Show summarized information for related services')
|
||||||
|
),
|
||||||
|
'label' => $this->translate('Services'),
|
||||||
|
'url' => Url::fromPath('monitoring/services/show')->setParams(Url::fromRequest()->getParams()),
|
||||||
|
'icon' => 'services'
|
||||||
|
)
|
||||||
|
)->activate('show');
|
||||||
|
|
||||||
$this->view->listAllLink = Url::fromRequest()->setPath('monitoring/list/hosts');
|
$this->view->listAllLink = Url::fromRequest()->setPath('monitoring/list/hosts');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +32,19 @@ class Monitoring_ServicesController extends Controller
|
|||||||
$serviceList->setFilter(Filter::fromQueryString((string) $this->params->without('service_problem', 'service_handled')));
|
$serviceList->setFilter(Filter::fromQueryString((string) $this->params->without('service_problem', 'service_handled')));
|
||||||
$this->serviceList = $serviceList;
|
$this->serviceList = $serviceList;
|
||||||
$this->view->listAllLink = Url::fromRequest()->setPath('monitoring/list/services');
|
$this->view->listAllLink = Url::fromRequest()->setPath('monitoring/list/services');
|
||||||
|
|
||||||
|
$this->getTabs()->add(
|
||||||
|
'hosts',
|
||||||
|
array(
|
||||||
|
'title' => sprintf(
|
||||||
|
$this->translate('Show summarized information for hosts')
|
||||||
|
),
|
||||||
|
'label' => $this->translate('Hosts'),
|
||||||
|
'url' => Url::fromPath('monitoring/hosts/show')->setParams(Url::fromRequest()->getParams()),
|
||||||
|
'icon' => 'host'
|
||||||
|
)
|
||||||
|
)->activate('show');
|
||||||
|
|
||||||
$this->getTabs()->add(
|
$this->getTabs()->add(
|
||||||
'show',
|
'show',
|
||||||
array(
|
array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user