diff --git a/modules/monitoring/application/views/scripts/list/servicegroups.phtml b/modules/monitoring/application/views/scripts/list/servicegroups.phtml
index 3c874fa03..fea6457e5 100644
--- a/modules/monitoring/application/views/scripts/list/servicegroups.phtml
+++ b/modules/monitoring/application/views/scripts/list/servicegroups.phtml
@@ -1,4 +1,6 @@
-compact): ?>
+compact): ?>
= $this->tabs ?>
= $this->sortBox ?>
@@ -36,216 +38,121 @@ foreach ($servicegroups as $serviceGroup): ?>
= $serviceGroup->services_total ?>
- services_ok): ?>
-
- = $this->qlink(
- $serviceGroup->services_ok,
- 'monitoring/list/services',
- array(
- 'service_state' => 0,
- 'servicegroup_name' => $serviceGroup->servicegroup_name,
- 'sort' => 'service_severity'
- ),
- array(
- 'title' => sprintf(
- $this->translatePlural(
- 'List %s service that is currently in state OK in service group "%s"',
- 'List %s services which are currently in state OK in service group "%s"',
- $serviceGroup->services_ok
+ setUrl('monitoring/list/services')
+ ->add(
+ StateBadges::STATE_OK,
+ $serviceGroup->services_ok,
+ array(
+ 'service_state' => 0,
+ 'servicegroup_name' => $serviceGroup->servicegroup_name,
+ 'sort' => 'service_severity'
),
- $serviceGroup->services_ok,
- $serviceGroup->servicegroup_alias
- )
+ 'List %s service that is currently in state OK in service group "%s"',
+ 'List %s services which are currently in state OK in service group "%s"',
+ array($serviceGroup->services_ok, $serviceGroup->servicegroup_alias)
)
- ) ?>
-
-
- services_critical_unhandled): ?>
-
- = $this->qlink(
- $serviceGroup->services_critical_unhandled,
- 'monitoring/list/services',
- array(
- 'service_state' => 2,
- 'service_acknowledged' => 0,
- 'service_in_downtime' => 0,
- 'host_problem' => 0,
- 'servicegroup_name' => $serviceGroup->servicegroup_name,
- 'sort' => 'service_severity'
- ),
- array(
- 'title' => sprintf(
- $this->translatePlural(
- 'List %s service that is currently in state CRITICAL in service group "%s"',
- 'List %s services which are currently in state CRITICAL in service group "%s"',
- $serviceGroup->services_critical_unhandled
+ ->add(
+ StateBadges::STATE_CRITICAL,
+ $serviceGroup->services_critical_unhandled,
+ array(
+ 'service_state' => 2,
+ 'service_acknowledged' => 0,
+ 'service_in_downtime' => 0,
+ 'host_problem' => 0,
+ 'servicegroup_name' => $serviceGroup->servicegroup_name,
+ 'sort' => 'service_severity'
),
- $serviceGroup->services_critical_unhandled,
- $serviceGroup->servicegroup_alias
- )
+ 'List %s service that is currently in state CRITICAL in service group "%s"',
+ 'List %s services which are currently in state CRITICAL in service group "%s"',
+ array($serviceGroup->services_critical_unhandled, $serviceGroup->servicegroup_alias)
)
- ) ?>
-
- services_critical_handled): ?>
-
- = $this->qlink(
- $serviceGroup->services_critical_handled,
- 'monitoring/list/services',
- array(
- 'service_state' => 2,
- 'service_handled' => 1,
- 'servicegroup_name' => $serviceGroup->servicegroup_name,
- 'sort' => 'service_severity'
- ),
- array(
- 'title' => sprintf(
- $this->translatePlural(
- 'List %s service that is currently in state CRITICAL (Acknowledged) in service group "%s"',
- 'List %s services which are currently in state CRITICAL (Acknowledged) in service group "%s"',
- $serviceGroup->services_critical_handled
- ),
- $serviceGroup->services_critical_handled,
- $serviceGroup->servicegroup_alias
- )
- )
- ) ?>
-
-
- services_critical_unhandled): ?>
-
-
- services_unknown_unhandled): ?>
-
- = $this->qlink(
- $serviceGroup->services_unknown_unhandled,
- 'monitoring/list/services',
- array(
- 'service_state' => 3,
- 'service_acknowledged' => 0,
- 'service_in_downtime' => 0,
- 'host_problem' => 0,
- 'servicegroup_name' => $serviceGroup->servicegroup_name,
- 'sort' => 'service_severity'
- ),
- array(
- 'title' => sprintf(
- $this->translatePlural(
- 'List %s service that is currently in state UNKNOWN in service group "%s"',
- 'List %s services which are currently in state UNKNOWN in service group "%s"',
- $serviceGroup->services_unknown_unhandled
+ ->add(
+ StateBadges::STATE_CRITICAL_HANDLED,
+ $serviceGroup->services_critical_handled,
+ array(
+ 'service_state' => 2,
+ 'service_handled' => 1,
+ 'servicegroup_name' => $serviceGroup->servicegroup_name,
+ 'sort' => 'service_severity'
),
- $serviceGroup->services_unknown_unhandled,
- $serviceGroup->servicegroup_alias
- )
+ 'List %s service that is currently in state CRITICAL (Acknowledged) in service group "%s"',
+ 'List %s services which are currently in state CRITICAL (Acknowledged) in service group "%s"',
+ array($serviceGroup->services_critical_unhandled, $serviceGroup->servicegroup_alias)
)
- ) ?>
-
- services_unknown_handled): ?>
-
- = $this->qlink(
- $serviceGroup->services_unknown_handled,
- 'monitoring/list/services',
- array(
- 'service_state' => 3,
- 'service_handled' => 1,
- 'servicegroup_name' => $serviceGroup->servicegroup_name,
- 'sort' => 'service_severity'
- ),
- array(
- 'title' => sprintf(
- $this->translatePlural(
- 'List %s service that is currently in state UNKNOWN (Acknowledged) in service group "%s"',
- 'List %s services which are currently in state UNKNOWN (Acknowledged) in service group "%s"',
- $serviceGroup->services_unknown_handled
- ),
- $serviceGroup->services_unknown_handled,
- $serviceGroup->servicegroup_alias
- )
- )
- ) ?>
-
-
- services_unknown_unhandled): ?>
-
-
- services_warning_unhandled): ?>
-
- = $this->qlink(
- $serviceGroup->services_warning_unhandled,
- 'monitoring/list/services',
- array(
- 'service_state' => 1,
- 'service_acknowledged' => 0,
- 'service_in_downtime' => 0,
- 'host_problem' => 0,
- 'servicegroup_name' => $serviceGroup->servicegroup_name,
- 'sort' => 'service_severity'
- ),
- array(
- 'title' => sprintf(
- $this->translatePlural(
- 'List %s service that is currently in state WARNING in service group "%s"',
- 'List %s services which are currently in state WARNING in service group "%s"',
- $serviceGroup->services_warning_unhandled
+ ->add(
+ StateBadges::STATE_UNKNOWN,
+ $serviceGroup->services_unknown_unhandled,
+ array(
+ 'service_state' => 3,
+ 'service_acknowledged' => 0,
+ 'service_in_downtime' => 0,
+ 'host_problem' => 0,
+ 'servicegroup_name' => $serviceGroup->servicegroup_name,
+ 'sort' => 'service_severity'
),
- $serviceGroup->services_warning_unhandled,
- $serviceGroup->servicegroup_alias
- )
+ 'List %s service that is currently in state UNKNOWN in service group "%s"',
+ 'List %s services which are currently in state UNKNOWN in service group "%s"',
+ array($serviceGroup->services_unknown_unhandled, $serviceGroup->servicegroup_alias)
)
- ) ?>
-
- services_warning_handled): ?>
-
- = $this->qlink(
- $serviceGroup->services_warning_handled,
- 'monitoring/list/services',
- array(
- 'service_state' => 1,
- 'service_handled' => 1,
- 'servicegroup_name' => $serviceGroup->servicegroup_name,
- 'sort' => 'service_severity'
- ),
- array(
- 'title' => sprintf(
- $this->translatePlural(
- 'List %s service that is currently in state WARNING (Acknowledged) in service group "%s"',
- 'List %s services which are currently in state WARNING (Acknowledged) in service group "%s"',
- $serviceGroup->services_warning_handled
- ),
- $serviceGroup->services_warning_handled,
- $serviceGroup->servicegroup_alias
- )
- )
- ) ?>
-
-
- services_warning_unhandled): ?>
-
-
- services_pending): ?>
-
- = $this->qlink(
- $serviceGroup->services_pending,
- 'monitoring/list/services',
- array(
- 'service_state' => 99,
- 'servicegroup_name' => $serviceGroup->servicegroup_name,
- 'sort' => 'service_severity'
- ),
- array(
- 'title' => sprintf(
- $this->translatePlural(
- 'List %s service that is currenlty in state PENDING in service group "%s"',
- 'List %s services which are currently in state PENDING in service group "%s"',
- $serviceGroup->services_pending
+ ->add(
+ StateBadges::STATE_UNKNOWN_HANDLED,
+ $serviceGroup->services_unknown_handled,
+ array(
+ 'service_state' => 3,
+ 'service_handled' => 1,
+ 'servicegroup_name' => $serviceGroup->servicegroup_name,
+ 'sort' => 'service_severity'
),
- $serviceGroup->services_pending,
- $serviceGroup->servicegroup_alias
- )
+ 'List %s service that is currently in state UNKNOWN (Acknowledged) in service group "%s"',
+ 'List %s services which are currently in state UNKNOWN (Acknowledged) in service group "%s"',
+ array($serviceGroup->services_unknown_handled, $serviceGroup->servicegroup_alias)
+
)
- ) ?>
-
-
+ ->add(
+ StateBadges::STATE_WARNING,
+ $serviceGroup->services_warning_unhandled,
+ array(
+ 'service_state' => 1,
+ 'service_acknowledged' => 0,
+ 'service_in_downtime' => 0,
+ 'host_problem' => 0,
+ 'servicegroup_name' => $serviceGroup->servicegroup_name,
+ 'sort' => 'service_severity'
+ ),
+ 'List %s service that is currently in state WARNING in service group "%s"',
+ 'List %s services which are currently in state WARNING in service group "%s"',
+ array($serviceGroup->services_warning_unhandled, $serviceGroup->servicegroup_alias)
+ )
+ ->add(
+ StateBadges::STATE_WARNING_HANDLED,
+ $serviceGroup->services_warning_handled,
+ array(
+ 'service_state' => 1,
+ 'service_handled' => 1,
+ 'servicegroup_name' => $serviceGroup->servicegroup_name,
+ 'sort' => 'service_severity'
+ ),
+ 'List %s service that is currently in state WARNING (Acknowledged) in service group "%s"',
+ 'List %s services which are currently in state WARNING (Acknowledged) in service group "%s"',
+ array($serviceGroup->services_warning_handled, $serviceGroup->servicegroup_alias)
+ )
+ ->add(
+ StateBadges::STATE_PENDING,
+ $serviceGroup->services_pending,
+ array(
+ 'service_state' => 99,
+ 'servicegroup_name' => $serviceGroup->servicegroup_name,
+ 'sort' => 'service_severity'
+ ),
+ 'List %s service that is currenlty in state PENDING in service group "%s"',
+ 'List %s services which are currently in state PENDING in service group "%s"',
+ array($serviceGroup->services_pending, $serviceGroup->servicegroup_alias)
+ );
+ echo $stateBadges->render();
+ ?>
|