diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index e53f29417..9e8a085cd 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -510,7 +510,7 @@ class ListController extends Controller 'services_total' => $this->translate('Total Services') ), $hostGroups); - $this->view->hostgroups = $hostGroups; + $this->view->hostGroups = $hostGroups; } public function eventhistoryAction() diff --git a/modules/monitoring/application/views/scripts/list/hostgroups.phtml b/modules/monitoring/application/views/scripts/list/hostgroups.phtml index 848e2cd98..2fbd9d4c5 100644 --- a/modules/monitoring/application/views/scripts/list/hostgroups.phtml +++ b/modules/monitoring/application/views/scripts/list/hostgroups.phtml @@ -6,273 +6,275 @@ if (! $this->compact): ?> tabs ?> paginator ?>
- sortBox ?> limiter ?> + sortBox ?>
filterEditor ?>
-hasResult()): ?> +hasResult()): ?>

translate('No host groups found matching the filter.') ?>

- - - - - - - - - - - -peekAhead($this->compact) as $hostgroup): ?> - - - - - - + + + +
translate('Host Group') ?>translate('Host States') ?>translate('Service States') ?>
- hosts_total ?> - - qlink( - $hostgroup->hostgroup_alias, - 'monitoring/list/hosts', - array('hostgroup_name' => $hostgroup->hostgroup_name), - array('title' => sprintf( - $this->translate('List all hosts in the group "%s"'), - $hostgroup->hostgroup_alias - )) - ) ?> - - setUrl('monitoring/list/hosts') - ->setBaseFilter($this->filterEditor->getFilter()) - ->add( - StateBadges::STATE_UP, - $hostgroup->hosts_up, - array( - 'host_state' => 0, - 'hostgroup_name' => $hostgroup->hostgroup_name, - 'sort' => 'host_severity' - ), - 'List %u host that is currently in state UP in the host group "%s"', - 'List %u hosts which are currently in state UP in the host group "%s"', - array($hostgroup->hosts_up, $hostgroup->hostgroup_alias) - ) - ->add( - StateBadges::STATE_DOWN, - $hostgroup->hosts_down_unhandled, - array( - 'host_state' => 1, - 'host_acknowledged' => 0, - 'host_in_downtime' => 0, - 'hostgroup_name' => $hostgroup->hostgroup_name, - 'sort' => 'host_severity' - ), - 'List %u host that is currently in state DOWN in the host group "%s"', - 'List %u hosts which are currently in state DOWN in the host group "%s"', - array($hostgroup->hosts_down_unhandled, $hostgroup->hostgroup_alias) - ) - ->add( - StateBadges::STATE_DOWN_HANDLED, - $hostgroup->hosts_down_handled, - array( - 'host_state' => 1, - 'host_handled' => 1, - 'hostgroup_name' => $hostgroup->hostgroup_name, - 'sort' => 'host_severity' - ), - 'List %u host that is currently in state DOWN (Acknowledged) in the host group "%s"', - 'List %u hosts which are currently in state DOWN (Acknowledged) in the host group "%s"', - array($hostgroup->hosts_down_handled, $hostgroup->hostgroup_alias) - ) - ->add( - StateBadges::STATE_UNREACHABLE, - $hostgroup->hosts_unreachable_unhandled, - array( - 'host_state' => 2, - 'host_acknowledged' => 0, - 'host_in_downtime' => 0, - 'hostgroup_name' => $hostgroup->hostgroup_name, - 'sort' => 'host_severity' - ), - 'List %u host that is currently in state UNREACHABLE in the host group "%s"', - 'List %u hosts which are currently in state UNREACHABLE in the host group "%s"', - array($hostgroup->hosts_unreachable_unhandled, $hostgroup->hostgroup_alias) - ) - ->add( - StateBadges::STATE_UNREACHABLE_HANDLED, - $hostgroup->hosts_unreachable_handled, - array( - 'host_state' => 2, - 'host_handled' => 1, - 'hostgroup_name' => $hostgroup->hostgroup_name, - 'sort' => 'host_severity' - ), - 'List %u host that is currently in state UNREACHABLE (Acknowledged) in the host group "%s"', - 'List %u hosts which are currently in state UNREACHABLE (Acknowledged) in the host group "%s"', - array($hostgroup->hosts_unreachable_handled, $hostgroup->hostgroup_alias) - ) - ->add( - StateBadges::STATE_PENDING, - $hostgroup->hosts_pending, - array( - 'host_state' => 99, - 'hostgroup_name' => $hostgroup->hostgroup_name, - 'sort' => 'host_severity' - ), - 'List %u host that is currently in state PENDING in the host group "%s"', - 'List %u hosts which are currently in state PENDING in the host group "%s"', - array($hostgroup->hosts_pending, $hostgroup->hostgroup_alias) - ); - echo $stateBadges->render(); - ?> - - qlink( - $hostgroup->services_total, - 'monitoring/list/services', - array('hostgroup_name' => $hostgroup->hostgroup_name), - array('title' => sprintf( - $this->translate('List all services of all hosts in host group "%s"'), - $hostgroup->hostgroup_alias - ), 'class' => 'badge') - ) ?> - - setUrl('monitoring/list/services') - ->add( - StateBadges::STATE_OK, - $hostgroup->services_ok, - array( - 'service_state' => 0, - 'hostgroup_name' => $hostgroup->hostgroup_name, - 'sort' => 'service_severity' - ), - 'List %u service that is currently in state OK on hosts in the host group "%s"', - 'List %u services which are currently in state OK on hosts in the host group "%s"', - array($hostgroup->services_ok, $hostgroup->hostgroup_alias) - ) - ->add( - StateBadges::STATE_CRITICAL, - $hostgroup->services_critical_unhandled, - array( - 'service_state' => 2, - 'service_acknowledged' => 0, - 'service_in_downtime' => 0, - 'host_problem' => 0, - 'hostgroup_name' => $hostgroup->hostgroup_name, - 'sort' => 'service_severity' - ), - 'List %u service that is currently in state CRITICAL on hosts in the host group "%s"', - 'List %u services which are currently in state CRITICAL on hosts in the host group "%s"', - array($hostgroup->services_critical_unhandled, $hostgroup->hostgroup_alias) - ) - ->add( - StateBadges::STATE_CRITICAL_HANDLED, - $hostgroup->services_critical_handled, - array( - 'service_state' => 2, - 'service_handled' => 1, - 'hostgroup_name' => $hostgroup->hostgroup_name, - 'sort' => 'service_severity' - ), - 'List %u service that is currently in state CRITICAL (Acknowledged) on hosts in the host group "%s"', - 'List %u services which are currently in state CRITICAL (Acknowledged) on hosts in the host group "%s"', - array($hostgroup->services_critical_unhandled, $hostgroup->hostgroup_alias) - ) - ->add( - StateBadges::STATE_UNKNOWN, - $hostgroup->services_unknown_unhandled, - array( - 'service_state' => 3, - 'service_acknowledged' => 0, - 'service_in_downtime' => 0, - 'host_problem' => 0, - 'hostgroup_name' => $hostgroup->hostgroup_name, - 'sort' => 'service_severity' - ), - 'List %u service that is currently in state UNKNOWN on hosts in the host group "%s"', - 'List %u services which are currently in state UNKNOWN on hosts in the host group "%s"', - array($hostgroup->services_unknown_unhandled, $hostgroup->hostgroup_alias) - ) - ->add( - StateBadges::STATE_UNKNOWN_HANDLED, - $hostgroup->services_unknown_handled, - array( - 'service_state' => 3, - 'service_handled' => 1, - 'hostgroup_name' => $hostgroup->hostgroup_name, - 'sort' => 'service_severity' - ), - 'List %u service that is currently in state UNKNOWN (Acknowledged) on hosts in the host group "%s"', - 'List %u services which are currently in state UNKNOWN (Acknowledged) on hosts in the host group "%s"', - array($hostgroup->services_unknown_handled, $hostgroup->hostgroup_alias) + + + + + + + + + + + + peekAhead($this->compact) as $hostGroup): ?> + + + + + + - - - -
translate('Host Group') ?>translate('Host States') ?>translate('Service States') ?>
+ hosts_total ?> + + qlink( + $hostGroup->hostgroup_alias, + 'monitoring/list/hosts', + array('hostgroup_name' => $hostGroup->hostgroup_name), + array('title' => sprintf( + $this->translate('List all hosts in the group "%s"'), + $hostGroup->hostgroup_alias + )) + ) ?> + + setUrl('monitoring/list/hosts') + ->setBaseFilter($this->filterEditor->getFilter()) + ->add( + StateBadges::STATE_UP, + $hostGroup->hosts_up, + array( + 'host_state' => 0, + 'hostgroup_name' => $hostGroup->hostgroup_name, + 'sort' => 'host_severity' + ), + 'List %u host that is currently in state UP in the host group "%s"', + 'List %u hosts which are currently in state UP in the host group "%s"', + array($hostGroup->hosts_up, $hostGroup->hostgroup_alias) + ) + ->add( + StateBadges::STATE_DOWN, + $hostGroup->hosts_down_unhandled, + array( + 'host_state' => 1, + 'host_acknowledged' => 0, + 'host_in_downtime' => 0, + 'hostgroup_name' => $hostGroup->hostgroup_name, + 'sort' => 'host_severity' + ), + 'List %u host that is currently in state DOWN in the host group "%s"', + 'List %u hosts which are currently in state DOWN in the host group "%s"', + array($hostGroup->hosts_down_unhandled, $hostGroup->hostgroup_alias) + ) + ->add( + StateBadges::STATE_DOWN_HANDLED, + $hostGroup->hosts_down_handled, + array( + 'host_state' => 1, + 'host_handled' => 1, + 'hostgroup_name' => $hostGroup->hostgroup_name, + 'sort' => 'host_severity' + ), + 'List %u host that is currently in state DOWN (Acknowledged) in the host group "%s"', + 'List %u hosts which are currently in state DOWN (Acknowledged) in the host group "%s"', + array($hostGroup->hosts_down_handled, $hostGroup->hostgroup_alias) + ) + ->add( + StateBadges::STATE_UNREACHABLE, + $hostGroup->hosts_unreachable_unhandled, + array( + 'host_state' => 2, + 'host_acknowledged' => 0, + 'host_in_downtime' => 0, + 'hostgroup_name' => $hostGroup->hostgroup_name, + 'sort' => 'host_severity' + ), + 'List %u host that is currently in state UNREACHABLE in the host group "%s"', + 'List %u hosts which are currently in state UNREACHABLE in the host group "%s"', + array($hostGroup->hosts_unreachable_unhandled, $hostGroup->hostgroup_alias) + ) + ->add( + StateBadges::STATE_UNREACHABLE_HANDLED, + $hostGroup->hosts_unreachable_handled, + array( + 'host_state' => 2, + 'host_handled' => 1, + 'hostgroup_name' => $hostGroup->hostgroup_name, + 'sort' => 'host_severity' + ), + 'List %u host that is currently in state UNREACHABLE (Acknowledged) in the host group "%s"', + 'List %u hosts which are currently in state UNREACHABLE (Acknowledged) in the host group "%s"', + array($hostGroup->hosts_unreachable_handled, $hostGroup->hostgroup_alias) + ) + ->add( + StateBadges::STATE_PENDING, + $hostGroup->hosts_pending, + array( + 'host_state' => 99, + 'hostgroup_name' => $hostGroup->hostgroup_name, + 'sort' => 'host_severity' + ), + 'List %u host that is currently in state PENDING in the host group "%s"', + 'List %u hosts which are currently in state PENDING in the host group "%s"', + array($hostGroup->hosts_pending, $hostGroup->hostgroup_alias) + ); + echo $stateBadges->render(); + ?> + + qlink( + $hostGroup->services_total, + 'monitoring/list/services', + array('hostgroup_name' => $hostGroup->hostgroup_name), + array('title' => sprintf( + $this->translate('List all services of all hosts in host group "%s"'), + $hostGroup->hostgroup_alias + ), 'class' => 'badge') + ) ?> + + setUrl('monitoring/list/services') + ->add( + StateBadges::STATE_OK, + $hostGroup->services_ok, + array( + 'service_state' => 0, + 'hostgroup_name' => $hostGroup->hostgroup_name, + 'sort' => 'service_severity' + ), + 'List %u service that is currently in state OK on hosts in the host group "%s"', + 'List %u services which are currently in state OK on hosts in the host group "%s"', + array($hostGroup->services_ok, $hostGroup->hostgroup_alias) + ) + ->add( + StateBadges::STATE_CRITICAL, + $hostGroup->services_critical_unhandled, + array( + 'service_state' => 2, + 'service_acknowledged' => 0, + 'service_in_downtime' => 0, + 'host_problem' => 0, + 'hostgroup_name' => $hostGroup->hostgroup_name, + 'sort' => 'service_severity' + ), + 'List %u service that is currently in state CRITICAL on hosts in the host group "%s"', + 'List %u services which are currently in state CRITICAL on hosts in the host group "%s"', + array($hostGroup->services_critical_unhandled, $hostGroup->hostgroup_alias) + ) + ->add( + StateBadges::STATE_CRITICAL_HANDLED, + $hostGroup->services_critical_handled, + array( + 'service_state' => 2, + 'service_handled' => 1, + 'hostgroup_name' => $hostGroup->hostgroup_name, + 'sort' => 'service_severity' + ), + 'List %u service that is currently in state CRITICAL (Acknowledged) on hosts in the host group "%s"', + 'List %u services which are currently in state CRITICAL (Acknowledged) on hosts in the host group "%s"', + array($hostGroup->services_critical_unhandled, $hostGroup->hostgroup_alias) + ) + ->add( + StateBadges::STATE_UNKNOWN, + $hostGroup->services_unknown_unhandled, + array( + 'service_state' => 3, + 'service_acknowledged' => 0, + 'service_in_downtime' => 0, + 'host_problem' => 0, + 'hostgroup_name' => $hostGroup->hostgroup_name, + 'sort' => 'service_severity' + ), + 'List %u service that is currently in state UNKNOWN on hosts in the host group "%s"', + 'List %u services which are currently in state UNKNOWN on hosts in the host group "%s"', + array($hostGroup->services_unknown_unhandled, $hostGroup->hostgroup_alias) + ) + ->add( + StateBadges::STATE_UNKNOWN_HANDLED, + $hostGroup->services_unknown_handled, + array( + 'service_state' => 3, + 'service_handled' => 1, + 'hostgroup_name' => $hostGroup->hostgroup_name, + 'sort' => 'service_severity' + ), + 'List %u service that is currently in state UNKNOWN (Acknowledged) on hosts in the host group "%s"', + 'List %u services which are currently in state UNKNOWN (Acknowledged) on hosts in the host group "%s"', + array($hostGroup->services_unknown_handled, $hostGroup->hostgroup_alias) - ) - ->add( - StateBadges::STATE_WARNING, - $hostgroup->services_warning_unhandled, - array( - 'service_state' => 1, - 'service_acknowledged' => 0, - 'service_in_downtime' => 0, - 'host_problem' => 0, - 'hostgroup_name' => $hostgroup->hostgroup_name, - 'sort' => 'service_severity' - ), - 'List %u service that is currently in state WARNING on hosts in the host group "%s"', - 'List %u services which are currently in state WARNING on hosts in the host group "%s"', - array($hostgroup->services_warning_unhandled, $hostgroup->hostgroup_alias) - ) - ->add( - StateBadges::STATE_WARNING_HANDLED, - $hostgroup->services_warning_handled, - array( - 'service_state' => 1, - 'service_handled' => 1, - 'hostgroup_name' => $hostgroup->hostgroup_name, - 'sort' => 'service_severity' - ), - 'List %u service that is currently in state WARNING (Acknowledged) on hosts in the host group "%s"', - 'List %u services which are currently in state WARNING (Acknowledged) on hosts in the host group "%s"', - array($hostgroup->services_warning_handled, $hostgroup->hostgroup_alias) - ) - ->add( - StateBadges::STATE_PENDING, - $hostgroup->services_pending, - array( - 'service_state' => 99, - 'hostgroup_name' => $hostgroup->hostgroup_name, - 'sort' => 'service_severity' - ), - 'List %u service that is currently in state PENDING on hosts in the host group "%s"', - 'List %u services which are currently in state PENDING on hosts in the host group "%s"', - array($hostgroup->services_pending, $hostgroup->hostgroup_alias) - ); - echo $stateBadges->render(); - ?> -
-hasMore()): ?> -qlink( - $this->translate('Show More'), - $this->url()->without(array('view', 'limit')), - null, - array( - 'data-base-target' => '_next', - 'class' => 'pull-right action-link' - ) -) ?> + ) + ->add( + StateBadges::STATE_WARNING, + $hostGroup->services_warning_unhandled, + array( + 'service_state' => 1, + 'service_acknowledged' => 0, + 'service_in_downtime' => 0, + 'host_problem' => 0, + 'hostgroup_name' => $hostGroup->hostgroup_name, + 'sort' => 'service_severity' + ), + 'List %u service that is currently in state WARNING on hosts in the host group "%s"', + 'List %u services which are currently in state WARNING on hosts in the host group "%s"', + array($hostGroup->services_warning_unhandled, $hostGroup->hostgroup_alias) + ) + ->add( + StateBadges::STATE_WARNING_HANDLED, + $hostGroup->services_warning_handled, + array( + 'service_state' => 1, + 'service_handled' => 1, + 'hostgroup_name' => $hostGroup->hostgroup_name, + 'sort' => 'service_severity' + ), + 'List %u service that is currently in state WARNING (Acknowledged) on hosts in the host group "%s"', + 'List %u services which are currently in state WARNING (Acknowledged) on hosts in the host group "%s"', + array($hostGroup->services_warning_handled, $hostGroup->hostgroup_alias) + ) + ->add( + StateBadges::STATE_PENDING, + $hostGroup->services_pending, + array( + 'service_state' => 99, + 'hostgroup_name' => $hostGroup->hostgroup_name, + 'sort' => 'service_severity' + ), + 'List %u service that is currently in state PENDING on hosts in the host group "%s"', + 'List %u services which are currently in state PENDING on hosts in the host group "%s"', + array($hostGroup->services_pending, $hostGroup->hostgroup_alias) + ); + echo $stateBadges->render(); + ?> +
+hasMore()): ?> +