diff --git a/application/controllers/SearchController.php b/application/controllers/SearchController.php index 530db3c66..d0a76a737 100644 --- a/application/controllers/SearchController.php +++ b/application/controllers/SearchController.php @@ -20,6 +20,10 @@ class SearchController extends ActionController { $this->setAutorefreshInterval(10); $search = $this->_request->getParam('q'); + if (! $search) { + $this->view->hint = $this->translate('Ready to search, waiting for your input'); + return; + } $dashboard = Widget::create('dashboard')->createPane('Search'); $pane = $dashboard->getPane('Search'); $suffix = strlen($search) ? ': ' . rtrim($search, '*') . '*' : ''; @@ -37,6 +41,10 @@ class SearchController extends ActionController 'hostgroup' => $search . '*', 'limit' => 10, ))); + $pane->addComponent('Servicegroups' . $suffix, Url::fromPath('monitoring/list/servicegroups', array( + 'servicegroup' => $search . '*', + 'limit' => 10, + ))); $dashboard->activate('Search'); $this->view->dashboard = $dashboard; $this->view->tabs = $dashboard->getTabs(); diff --git a/application/views/scripts/search/index.phtml b/application/views/scripts/search/index.phtml index 52dc7a14c..fe596cdbe 100644 --- a/application/views/scripts/search/index.phtml +++ b/application/views/scripts/search/index.phtml @@ -2,6 +2,12 @@ = $this->tabs ?> +dashboard): ?>