diff --git a/modules/monitoring/application/controllers/SummaryController.php b/modules/monitoring/application/controllers/SummaryController.php deleted file mode 100644 index 5f4699385..000000000 --- a/modules/monitoring/application/controllers/SummaryController.php +++ /dev/null @@ -1,94 +0,0 @@ - - * @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2 - * @author Icinga Development Team - */ -// {{{ICINGA_LICENSE_HEADER}}} -use Icinga\Web\Controller\ModuleActionController; -use Icinga\Backend; - -class Monitoring_SummaryController extends ModuleActionController -{ - protected $backend; - protected $host; - protected $service; - - public function init() - { - $this->backend = Backend::getInstance($this->_getParam('backend')); - $this->view->tabs = $this->getTabs(); - } - - protected function createTabs() - { - $tabs = $this->getTabs(); - $tabs->add('hostgroup', array( - 'title' => 'Hostgroups', - 'url' => 'monitoring/summary/group', - 'urlParams' => array('by' => 'hostgroup'), - )); - $tabs->add('servicegroup', array( - 'title' => 'Servicegroups', - 'url' => 'monitoring/summary/group', - 'urlParams' => array('by' => 'servicegroup'), - )); - $tabs->activate($this->_getParam('by', 'hostgroup')); - return $tabs; - } - - public function historyAction() - { - $this->_helper->viewRenderer('history'); - } - - public function groupAction() - { - if ($this->_getParam('by') === 'servicegroup') { - $view = 'servicegroupsummary'; - } else { - $view = 'hostgroupsummary'; - } - if (! $this->backend->hasView($view)) { - $this->view->backend = $this->backend; - $this->view->view_name = $view; - $this->_helper->viewRenderer('backend-is-missing'); - return; - } - - $this->view->preserve = array( - 'problems' => $this->_getParam('problems') ? 'true' : 'false', - 'search' => $this->_getParam('search') - ); - $query = $this->backend->select()->from($view); - $query->where('problems', $this->_getParam('problems') ? 'true' : 'false'); - //$query->where('ss.current_state > 0'); - $query->where('search', $this->_getParam('search')); - - // echo '
' . $query->dump() . '
'; exit; - $this->view->summary = $query->paginate(); - - } -} -// @codingStandardsIgnoreEnd diff --git a/modules/monitoring/application/views/scripts/summary/group.phtml b/modules/monitoring/application/views/scripts/summary/group.phtml deleted file mode 100644 index 8c9547dc5..000000000 --- a/modules/monitoring/application/views/scripts/summary/group.phtml +++ /dev/null @@ -1,167 +0,0 @@ -compact): ?> -tabs ?> - -summary)): ?> -There are no such services right now - - -compact && $this->summary instanceof \Zend_Paginator): ?> -paginationControl($this->summary, null, null, array('preserve' => $this->preserve)); ?> - - - - - - - - - - compact): ?> - - - -summary as $row): ?> -critical > 0) { - $class_critical = 'critical'; - $html_critical = $row->critical; - if ($row->critical_ack + $row->critical_dt > 0) { - $html_critical = sprintf( - '%s (%s/%s)', - $row->critical, - $row->critical_ack, - $row->critical_dt - ); - } - if ($name_class === null) $name_class = 'critical'; -} elseif ($row->critical_dt + $row->critical_ack > 0) { - $class_critical = 'critical handled'; - $html_critical = sprintf( - '%s / %s', - $row->critical_ack, - $row->critical_dt - ); - if ($name_class === null) $name_class = 'critical handled'; -} - -if ($row->unknown > 0) { - $class_unknown = 'unknown'; - $html_unknown = $row->unknown; - if ($row->unknown_ack + $row->unknown_dt > 0) { - $html_unknown .= sprintf( - ' (%s/%s)', - $row->unknown, - $row->unknown_ack, - $row->unknown_dt - ); - } - if ($name_class === null) $name_class = 'unknown'; -} elseif ($row->unknown_dt + $row->unknown_ack > 0) { - $class_unknown = 'unknown handled'; - $html_unknown = sprintf( - '%s / %s', - $row->unknown_ack, - $row->unknown_dt - ); - if ($name_class === null) $name_class = 'unknown handled'; -} - -if ($row->warning > 0) { - $class_warning = 'warning'; - $html_warning = $row->warning; - if ($row->warning_ack + $row->warning_dt > 0) { - $html_warning .= sprintf( - ' (%s/%s)', - $row->warning, - $row->warning_ack, - $row->warning_dt - ); - } - if ($name_class === null) $name_class = 'warning'; -} elseif ($row->warning_dt + $row->warning_ack > 0) { - $class_warning = 'warning handled'; - $html_warning = sprintf( - '%s / %s', - $row->warning_ack, - $row->warning_dt - ); - if ($name_class === null) $name_class = 'warning handled'; -} - - -if ($row->ok > 0) { - $class_ok = 'ok'; - if (isset($row->hostgroup_name)) { - $html_ok = $this->qlink($row->ok, 'monitoring/list/services', array( - 'hostgroups' => $row->hostgroup_name - )); - } else { - $html_ok = $this->qlink($row->ok, 'monitoring/list/services', array( - 'servicegroups' => $row->servicegroup_name - )); - } - if ($name_class === null) $name_class = 'ok'; -} - - -if (isset($row->hostgroup_name)) { - if ($name_class === 'ok') { - $name_html = $this->qlink($row->hostgroup_name, 'monitoring/list/services', array( - 'hostgroups' => $row->hostgroup_name - )); - } else { - $name_html = $this->qlink($row->hostgroup_name, 'monitoring/list/services', array( - 'hostgroups' => $row->hostgroup_name, - 'problems' => '1', - 'sort' => 'severity' - )); - } -} else { - if ($name_class === 'ok') { - $name_html = $this->qlink($row->servicegroup_name, 'monitoring/list/services', array( - 'servicegroups' => $row->servicegroup_name - )); - } else { - $name_html = $this->qlink($row->servicegroup_name, 'monitoring/list/services', array( - 'servicegroups' => $row->servicegroup_name, - 'problems' => '1', - 'sort' => 'severity' - )); - } - -} -?> - - - - - - - compact): ?> - - - -
 CriticalUnknownWarningOK
- -compact): ?>more