diff --git a/modules/monitoring/application/views/scripts/list/hostgroups.phtml b/modules/monitoring/application/views/scripts/list/hostgroups.phtml index 4663d9d4d..93eeecdb3 100644 --- a/modules/monitoring/application/views/scripts/list/hostgroups.phtml +++ b/modules/monitoring/application/views/scripts/list/hostgroups.phtml @@ -14,7 +14,7 @@ if (! $this->compact): ?> +foreach ($hostgroups as $hostgroup): ?> @@ -30,34 +30,34 @@ foreach ($hostgroups as $h): ?> hosts_down_unhandled) { +if ($hostgroup->hosts_down_unhandled) { $handled = false; $state = Host::STATE_DOWN; - $lastStateChange = $h->hosts_down_last_state_change_unhandled; -} elseif ($h->hosts_unreachable_unhandled) { + $lastStateChange = $hostgroup->hosts_down_last_state_change_unhandled; +} elseif ($hostgroup->hosts_unreachable_unhandled) { $handled = false; $state = Host::STATE_UNREACHABLE; - $lastStateChange = $h->hosts_unreachable_last_state_change_unhandled; + $lastStateChange = $hostgroup->hosts_unreachable_last_state_change_unhandled; } else { $handled = true; - if ($h->hosts_down_handled) { + if ($hostgroup->hosts_down_handled) { $state = Host::STATE_DOWN; - $lastStateChange = $h->hosts_down_last_state_change_handled; - } elseif ($h->hosts_unreachable_handled) { + $lastStateChange = $hostgroup->hosts_down_last_state_change_handled; + } elseif ($hostgroup->hosts_unreachable_handled) { $state = Host::STATE_UNREACHABLE; - $lastStateChange = $h->hosts_unreachable_last_state_change_handled; - } elseif ($h->hosts_up) { + $lastStateChange = $hostgroup->hosts_unreachable_last_state_change_handled; + } elseif ($hostgroup->hosts_up) { $state = Host::STATE_UP; - $lastStateChange = $h->hosts_up_last_state_change; + $lastStateChange = $hostgroup->hosts_up_last_state_change; } else { $state = Host::STATE_PENDING; - $lastStateChange = $h->hosts_pending_last_state_change; + $lastStateChange = $hostgroup->hosts_pending_last_state_change; } } ?>
@@ -66,32 +66,32 @@ if ($h->hosts_down_unhandled) { qlink( - $h->hostgroup_alias, + $hostgroup->hostgroup_alias, 'monitoring/list/hosts', - array('hostgroup_name' => $h->hostgroup_name), - array('title' => sprintf($this->translate('List all hosts in the group "%s"'), $h->hostgroup_alias)) + array('hostgroup_name' => $hostgroup->hostgroup_name), + array('title' => sprintf($this->translate('List all hosts in the group "%s"'), $hostgroup->hostgroup_alias)) ) ?> qlink( - $h->hosts_total, + $hostgroup->hosts_total, 'monitoring/list/hosts', - array('hostgroup_name' => $h->hostgroup_name), + array('hostgroup_name' => $hostgroup->hostgroup_name), array('title' => sprintf( $this->translate('List all hosts in host group "%s"'), - $h->hostgroup_alias + $hostgroup->hostgroup_alias )) ) ?> - hosts_up): ?> + hosts_up): ?> qlink( - $h->hosts_up, + $hostgroup->hosts_up, 'monitoring/list/hosts', array( 'host_state' => 0, - 'hostgroup_name' => $h->hostgroup_name, + 'hostgroup_name' => $hostgroup->hostgroup_name, 'sort' => 'host_severity' ), array( @@ -99,25 +99,25 @@ if ($h->hosts_down_unhandled) { $this->translatePlural( '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"', - $h->hosts_up + $hostgroup->hosts_up ), - $h->hosts_up, - $h->hostgroup_alias + $hostgroup->hosts_up, + $hostgroup->hostgroup_alias ) ) ) ?> - hosts_down_unhandled): ?> + hosts_down_unhandled): ?> qlink( - $h->hosts_down_unhandled, + $hostgroup->hosts_down_unhandled, 'monitoring/list/hosts', array( 'host_state' => 1, 'host_acknowledged' => 0, 'host_in_downtime' => 0, - 'hostgroup_name' => $h->hostgroup_name, + 'hostgroup_name' => $hostgroup->hostgroup_name, 'sort' => 'host_severity' ), array( @@ -125,23 +125,23 @@ if ($h->hosts_down_unhandled) { $this->translatePlural( '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"', - $h->hosts_down_unhandled + $hostgroup->hosts_down_unhandled ), - $h->hosts_down_unhandled, - $h->hostgroup_alias + $hostgroup->hosts_down_unhandled, + $hostgroup->hostgroup_alias ) ) ) ?> - hosts_down_handled): ?> + hosts_down_handled): ?> qlink( - $h->hosts_down_handled, + $hostgroup->hosts_down_handled, 'monitoring/list/hosts', array( 'host_state' => 1, 'host_handled' => 1, - 'hostgroup_name' => $h->hostgroup_name, + 'hostgroup_name' => $hostgroup->hostgroup_name, 'sort' => 'host_severity' ), array( @@ -149,28 +149,28 @@ if ($h->hosts_down_unhandled) { $this->translatePlural( '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"', - $h->hosts_down_handled + $hostgroup->hosts_down_handled ), - $h->hosts_down_handled, - $h->hostgroup_alias + $hostgroup->hosts_down_handled, + $hostgroup->hostgroup_alias ) ) ) ?> - hosts_down_unhandled): ?> + hosts_down_unhandled): ?> - hosts_unreachable_unhandled): ?> + hosts_unreachable_unhandled): ?> qlink( - $h->hosts_unreachable_unhandled, + $hostgroup->hosts_unreachable_unhandled, 'monitoring/list/hosts', array( 'host_state' => 2, 'host_acknowledged' => 0, 'host_in_downtime' => 0, - 'hostgroup_name' => $h->hostgroup_name, + 'hostgroup_name' => $hostgroup->hostgroup_name, 'sort' => 'host_severity' ), array( @@ -178,23 +178,23 @@ if ($h->hosts_down_unhandled) { $this->translatePlural( '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"', - $h->hosts_unreachable_unhandled + $hostgroup->hosts_unreachable_unhandled ), - $h->hosts_unreachable_unhandled, - $h->hostgroup_alias + $hostgroup->hosts_unreachable_unhandled, + $hostgroup->hostgroup_alias ) ) ) ?> - hosts_unreachable_handled): ?> + hosts_unreachable_handled): ?> qlink( - $h->hosts_unreachable_handled, + $hostgroup->hosts_unreachable_handled, 'monitoring/list/hosts', array( 'host_state' => 2, 'host_handled' => 1, - 'hostgroup_name' => $h->hostgroup_name, + 'hostgroup_name' => $hostgroup->hostgroup_name, 'sort' => 'host_severity' ), array( @@ -202,26 +202,26 @@ if ($h->hosts_down_unhandled) { $this->translatePlural( '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"', - $h->hosts_unreachable_handled + $hostgroup->hosts_unreachable_handled ), - $h->hosts_unreachable_handled, - $h->hostgroup_alias + $hostgroup->hosts_unreachable_handled, + $hostgroup->hostgroup_alias ) ) ) ?> - hosts_unreachable_unhandled): ?> + hosts_unreachable_unhandled): ?> - hosts_pending): ?> + hosts_pending): ?> qlink( - $h->hosts_pending, + $hostgroup->hosts_pending, 'monitoring/list/hosts', array( 'host_state' => 99, - 'hostgroup_name' => $h->hostgroup_name, + 'hostgroup_name' => $hostgroup->hostgroup_name, 'sort' => 'host_severity' ), array( @@ -229,10 +229,10 @@ if ($h->hosts_down_unhandled) { $this->translatePlural( '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"', - $h->hosts_pending + $hostgroup->hosts_pending ), - $h->hosts_pending, - $h->hostgroup_alias + $hostgroup->hosts_pending, + $hostgroup->hostgroup_alias ) ) ) ?> @@ -241,24 +241,24 @@ if ($h->hosts_down_unhandled) { qlink( - $h->services_total, + $hostgroup->services_total, 'monitoring/list/services', - array('hostgroup_name' => $h->hostgroup_name), + array('hostgroup_name' => $hostgroup->hostgroup_name), array('title' => sprintf( $this->translate('List all services of all hosts in host group "%s"'), - $h->hostgroup_alias + $hostgroup->hostgroup_alias )) ) ?> - services_ok): ?> + services_ok): ?> qlink( - $h->services_ok, + $hostgroup->services_ok, 'monitoring/list/services', array( 'service_state' => 0, - 'hostgroup_name' => $h->hostgroup_name, + 'hostgroup_name' => $hostgroup->hostgroup_name, 'sort' => 'service_severity' ), array( @@ -266,26 +266,26 @@ if ($h->hosts_down_unhandled) { $this->translatePlural( '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"', - $h->services_ok + $hostgroup->services_ok ), - $h->services_ok, - $h->hostgroup_alias + $hostgroup->services_ok, + $hostgroup->hostgroup_alias ) ) ) ?> - services_critical_unhandled): ?> + services_critical_unhandled): ?> qlink( - $h->services_critical_unhandled, + $hostgroup->services_critical_unhandled, 'monitoring/list/services', array( 'service_state' => 2, 'service_acknowledged' => 0, 'service_in_downtime' => 0, 'host_problem' => 0, - 'hostgroup_name' => $h->hostgroup_name, + 'hostgroup_name' => $hostgroup->hostgroup_name, 'sort' => 'service_severity' ), array( @@ -293,23 +293,23 @@ if ($h->hosts_down_unhandled) { $this->translatePlural( '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"', - $h->services_critical_unhandled + $hostgroup->services_critical_unhandled ), - $h->services_critical_unhandled, - $h->hostgroup_alias + $hostgroup->services_critical_unhandled, + $hostgroup->hostgroup_alias ) ) ) ?> - services_critical_handled): ?> + services_critical_handled): ?> qlink( - $h->services_critical_handled, + $hostgroup->services_critical_handled, 'monitoring/list/services', array( 'service_state' => 2, 'service_handled' => 1, - 'hostgroup_name' => $h->hostgroup_name, + 'hostgroup_name' => $hostgroup->hostgroup_name, 'sort' => 'service_severity' ), array( @@ -317,29 +317,29 @@ if ($h->hosts_down_unhandled) { $this->translatePlural( '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"', - $h->services_critical_handled + $hostgroup->services_critical_handled ), - $h->services_critical_handled, - $h->hostgroup_alias + $hostgroup->services_critical_handled, + $hostgroup->hostgroup_alias ) ) ) ?> - services_critical_unhandled): ?> + services_critical_unhandled): ?> - services_unknown_unhandled): ?> + services_unknown_unhandled): ?> qlink( - $h->services_unknown_unhandled, + $hostgroup->services_unknown_unhandled, 'monitoring/list/services', array( 'service_state' => 3, 'service_acknowledged' => 0, 'service_in_downtime' => 0, 'host_problem' => 0, - 'hostgroup_name' => $h->hostgroup_name, + 'hostgroup_name' => $hostgroup->hostgroup_name, 'sort' => 'service_severity' ), array( @@ -347,23 +347,23 @@ if ($h->hosts_down_unhandled) { $this->translatePlural( '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"', - $h->services_unknown_unhandled + $hostgroup->services_unknown_unhandled ), - $h->services_unknown_unhandled, - $h->hostgroup_alias + $hostgroup->services_unknown_unhandled, + $hostgroup->hostgroup_alias ) ) ) ?> - services_unknown_handled): ?> + services_unknown_handled): ?> qlink( - $h->services_unknown_handled, + $hostgroup->services_unknown_handled, 'monitoring/list/services', array( 'service_state' => 3, 'service_handled' => 1, - 'hostgroup_name' => $h->hostgroup_name, + 'hostgroup_name' => $hostgroup->hostgroup_name, 'sort' => 'service_severity' ), array( @@ -371,29 +371,29 @@ if ($h->hosts_down_unhandled) { $this->translatePlural( '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"', - $h->services_unknown_handled + $hostgroup->services_unknown_handled ), - $h->services_unknown_handled, - $h->hostgroup_alias + $hostgroup->services_unknown_handled, + $hostgroup->hostgroup_alias ) ) ) ?> - services_unknown_unhandled): ?> + services_unknown_unhandled): ?> - services_warning_unhandled): ?> + services_warning_unhandled): ?> qlink( - $h->services_warning_unhandled, + $hostgroup->services_warning_unhandled, 'monitoring/list/services', array( 'service_state' => 1, 'service_acknowledged' => 0, 'service_in_downtime' => 0, 'host_problem' => 0, - 'hostgroup_name' => $h->hostgroup_name, + 'hostgroup_name' => $hostgroup->hostgroup_name, 'sort' => 'service_severity' ), array( @@ -401,23 +401,23 @@ if ($h->hosts_down_unhandled) { $this->translatePlural( '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"', - $h->services_warning_unhandled + $hostgroup->services_warning_unhandled ), - $h->services_warning_unhandled, - $h->hostgroup_alias + $hostgroup->services_warning_unhandled, + $hostgroup->hostgroup_alias ) ) ) ?> - services_warning_handled): ?> + services_warning_handled): ?> qlink( - $h->services_warning_handled, + $hostgroup->services_warning_handled, 'monitoring/list/services', array( 'service_state' => 1, 'service_handled' => 1, - 'hostgroup_name' => $h->hostgroup_name, + 'hostgroup_name' => $hostgroup->hostgroup_name, 'sort' => 'service_severity' ), array( @@ -425,26 +425,26 @@ if ($h->hosts_down_unhandled) { $this->translatePlural( '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"', - $h->services_warning_handled + $hostgroup->services_warning_handled ), - $h->services_warning_handled, - $h->hostgroup_alias + $hostgroup->services_warning_handled, + $hostgroup->hostgroup_alias ) ) ) ?> - services_warning_unhandled): ?> + services_warning_unhandled): ?> - services_pending): ?> + services_pending): ?> qlink( - $h->services_pending, + $hostgroup->services_pending, 'monitoring/list/services', array( 'service_state' => 99, - 'hostgroup_name' => $h->hostgroup_name, + 'hostgroup_name' => $hostgroup->hostgroup_name, 'sort' => 'service_severity' ), array( @@ -452,10 +452,10 @@ if ($h->hosts_down_unhandled) { $this->translatePlural( '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"', - $h->services_pending + $hostgroup->services_pending ), - $h->services_pending, - $h->hostgroup_alias + $hostgroup->services_pending, + $hostgroup->hostgroup_alias ) ) ) ?>