2014-02-25 05:56:58 -05:00
|
|
|
<?php
|
2016-02-08 09:41:00 -05:00
|
|
|
/* Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */
|
2014-02-25 05:56:58 -05:00
|
|
|
|
2015-08-27 08:05:32 -04:00
|
|
|
namespace Icinga\Controllers;
|
|
|
|
|
|
2014-02-25 05:56:58 -05:00
|
|
|
use Icinga\Web\Controller\ActionController;
|
|
|
|
|
use Icinga\Web\Widget;
|
2014-09-04 10:31:10 -04:00
|
|
|
use Icinga\Web\Widget\SearchDashboard;
|
2014-02-25 05:56:58 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Search controller
|
|
|
|
|
*/
|
|
|
|
|
class SearchController extends ActionController
|
|
|
|
|
{
|
|
|
|
|
public function indexAction()
|
|
|
|
|
{
|
2015-07-23 06:58:53 -04:00
|
|
|
$searchDashboard = new SearchDashboard();
|
|
|
|
|
$searchDashboard->setUser($this->Auth()->getUser());
|
|
|
|
|
$this->view->dashboard = $searchDashboard->search($this->params->get('q'));
|
2014-09-04 10:31:10 -04: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 05:56:58 -05:00
|
|
|
}
|
|
|
|
|
}
|