Nav: Remove tabs from ListController since their links are redundant to the main menu
refs #4583
This commit is contained in:
parent
23aa1830a5
commit
207c47ae64
|
@ -26,14 +26,15 @@
|
||||||
* @author Icinga Development Team <info@icinga.org>
|
* @author Icinga Development Team <info@icinga.org>
|
||||||
*/
|
*/
|
||||||
// {{{ICINGA_LICENSE_HEADER}}}
|
// {{{ICINGA_LICENSE_HEADER}}}
|
||||||
use Icinga\Web\Controller\ModuleActionController;
|
|
||||||
use Icinga\Web\Hook;
|
use \Icinga\Web\Controller\ModuleActionController;
|
||||||
use Icinga\File\Csv;
|
use \Icinga\Web\Hook;
|
||||||
use Monitoring\Backend;
|
use \Icinga\File\Csv;
|
||||||
use Icinga\Application\Benchmark;
|
use \Monitoring\Backend;
|
||||||
use Icinga\Web\Widget\Tabextension\OutputFormat;
|
use \Icinga\Application\Benchmark;
|
||||||
use Icinga\Web\Widget\Tabextension\DashboardAction;
|
use \Icinga\Web\Widget\Tabextension\OutputFormat;
|
||||||
use Icinga\Web\Widget\Tabextension\BasketAction;
|
use \Icinga\Web\Widget\Tabextension\DashboardAction;
|
||||||
|
use \Icinga\Web\Widget\Tabextension\BasketAction;
|
||||||
|
|
||||||
class Monitoring_ListController extends ModuleActionController
|
class Monitoring_ListController extends ModuleActionController
|
||||||
{
|
{
|
||||||
|
@ -101,8 +102,7 @@ class Monitoring_ListController extends ModuleActionController
|
||||||
*/
|
*/
|
||||||
public function servicesAction()
|
public function servicesAction()
|
||||||
{
|
{
|
||||||
$state_type = $this->_getParam('_statetype', 'soft');
|
if ($this->_getParam('_statetype', 'soft') === 'soft') {
|
||||||
if ($state_type = 'soft') {
|
|
||||||
$state_column = 'service_state';
|
$state_column = 'service_state';
|
||||||
$state_change_column = 'service_last_state_change';
|
$state_change_column = 'service_last_state_change';
|
||||||
} else {
|
} else {
|
||||||
|
@ -111,7 +111,6 @@ class Monitoring_ListController extends ModuleActionController
|
||||||
}
|
}
|
||||||
$this->compactView = "services-compact";
|
$this->compactView = "services-compact";
|
||||||
|
|
||||||
|
|
||||||
$this->view->services = $this->query('status', array(
|
$this->view->services = $this->query('status', array(
|
||||||
'host_name',
|
'host_name',
|
||||||
'host_state',
|
'host_state',
|
||||||
|
@ -172,8 +171,6 @@ class Monitoring_ListController extends ModuleActionController
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display contactgroups overview
|
* Display contactgroups overview
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public function contactgroupsAction()
|
public function contactgroupsAction()
|
||||||
{
|
{
|
||||||
|
@ -185,8 +182,7 @@ class Monitoring_ListController extends ModuleActionController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the current downtimes and put them into the view
|
* Fetch the current downtimes and put them into the view property `downtimes`
|
||||||
* property 'downtimes'
|
|
||||||
*/
|
*/
|
||||||
public function downtimesAction()
|
public function downtimesAction()
|
||||||
{
|
{
|
||||||
|
@ -239,6 +235,14 @@ class Monitoring_ListController extends ModuleActionController
|
||||||
$this->inheritCurrentSortColumn();
|
$this->inheritCurrentSortColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create query
|
||||||
|
*
|
||||||
|
* @param $view
|
||||||
|
* @param $columns
|
||||||
|
*
|
||||||
|
* @return \Icinga\Data\Db\Query
|
||||||
|
*/
|
||||||
protected function query($view, $columns)
|
protected function query($view, $columns)
|
||||||
{
|
{
|
||||||
$extra = preg_split(
|
$extra = preg_split(
|
||||||
|
@ -299,56 +303,10 @@ class Monitoring_ListController extends ModuleActionController
|
||||||
$tabs->extend(new OutputFormat())
|
$tabs->extend(new OutputFormat())
|
||||||
->extend(new DashboardAction())
|
->extend(new DashboardAction())
|
||||||
->extend(new BasketAction());
|
->extend(new BasketAction());
|
||||||
|
|
||||||
$tabs->add('services', array(
|
|
||||||
'title' => 'All services',
|
|
||||||
'icon' => 'img/classic/service.png',
|
|
||||||
'url' => 'monitoring/list/services',
|
|
||||||
));
|
|
||||||
$tabs->add('hosts', array(
|
|
||||||
'title' => 'All hosts',
|
|
||||||
'icon' => 'img/classic/server.png',
|
|
||||||
'url' => 'monitoring/list/hosts',
|
|
||||||
));
|
|
||||||
$tabs->add('downtimes', array(
|
|
||||||
'title' => 'Downtimes',
|
|
||||||
'usePost' => true,
|
|
||||||
'icon' => 'img/classic/downtime.gif',
|
|
||||||
'url' => 'monitoring/list/downtimes',
|
|
||||||
));
|
|
||||||
$tabs->add('notifications', array(
|
|
||||||
'title' => 'Notifications',
|
|
||||||
'icon' => 'img/classic/alarm-clock.png',
|
|
||||||
'url' => 'monitoring/list/notifications'
|
|
||||||
));
|
|
||||||
/*
|
|
||||||
$tabs->add('hostgroups', array(
|
|
||||||
'title' => 'Hostgroups',
|
|
||||||
'icon' => 'img/classic/servers-network.png',
|
|
||||||
'url' => 'monitoring/list/hostgroups',
|
|
||||||
));
|
|
||||||
$tabs->add('servicegroups', array(
|
|
||||||
'title' => 'Servicegroups',
|
|
||||||
'icon' => 'img/classic/servers-network.png',
|
|
||||||
'url' => 'monitoring/list/servicegroups',
|
|
||||||
));
|
|
||||||
$tabs->add('contacts', array(
|
|
||||||
'title' => 'Contacts',
|
|
||||||
'icon' => 'img/classic/servers-network.png',
|
|
||||||
'url' => 'monitoring/list/contacts',
|
|
||||||
));
|
|
||||||
$tabs->add('contactgroups', array(
|
|
||||||
'title' => 'Contactgroups',
|
|
||||||
'icon' => 'img/classic/servers-network.png',
|
|
||||||
'url' => 'monitoring/list/contactgroups',
|
|
||||||
));
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Let the current response inherit the used sort column by applying it to the
|
* Let the current response inherit the used sort column by applying it to the view property `sort`
|
||||||
* view property 'sort'
|
|
||||||
*/
|
*/
|
||||||
private function inheritCurrentSortColumn()
|
private function inheritCurrentSortColumn()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue