mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
Implement searchEditorAction everywhere else
This commit is contained in:
parent
71ea557edc
commit
f630826871
11 changed files with 158 additions and 6 deletions
|
|
@ -13,9 +13,11 @@ use Icinga\Module\Icingadb\Web\Controller;
|
|||
use Icinga\Module\Icingadb\Widget\ContinueWith;
|
||||
use Icinga\Module\Icingadb\Widget\ItemList\CommentList;
|
||||
use Icinga\Module\Icingadb\Widget\ShowMore;
|
||||
use Icinga\Module\Icingadb\Widget\ViewModeSwitcher;
|
||||
use ipl\Web\Control\LimitControl;
|
||||
use ipl\Web\Control\SortControl;
|
||||
use ipl\Web\Filter\QueryString;
|
||||
use ipl\Web\Url;
|
||||
use ipl\Web\Widget\ActionLink;
|
||||
|
||||
class CommentsController extends Controller
|
||||
{
|
||||
|
|
@ -185,4 +187,16 @@ class CommentsController extends Controller
|
|||
$suggestions->forRequest(ServerRequest::fromGlobals());
|
||||
$this->getDocument()->add($suggestions);
|
||||
}
|
||||
|
||||
public function searchEditorAction()
|
||||
{
|
||||
$editor = $this->createSearchEditor(Comment::on($this->getDb()), [
|
||||
LimitControl::DEFAULT_LIMIT_PARAM,
|
||||
SortControl::DEFAULT_SORT_PARAM,
|
||||
ViewModeSwitcher::DEFAULT_VIEW_MODE_PARAM
|
||||
]);
|
||||
|
||||
$this->getDocument()->add($editor);
|
||||
$this->setTitle(t('Adjust Filter'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,9 +13,12 @@ use Icinga\Module\Icingadb\Web\Controller;
|
|||
use Icinga\Module\Icingadb\Widget\ContinueWith;
|
||||
use Icinga\Module\Icingadb\Widget\DowntimeList;
|
||||
use Icinga\Module\Icingadb\Widget\ShowMore;
|
||||
use Icinga\Module\Icingadb\Widget\ViewModeSwitcher;
|
||||
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteDowntimesCommandForm;
|
||||
use ipl\Html\HtmlDocument;
|
||||
use ipl\Html\HtmlString;
|
||||
use ipl\Web\Control\LimitControl;
|
||||
use ipl\Web\Control\SortControl;
|
||||
use ipl\Web\Filter\QueryString;
|
||||
use ipl\Web\Url;
|
||||
use ipl\Web\Widget\ActionLink;
|
||||
|
|
@ -194,4 +197,16 @@ class DowntimesController extends Controller
|
|||
$suggestions->forRequest(ServerRequest::fromGlobals());
|
||||
$this->getDocument()->add($suggestions);
|
||||
}
|
||||
|
||||
public function searchEditorAction()
|
||||
{
|
||||
$editor = $this->createSearchEditor(Downtime::on($this->getDb()), [
|
||||
LimitControl::DEFAULT_LIMIT_PARAM,
|
||||
SortControl::DEFAULT_SORT_PARAM,
|
||||
ViewModeSwitcher::DEFAULT_VIEW_MODE_PARAM
|
||||
]);
|
||||
|
||||
$this->getDocument()->add($editor);
|
||||
$this->setTitle(t('Adjust Filter'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,10 @@ use Icinga\Module\Icingadb\Web\Control\SearchBar\ObjectSuggestions;
|
|||
use Icinga\Module\Icingadb\Web\Controller;
|
||||
use Icinga\Module\Icingadb\Widget\ItemList\HistoryList;
|
||||
use Icinga\Module\Icingadb\Widget\ShowMore;
|
||||
use Icinga\Module\Icingadb\Widget\ViewModeSwitcher;
|
||||
use ipl\Sql\Sql;
|
||||
use ipl\Web\Control\LimitControl;
|
||||
use ipl\Web\Control\SortControl;
|
||||
use ipl\Web\Url;
|
||||
|
||||
class HistoryController extends Controller
|
||||
|
|
@ -121,4 +124,16 @@ class HistoryController extends Controller
|
|||
$suggestions->forRequest(ServerRequest::fromGlobals());
|
||||
$this->getDocument()->add($suggestions);
|
||||
}
|
||||
|
||||
public function searchEditorAction()
|
||||
{
|
||||
$editor = $this->createSearchEditor(History::on($this->getDb()), [
|
||||
LimitControl::DEFAULT_LIMIT_PARAM,
|
||||
SortControl::DEFAULT_SORT_PARAM,
|
||||
ViewModeSwitcher::DEFAULT_VIEW_MODE_PARAM
|
||||
]);
|
||||
|
||||
$this->getDocument()->add($editor);
|
||||
$this->setTitle(t('Adjust Filter'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ use Icinga\Module\Icingadb\Web\Control\SearchBar\ObjectSuggestions;
|
|||
use Icinga\Module\Icingadb\Web\Controller;
|
||||
use Icinga\Module\Icingadb\Widget\ItemList\HostgroupList;
|
||||
use Icinga\Module\Icingadb\Widget\ShowMore;
|
||||
use Icinga\Module\Icingadb\Widget\ViewModeSwitcher;
|
||||
use ipl\Web\Control\LimitControl;
|
||||
use ipl\Web\Control\SortControl;
|
||||
use ipl\Web\Url;
|
||||
|
||||
class HostgroupsController extends Controller
|
||||
|
|
@ -96,4 +99,16 @@ class HostgroupsController extends Controller
|
|||
$suggestions->forRequest(ServerRequest::fromGlobals());
|
||||
$this->getDocument()->add($suggestions);
|
||||
}
|
||||
|
||||
public function searchEditorAction()
|
||||
{
|
||||
$editor = $this->createSearchEditor(Hostgroupsummary::on($this->getDb()), [
|
||||
LimitControl::DEFAULT_LIMIT_PARAM,
|
||||
SortControl::DEFAULT_SORT_PARAM,
|
||||
ViewModeSwitcher::DEFAULT_VIEW_MODE_PARAM
|
||||
]);
|
||||
|
||||
$this->getDocument()->add($editor);
|
||||
$this->setTitle(t('Adjust Filter'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,10 @@ use Icinga\Module\Icingadb\Widget\Detail\ObjectsDetail;
|
|||
use Icinga\Module\Icingadb\Widget\HostList;
|
||||
use Icinga\Module\Icingadb\Widget\HostStatusBar;
|
||||
use Icinga\Module\Icingadb\Widget\ShowMore;
|
||||
use Icinga\Module\Icingadb\Widget\ViewModeSwitcher;
|
||||
use ipl\Stdlib\Filter;
|
||||
use ipl\Web\Control\LimitControl;
|
||||
use ipl\Web\Control\SortControl;
|
||||
use ipl\Web\Filter\QueryString;
|
||||
use ipl\Web\Url;
|
||||
|
||||
|
|
@ -176,6 +179,18 @@ class HostsController extends Controller
|
|||
$this->getDocument()->add($suggestions);
|
||||
}
|
||||
|
||||
public function searchEditorAction()
|
||||
{
|
||||
$editor = $this->createSearchEditor(Host::on($this->getDb()), [
|
||||
LimitControl::DEFAULT_LIMIT_PARAM,
|
||||
SortControl::DEFAULT_SORT_PARAM,
|
||||
ViewModeSwitcher::DEFAULT_VIEW_MODE_PARAM
|
||||
]);
|
||||
|
||||
$this->getDocument()->add($editor);
|
||||
$this->setTitle(t('Adjust Filter'));
|
||||
}
|
||||
|
||||
public function fetchCommandTargets()
|
||||
{
|
||||
$db = $this->getDb();
|
||||
|
|
|
|||
|
|
@ -10,7 +10,10 @@ use Icinga\Module\Icingadb\Web\Control\SearchBar\ObjectSuggestions;
|
|||
use Icinga\Module\Icingadb\Web\Controller;
|
||||
use Icinga\Module\Icingadb\Widget\ItemList\NotificationList;
|
||||
use Icinga\Module\Icingadb\Widget\ShowMore;
|
||||
use Icinga\Module\Icingadb\Widget\ViewModeSwitcher;
|
||||
use ipl\Sql\Sql;
|
||||
use ipl\Web\Control\LimitControl;
|
||||
use ipl\Web\Control\SortControl;
|
||||
use ipl\Web\Url;
|
||||
|
||||
class NotificationsController extends Controller
|
||||
|
|
@ -102,4 +105,16 @@ class NotificationsController extends Controller
|
|||
$suggestions->forRequest(ServerRequest::fromGlobals());
|
||||
$this->getDocument()->add($suggestions);
|
||||
}
|
||||
|
||||
public function searchEditorAction()
|
||||
{
|
||||
$editor = $this->createSearchEditor(NotificationHistory::on($this->getDb()), [
|
||||
LimitControl::DEFAULT_LIMIT_PARAM,
|
||||
SortControl::DEFAULT_SORT_PARAM,
|
||||
ViewModeSwitcher::DEFAULT_VIEW_MODE_PARAM
|
||||
]);
|
||||
|
||||
$this->getDocument()->add($editor);
|
||||
$this->setTitle(t('Adjust Filter'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ use Icinga\Module\Icingadb\Web\Control\SearchBar\ObjectSuggestions;
|
|||
use Icinga\Module\Icingadb\Web\Controller;
|
||||
use Icinga\Module\Icingadb\Widget\ItemList\ServicegroupList;
|
||||
use Icinga\Module\Icingadb\Widget\ShowMore;
|
||||
use Icinga\Module\Icingadb\Widget\ViewModeSwitcher;
|
||||
use ipl\Web\Control\LimitControl;
|
||||
use ipl\Web\Control\SortControl;
|
||||
use ipl\Web\Url;
|
||||
|
||||
class ServicegroupsController extends Controller
|
||||
|
|
@ -95,4 +98,16 @@ class ServicegroupsController extends Controller
|
|||
$suggestions->forRequest(ServerRequest::fromGlobals());
|
||||
$this->getDocument()->add($suggestions);
|
||||
}
|
||||
|
||||
public function searchEditorAction()
|
||||
{
|
||||
$editor = $this->createSearchEditor(ServicegroupSummary::on($this->getDb()), [
|
||||
LimitControl::DEFAULT_LIMIT_PARAM,
|
||||
SortControl::DEFAULT_SORT_PARAM,
|
||||
ViewModeSwitcher::DEFAULT_VIEW_MODE_PARAM
|
||||
]);
|
||||
|
||||
$this->getDocument()->add($editor);
|
||||
$this->setTitle(t('Adjust Filter'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,10 @@ use Icinga\Module\Icingadb\Widget\Detail\ObjectsDetail;
|
|||
use Icinga\Module\Icingadb\Widget\ServiceList;
|
||||
use Icinga\Module\Icingadb\Widget\ServiceStatusBar;
|
||||
use Icinga\Module\Icingadb\Widget\ShowMore;
|
||||
use Icinga\Module\Icingadb\Widget\ViewModeSwitcher;
|
||||
use ipl\Stdlib\Filter;
|
||||
use ipl\Web\Control\LimitControl;
|
||||
use ipl\Web\Control\SortControl;
|
||||
use ipl\Web\Filter\QueryString;
|
||||
use ipl\Web\Url;
|
||||
|
||||
|
|
@ -187,13 +190,13 @@ class ServicesController extends Controller
|
|||
|
||||
public function searchEditorAction()
|
||||
{
|
||||
$services = Service::on($this->getDb())->with([
|
||||
'state',
|
||||
'host',
|
||||
'host.state'
|
||||
$editor = $this->createSearchEditor(Service::on($this->getDb()), [
|
||||
LimitControl::DEFAULT_LIMIT_PARAM,
|
||||
SortControl::DEFAULT_SORT_PARAM,
|
||||
ViewModeSwitcher::DEFAULT_VIEW_MODE_PARAM
|
||||
]);
|
||||
|
||||
$this->getDocument()->add($this->createSearchEditor($services));
|
||||
$this->getDocument()->add($editor);
|
||||
$this->setTitle(t('Adjust Filter'));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ use Icinga\Module\Icingadb\Web\Control\SearchBar\ObjectSuggestions;
|
|||
use Icinga\Module\Icingadb\Web\Controller;
|
||||
use Icinga\Module\Icingadb\Widget\HostSummaryDonut;
|
||||
use Icinga\Module\Icingadb\Widget\ServiceSummaryDonut;
|
||||
use Icinga\Module\Icingadb\Widget\ViewModeSwitcher;
|
||||
use ipl\Web\Control\LimitControl;
|
||||
use ipl\Web\Control\SortControl;
|
||||
|
||||
class TacticalController extends Controller
|
||||
{
|
||||
|
|
@ -70,4 +73,16 @@ class TacticalController extends Controller
|
|||
$suggestions->forRequest(ServerRequest::fromGlobals());
|
||||
$this->getDocument()->add($suggestions);
|
||||
}
|
||||
|
||||
public function searchEditorAction()
|
||||
{
|
||||
$editor = $this->createSearchEditor(ServicestateSummary::on($this->getDb()), [
|
||||
LimitControl::DEFAULT_LIMIT_PARAM,
|
||||
SortControl::DEFAULT_SORT_PARAM,
|
||||
ViewModeSwitcher::DEFAULT_VIEW_MODE_PARAM
|
||||
]);
|
||||
|
||||
$this->getDocument()->add($editor);
|
||||
$this->setTitle(t('Adjust Filter'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@ use Icinga\Module\Icingadb\Model\Usergroup;
|
|||
use Icinga\Module\Icingadb\Web\Control\SearchBar\ObjectSuggestions;
|
||||
use Icinga\Module\Icingadb\Web\Controller;
|
||||
use Icinga\Module\Icingadb\Widget\ItemList\UsergroupList;
|
||||
use Icinga\Module\Icingadb\Widget\ViewModeSwitcher;
|
||||
use Icinga\Security\SecurityException;
|
||||
use ipl\Web\Control\LimitControl;
|
||||
use ipl\Web\Control\SortControl;
|
||||
|
||||
class UsergroupsController extends Controller
|
||||
{
|
||||
|
|
@ -82,4 +85,16 @@ class UsergroupsController extends Controller
|
|||
$suggestions->forRequest(ServerRequest::fromGlobals());
|
||||
$this->getDocument()->add($suggestions);
|
||||
}
|
||||
|
||||
public function searchEditorAction()
|
||||
{
|
||||
$editor = $this->createSearchEditor(Usergroup::on($this->getDb()), [
|
||||
LimitControl::DEFAULT_LIMIT_PARAM,
|
||||
SortControl::DEFAULT_SORT_PARAM,
|
||||
ViewModeSwitcher::DEFAULT_VIEW_MODE_PARAM
|
||||
]);
|
||||
|
||||
$this->getDocument()->add($editor);
|
||||
$this->setTitle(t('Adjust Filter'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@ use Icinga\Module\Icingadb\Model\User;
|
|||
use Icinga\Module\Icingadb\Web\Control\SearchBar\ObjectSuggestions;
|
||||
use Icinga\Module\Icingadb\Web\Controller;
|
||||
use Icinga\Module\Icingadb\Widget\ItemList\UserList;
|
||||
use Icinga\Module\Icingadb\Widget\ViewModeSwitcher;
|
||||
use Icinga\Security\SecurityException;
|
||||
use ipl\Web\Control\LimitControl;
|
||||
use ipl\Web\Control\SortControl;
|
||||
|
||||
class UsersController extends Controller
|
||||
{
|
||||
|
|
@ -84,4 +87,16 @@ class UsersController extends Controller
|
|||
$suggestions->forRequest(ServerRequest::fromGlobals());
|
||||
$this->getDocument()->add($suggestions);
|
||||
}
|
||||
|
||||
public function searchEditorAction()
|
||||
{
|
||||
$editor = $this->createSearchEditor(User::on($this->getDb()), [
|
||||
LimitControl::DEFAULT_LIMIT_PARAM,
|
||||
SortControl::DEFAULT_SORT_PARAM,
|
||||
ViewModeSwitcher::DEFAULT_VIEW_MODE_PARAM
|
||||
]);
|
||||
|
||||
$this->getDocument()->add($editor);
|
||||
$this->setTitle(t('Adjust Filter'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue