Add proper titles to the servicegroups view

refs #8458
This commit is contained in:
Johannes Meyer 2015-02-23 17:25:02 +01:00
parent c4aa02c3f0
commit ebdf68550b
1 changed files with 118 additions and 99 deletions

View File

@ -79,9 +79,12 @@
</td>
<?php endif ?>
<td class="groupname">
<a href="<?= $this->href('monitoring/list/services', array('servicegroup' => $s->servicegroup)); ?>">
<?= $this->translate($s->servicegroup_alias) ?>
</a>
<?= $this->qlink(
$s->servicegroup_alias,
'monitoring/list/services',
array('servicegroup' => $s->servicegroup),
array('title' => sprintf($this->translate('List all services in the group "%s"'), $s->servicegroup_alias))
); ?>
</td>
<td class="total">
<?= $s->services_total; ?>
@ -89,29 +92,32 @@
<td class="state">
<?php if ($s->services_ok): ?>
<span class="state ok">
<a href="<?= $this->href(
<?= $this->qlink(
$s->services_ok,
'monitoring/list/services',
array(
'service_state' => 0,
'servicegroup' => $s->servicegroup,
'sort' => 'service_severity'
)
); ?>" title="<?php printf(
$this->translatePlural(
'List %s service with status ok in service group %s',
'List %s Services with status ok in service group %s',
$s->services_ok
),
$s->services_ok,
$s->servicegroup
); ?>">
<?= $s->services_ok; ?>
</a>
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"',
$s->services_ok
),
$s->services_ok,
$s->servicegroup_alias
)
)
); ?>
</span>
<?php endif ?>
<?php if ($s->services_critical_unhandled): ?>
<span class="state critical">
<a href="<?= $this->href(
<?= $this->qlink(
$s->services_critical_unhandled,
'monitoring/list/services',
array(
'service_state' => 2,
@ -120,40 +126,43 @@
'host_problem' => 0,
'servicegroup' => $s->servicegroup,
'sort' => 'service_severity'
)
); ?>" title="<?php printf(
$this->translatePlural(
'List %s service with status critical unhandled in service group %s',
'List %s Services with status critical unhandled in service group %s',
$s->services_critical_unhandled
),
$s->services_critical_unhandled,
$s->servicegroup
); ?>">
<?= $s->services_critical_unhandled; ?>
</a>
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"',
$s->services_critical_unhandled
),
$s->services_critical_unhandled,
$s->servicegroup_alias
)
)
); ?>
<?php endif ?>
<?php if ($s->services_critical_handled): ?>
<span class="state critical handled">
<a href="<?= $this->href(
<?= $this->qlink(
$s->services_critical_handled,
'monitoring/list/services',
array(
'service_state' => 2,
'service_handled' => 1,
'servicegroup' => $s->servicegroup,
'sort' => 'service_severity'
)
); ?>" title="<?php printf(
$this->translatePlural(
'List %s service with status critical handled in service group %s',
'List %s services with status critical handled in service group %s',
$s->services_critical_handled
),
$s->services_critical_handled,
$s->servicegroup
); ?>">
<?= $s->services_critical_handled; ?>
</a>
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"',
$s->services_critical_handled
),
$s->services_critical_handled,
$s->servicegroup_alias
)
)
); ?>
</span>
<?php endif ?>
<?php if ($s->services_critical_unhandled): ?>
@ -161,7 +170,8 @@
<?php endif ?>
<?php if ($s->services_unknown_unhandled): ?>
<span class="state unknown">
<a href="<?= $this->href(
<?= $this->qlink(
$s->services_unknown_unhandled,
'monitoring/list/services',
array(
'service_state' => 3,
@ -170,40 +180,43 @@
'host_problem' => 0,
'servicegroup' => $s->servicegroup,
'sort' => 'service_severity'
)
); ?>" title="<?php printf(
$this->translatePlural(
'List %s service with status unknown unhandled in service group %s',
'List %s services with status unknown unhandled in service group %s',
$s->services_unknown_unhandled
),
$s->services_unknown_unhandled,
$s->servicegroup
); ?>">
<?= $s->services_unknown_unhandled; ?>
</a>
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"',
$s->services_unknown_unhandled
),
$s->services_unknown_unhandled,
$s->servicegroup_alias
)
)
); ?>
<?php endif ?>
<?php if ($s->services_unknown_handled): ?>
<span class="state unknown handled">
<a href="<?= $this->href(
<?= $this->qlink(
$s->services_unknown_handled,
'monitoring/list/services',
array(
'service_state' => 3,
'service_handled' => 1,
'servicegroup' => $s->servicegroup,
'sort' => 'service_severity'
)
); ?>" title="<?php printf(
$this->translatePlural(
'List %s service with status unknown handled in service group %s',
'List %s services with status unknown handled in service group %s',
$s->services_unknown_handled
),
$s->services_unknown_handled,
$s->servicegroup
); ?>">
<?= $s->services_unknown_handled; ?>
</a>
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"',
$s->services_unknown_handled
),
$s->services_unknown_handled,
$s->servicegroup_alias
)
)
); ?>
</span>
<?php endif ?>
<?php if ($s->services_unknown_unhandled): ?>
@ -211,7 +224,8 @@
<?php endif ?>
<?php if ($s->services_warning_unhandled): ?>
<span class="state warning">
<a href="<?= $this->href(
<?= $this->qlink(
$s->services_warning_unhandled,
'monitoring/list/services',
array(
'service_state' => 1,
@ -220,40 +234,43 @@
'host_problem' => 0,
'servicegroup' => $s->servicegroup,
'sort' => 'service_severity'
)
); ?>" title="<?php printf(
$this->translatePlural(
'List %s service with status warning unhandled in service group %s',
'List %s services with status warning unhandled in service group %s',
$s->services_warning_unhandled
),
$s->services_warning_unhandled,
$s->servicegroup
); ?>">
<?= $s->services_warning_unhandled; ?>
</a>
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"',
$s->services_warning_unhandled
),
$s->services_warning_unhandled,
$s->servicegroup_alias
)
)
); ?>
<?php endif ?>
<?php if ($s->services_warning_handled): ?>
<span class="state warning handled">
<a href="<?= $this->href(
<?= $this->qlink(
$s->services_warning_handled,
'monitoring/list/services',
array(
'service_state' => 1,
'service_handled' => 1,
'servicegroup' => $s->servicegroup,
'sort' => 'service_severity'
)
); ?>" title="<?php printf(
$this->translatePlural(
'List %s service with status warning handled in service group %s',
'List %s services with status warning handled in service group %s',
$s->services_warning_handled
),
$s->services_warning_handled,
$s->servicegroup
); ?>">
<?= $s->services_warning_handled; ?>
</a>
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"',
$s->services_warning_handled
),
$s->services_warning_handled,
$s->servicegroup_alias
)
)
); ?>
</span>
<?php endif ?>
<?php if ($s->services_warning_unhandled): ?>
@ -261,24 +278,26 @@
<?php endif ?>
<?php if ($s->services_pending): ?>
<span class="state pending">
<a href="<?= $this->href(
<?= $this->qlink(
$s->services_pending,
'monitoring/list/services',
array(
'service_state' => 99,
'servicegroup' => $s->servicegroup,
'sort' => 'service_severity'
)
); ?>" title="<?php printf(
$this->translatePlural(
'List %s service with status pending in service group %s',
'List %s services with status pending in service group %s',
$s->services_pending
),
$s->services_pending,
$s->servicegroup
); ?>">
<?= $s->services_pending; ?>
</a>
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"',
$s->services_pending
),
$s->services_pending,
$s->servicegroup_alias
)
)
); ?>
</span>
<?php endif ?>
</td>