2014-02-25 11:56:58 +01:00
|
|
|
<?php
|
2015-02-04 10:46:36 +01:00
|
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
2014-02-25 11:56:58 +01:00
|
|
|
|
|
|
|
use Icinga\Web\Controller\ActionController;
|
|
|
|
use Icinga\Web\Widget;
|
2014-09-04 16:31:10 +02:00
|
|
|
use Icinga\Web\Widget\SearchDashboard;
|
2014-02-25 11:56:58 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Search controller
|
|
|
|
*/
|
|
|
|
class SearchController extends ActionController
|
|
|
|
{
|
|
|
|
public function indexAction()
|
|
|
|
{
|
2015-07-23 12:58:53 +02:00
|
|
|
$searchDashboard = new SearchDashboard();
|
|
|
|
$searchDashboard->setUser($this->Auth()->getUser());
|
|
|
|
$this->view->dashboard = $searchDashboard->search($this->params->get('q'));
|
2014-09-04 16:31:10 +02:00
|
|
|
|
|
|
|
// NOTE: This renders the dashboard twice. Remove this once we can catch exceptions thrown in view scripts.
|
|
|
|
$this->view->dashboard->render();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function hintAction()
|
|
|
|
{
|
2014-02-25 11:56:58 +01:00
|
|
|
}
|
|
|
|
}
|