mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
autorefresh even for search results, nicer headers
This commit is contained in:
parent
915a024030
commit
635cdcbbc5
@ -18,21 +18,23 @@ class SearchController extends ActionController
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
$this->setAutorefreshInterval(10);
|
||||
$search = $this->_request->getParam('q');
|
||||
$dashboard = Widget::create('dashboard')->createPane('Search');
|
||||
$pane = $dashboard->getPane('Search');
|
||||
$pane->addComponent('Hosts', Url::fromPath('monitoring/list/hosts', array(
|
||||
$suffix = strlen($search) ? ': ' . rtrim($search, '*') . '*' : '';
|
||||
$pane->addComponent('Hosts' . $suffix, Url::fromPath('monitoring/list/hosts', array(
|
||||
'host_name' => $search . '*',
|
||||
'sort' => 'host_severity',
|
||||
'limit' => 10,
|
||||
)));
|
||||
$pane->addComponent('Services', Url::fromPath('monitoring/list/services', array(
|
||||
'service_description' => '*' . $search . '*',
|
||||
$pane->addComponent('Services' . $suffix, Url::fromPath('monitoring/list/services', array(
|
||||
'service_description' => $search . '*',
|
||||
'sort' => 'service_severity',
|
||||
'limit' => 10,
|
||||
)));
|
||||
$pane->addComponent('Hostgroups', Url::fromPath('monitoring/list/hostgroups', array(
|
||||
'hostgroup' => '*' . $search . '*',
|
||||
$pane->addComponent('Hostgroups' . $suffix, Url::fromPath('monitoring/list/hostgroups', array(
|
||||
'hostgroup' => $search . '*',
|
||||
'limit' => 10,
|
||||
)));
|
||||
$dashboard->activate('Search');
|
||||
|
Loading…
x
Reference in New Issue
Block a user