Add proper titles to the tactical overview

refs #8458
This commit is contained in:
Johannes Meyer 2015-02-23 17:29:22 +01:00
parent 18f6ff8702
commit 8991b7ed83
5 changed files with 654 additions and 332 deletions

View File

@ -12,66 +12,114 @@
<tr>
<td>
<?php if ($this->statusSummary->hosts_active): ?>
<div class="box entry">
<a href="<?= $this->href(
'monitoring/list/hosts',
array('host_active_checks_enabled' => 1)
); ?>">
<?= sprintf($this->translatePlural('%d Active', '%d Active', $this->statusSummary->hosts_active), $this->statusSummary->hosts_active); ?>
</a>
</div>
<div class="box entry"><?= $this->qlink(
sprintf(
$this->translatePlural('%u Active', '%u Active', $this->statusSummary->hosts_active),
$this->statusSummary->hosts_active
),
'monitoring/list/hosts',
array('host_active_checks_enabled' => 1),
array('title' => sprintf(
$this->translatePlural(
'List %u actively checked host',
'List %u actively checked hosts',
$this->statusSummary->hosts_active
),
$this->statusSummary->hosts_active
))
); ?></div>
<?php endif ?>
<?php if ($this->statusSummary->hosts_passive): ?>
<div class="box entry">
<a href="<?= $this->href(
'monitoring/list/hosts',
array('host_active_checks_enabled' => 0, 'host_passive_checks_enabled' => 1)
); ?>">
<?= sprintf($this->translatePlural('%d Passive', '%d Passive', $this->statusSummary->hosts_passive), $this->statusSummary->hosts_passive); ?>
</a>
</div>
<div class="box entry"><?= $this->qlink(
sprintf(
$this->translatePlural('%d Passive', '%d Passive', $this->statusSummary->hosts_passive),
$this->statusSummary->hosts_passive
),
'monitoring/list/hosts',
array('host_active_checks_enabled' => 0, 'host_passive_checks_enabled' => 1),
array('title' => sprintf(
$this->translatePlural(
'List %u passively checked host',
'List %u passively checked hosts',
$this->statusSummary->hosts_passive
),
$this->statusSummary->hosts_passive
))
); ?></div>
<?php endif ?>
<?php if ($this->statusSummary->hosts_not_checked): ?>
<div class="box entry">
<a href="<?= $this->href(
'monitoring/list/hosts',
array('host_active_checks_enabled' => 0, 'host_passive_checks_enabled' => 0)
); ?>" style="color: red;">
<?= sprintf($this->translatePlural('%d Disabled', '%d Disabled', $this->statusSummary->hosts_not_checked), $this->statusSummary->hosts_not_checked); ?>
</a>
</div>
<div class="box entry"><?= $this->qlink(
sprintf(
$this->translatePlural('%d Disabled', '%d Disabled', $this->statusSummary->hosts_not_checked),
$this->statusSummary->hosts_not_checked
),
'monitoring/list/hosts',
array('host_active_checks_enabled' => 0, 'host_passive_checks_enabled' => 0),
array('title' => sprintf(
$this->translatePlural(
'List %u host that is not being checked at all',
'List %u hosts which are not being checked at all',
$this->statusSummary->hosts_not_checked
),
$this->statusSummary->hosts_not_checked
))
); ?></div>
<?php endif ?>
</td>
<td>
<?php if ($this->statusSummary->services_active): ?>
<div class="box entry">
<a href="<?= $this->href(
'monitoring/list/services',
array('service_active_checks_enabled' => 1)
); ?>">
<?= sprintf($this->translatePlural('%d Active', '%d Active', $this->statusSummary->services_active), $this->statusSummary->services_active); ?>
</a>
</div>
<div class="box entry"><?= $this->qlink(
sprintf(
$this->translatePlural('%d Active', '%d Active', $this->statusSummary->services_active),
$this->statusSummary->services_active
),
'monitoring/list/services',
array('service_active_checks_enabled' => 1),
array('title' => sprintf(
$this->translatePlural(
'List %u actively checked service',
'List %u actively checked services',
$this->statusSummary->services_active
),
$this->statusSummary->services_active
))
); ?></div>
<?php endif ?>
<?php if ($this->statusSummary->services_passive): ?>
<div class="box entry">
<a href="<?= $this->href(
'monitoring/list/services',
array('service_active_checks_enabled' => 0, 'service_passive_checks_enabled' => 1)
); ?>">
<?= sprintf($this->translatePlural('%d Passive', '%d Passive', $this->statusSummary->services_passive), $this->statusSummary->services_passive); ?>
</a>
</div>
<div class="box entry"><?= $this->qlink(
sprintf(
$this->translatePlural('%d Passive', '%d Passive', $this->statusSummary->services_passive),
$this->statusSummary->services_passive
),
'monitoring/list/services',
array('service_active_checks_enabled' => 0, 'service_passive_checks_enabled' => 1),
array('title' => sprintf(
$this->translatePlural(
'List %u passively checked service',
'List %u passively checked services',
$this->statusSummary->services_passive
),
$this->statusSummary->services_passive
))
); ?></div>
<?php endif ?>
<?php if ($this->statusSummary->services_not_checked): ?>
<div class="box entry">
<a href="<?= $this->href(
'monitoring/list/services',
array('service_active_checks_enabled' => 0, 'service_passive_checks_enabled' => 0)
); ?>" style="color: red;">
<?= sprintf($this->translatePlural('%d Disabled', '%d Disabled', $this->statusSummary->services_not_checked), $this->statusSummary->services_not_checked); ?>
</a>
</div>
<div class="box entry"><?= $this->qlink(
sprintf(
$this->translatePlural('%d Disabled', '%d Disabled', $this->statusSummary->services_not_checked),
$this->statusSummary->services_not_checked
),
'monitoring/list/services',
array('service_active_checks_enabled' => 0, 'service_passive_checks_enabled' => 0),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is not being checked at all',
'List %u services which are not being checked at all',
$this->statusSummary->services_not_checked
),
$this->statusSummary->services_not_checked
))
); ?></div>
<?php endif ?>
</td>
</tr>

View File

@ -11,58 +11,112 @@
<tbody>
<tr>
<td>
<div class="box entry">
<?php if ($this->statusSummary->hosts_without_flap_detection): ?>
<div class="box entry">
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural('%u Host Disabled', '%u Hosts Disabled', $this->statusSummary->hosts_without_flap_detection),
$this->statusSummary->hosts_without_flap_detection
),
'monitoring/list/hosts',
array('host_flap_detection_enabled' => 0)
); ?>" class="feature-highlight">
<?= sprintf($this->translatePlural('%d Host Disabled', '%d Hosts Disabled', $this->statusSummary->hosts_without_flap_detection), $this->statusSummary->hosts_without_flap_detection); ?>
</a>
array('host_flap_detection_enabled' => 0),
array(
'class' => 'feature-highlight',
'title' => sprintf(
$this->translatePlural(
'List %u host for which flap detection has been disabled',
'List %u hosts for which flap detection has been disabled',
$this->statusSummary->hosts_without_flap_detection
),
$this->statusSummary->hosts_without_flap_detection
)
)
); ?>
<?php else: ?>
<div class="box entry">
<a href="<?= $this->href(
<?= $this->qlink(
$this->translate('All Hosts Enabled'),
'monitoring/list/hosts',
array('host_flap_detection_enabled' => 1)
); ?>">
<?= $this->translate('All Hosts Enabled'); ?>
</a>
array('host_flap_detection_enabled' => 1),
array('title' => $this->translate(
'List all hosts, for which flap detection is enabled entirely'
))
); ?>
<?php endif ?>
<?php if ($this->statusSummary->hosts_flapping): ?>
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural('%u Host Flapping', '%u Hosts Flapping', $this->statusSummary->hosts_flapping),
$this->statusSummary->hosts_flapping
),
'monitoring/list/hosts',
array('host_is_flapping' => 1)
); ?>" class="feature-highlight">
<?= sprintf($this->translatePlural('%d Host Flapping', '%d Hosts Flapping', $this->statusSummary->hosts_flapping), $this->statusSummary->hosts_flapping); ?>
</a>
array('host_is_flapping' => 1),
array(
'class' => 'feature-highlight',
'title' => sprintf(
$this->translatePlural(
'List %u host that is currently flapping',
'List %u hosts which are currently flapping',
$this->statusSummary->hosts_flapping
),
$this->statusSummary->hosts_flapping
)
)
); ?>
<?php endif ?>
</div>
</td>
<td>
<div class="box entry">
<?php if ($this->statusSummary->services_without_flap_detection): ?>
<div class="box entry">
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural('%u Service Disabled', '%u Services Disabled', $this->statusSummary->services_without_flap_detection),
$this->statusSummary->services_without_flap_detection
),
'monitoring/list/services',
array('service_flap_detection_enabled' => 0)
); ?>" class="feature-highlight">
<?= sprintf($this->translatePlural('%d Service Disabled', '%d Services Disabled', $this->statusSummary->services_without_flap_detection), $this->statusSummary->services_without_flap_detection); ?>
</a>
array('service_flap_detection_enabled' => 0),
array(
'class' => 'feature-highlight',
'title' => sprintf(
$this->translatePlural(
'List %u service for which flap detection has been disabled',
'List %u services for which flap detection has been disabled',
$this->statusSummary->services_without_flap_detection
),
$this->statusSummary->services_without_flap_detection
)
)
); ?>
<?php else: ?>
<div class="box entry">
<a href="<?= $this->href(
<?= $this->qlink(
$this->translate('All Services Enabled'),
'monitoring/list/services',
array('service_flap_detection_enabled' => 1)
); ?>">
<?= $this->translate('All Services Enabled'); ?>
</a>
array('service_flap_detection_enabled' => 1),
array('title' => $this->translate(
'List all services, for which flap detection is enabled entirely'
))
); ?>
<?php endif ?>
<?php if ($this->statusSummary->services_flapping): ?>
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural('%u Service Flapping', '%u Services Flapping', $this->statusSummary->services_flapping),
$this->statusSummary->services_flapping
),
'monitoring/list/services',
array('service_is_flapping' => 1)
); ?>" class="feature-highlight">
<?= sprintf($this->translatePlural('%d Service Flapping', '%d Services Flapping', $this->statusSummary->services_flapping), $this->statusSummary->services_flapping); ?>
</a>
array('service_is_flapping' => 1),
array(
'class' => 'feature-highlight',
'title' => sprintf(
$this->translatePlural(
'List %u service that is currently flapping',
'List %u services which are currently flapping',
$this->statusSummary->services_flapping
),
$this->statusSummary->services_flapping
)
)
); ?>
<?php endif ?>
</div>
</td>
@ -78,42 +132,70 @@
<tbody>
<tr>
<td>
<div class="box entry">
<?php if ($this->statusSummary->hosts_not_triggering_notifications): ?>
<div class="box entry ">
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural('%u Host Disabled', '%u Hosts Disabled', $this->statusSummary->hosts_not_triggering_notifications),
$this->statusSummary->hosts_not_triggering_notifications
),
'monitoring/list/hosts',
array('host_notifications_enabled' => 0)
); ?>" class="feature-highlight">
<?= sprintf($this->translatePlural('%d Host Disabled', '%d Hosts Disabled', $this->statusSummary->hosts_not_triggering_notifications), $this->statusSummary->hosts_not_triggering_notifications); ?>
</a>
array('host_notifications_enabled' => 0),
array(
'class' => 'feature-highlight',
'title' => sprintf(
$this->translatePlural(
'List %u host for which notifications are suppressed',
'List %u hosts for which notifications are suppressed',
$this->statusSummary->hosts_not_triggering_notifications
),
$this->statusSummary->hosts_not_triggering_notifications
)
)
); ?>
<?php else: ?>
<div class="box entry ">
<a href="<?= $this->href(
<?= $this->qlink(
$this->translate('All Hosts Enabled'),
'monitoring/list/hosts',
array('host_notifications_enabled' => 1)
); ?>">
<?= $this->translate('All Hosts Enabled'); ?>
</a>
array('host_notifications_enabled' => 1),
array('title' => $this->translate(
'List all hosts, for which notifications are enabled entirely'
))
); ?>
<?php endif ?>
</div>
</td>
<td>
<div class="box entry">
<?php if ($this->statusSummary->services_not_triggering_notifications): ?>
<div class="box entry">
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural('%u Service Disabled', '%u Services Disabled', $this->statusSummary->services_not_triggering_notifications),
$this->statusSummary->services_not_triggering_notifications
),
'monitoring/list/services',
array('service_notifications_enabled' => 0)
); ?>" class="feature-highlight">
<?= sprintf($this->translatePlural('%d Service Disabled', '%d Services Disabled', $this->statusSummary->services_not_triggering_notifications), $this->statusSummary->services_not_triggering_notifications); ?>
</a>
array('service_notifications_enabled' => 0),
array(
'class' => 'feature-highlight',
'title' => sprintf(
$this->translatePlural(
'List %u service for which notifications are suppressed',
'List %u services for which notifications are suppressed',
$this->statusSummary->services_not_triggering_notifications
),
$this->statusSummary->services_not_triggering_notifications
)
)
); ?>
<?php else: ?>
<div class="box entry">
<a href="<?= $this->href(
<?= $this->qlink(
$this->translate('All Services Enabled'),
'monitoring/list/services',
array('service_notifications_enabled' => 1)
); ?>">
<?= $this->translate('All Services Enabled'); ?>
</a>
array('service_notifications_enabled' => 1),
array('title' => $this->translate(
'List all services, for which notifications are enabled entirely'
))
); ?>
<?php endif ?>
</div>
</td>
@ -129,42 +211,70 @@
<tbody>
<tr>
<td>
<div class="box entry">
<?php if ($this->statusSummary->hosts_not_processing_event_handlers): ?>
<div class="box entry">
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural('%u Host Disabled', '%u Hosts Disabled', $this->statusSummary->hosts_not_processing_event_handlers),
$this->statusSummary->hosts_not_processing_event_handlers
),
'monitoring/list/hosts',
array('host_event_handler_enabled' => 0)
); ?>" class="feature-highlight">
<?= sprintf($this->translatePlural('%d Host Disabled', '%d Hosts Disabled', $this->statusSummary->hosts_not_processing_event_handlers), $this->statusSummary->hosts_not_processing_event_handlers); ?>
</a>
array('host_event_handler_enabled' => 0),
array(
'class' => 'feature-highlight',
'title' => sprintf(
$this->translatePlural(
'List %u host that is not processing any event handlers',
'List %u hosts which are not processing any event handlers',
$this->statusSummary->hosts_not_processing_event_handlers
),
$this->statusSummary->hosts_not_processing_event_handlers
)
)
); ?>
<?php else: ?>
<div class="box entry">
<a href="<?= $this->href(
<?= $this->qlink(
$this->translate('All Hosts Enabled'),
'monitoring/list/hosts',
array('host_event_handler_enabled' => 1)
); ?>">
<?= $this->translate('All Hosts Enabled'); ?>
</a>
array('host_event_handler_enabled' => 1),
array('title' => $this->translate(
'List all hosts, which are processing event handlers entirely'
))
); ?>
<?php endif ?>
</div>
</td>
<td>
<div class="box entry">
<?php if ($this->statusSummary->services_not_processing_event_handlers): ?>
<div class="box entry">
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural('%u Service Disabled', '%u Services Disabled', $this->statusSummary->services_not_processing_event_handlers),
$this->statusSummary->services_not_processing_event_handlers
),
'monitoring/list/services',
array('service_event_handler_enabled' => 0)
); ?>" class="feature-highlight">
<?= sprintf($this->translatePlural('%d Service Disabled', '%d Services Disabled', $this->statusSummary->services_not_processing_event_handlers), $this->statusSummary->services_not_processing_event_handlers); ?>
</a>
array('service_event_handler_enabled' => 0),
array(
'class' => 'feature-highlight',
'title' => sprintf(
$this->translatePlural(
'List %u service that is not processing any event handlers',
'List %u services which are not processing any event handlers',
$this->statusSummary->services_not_processing_event_handlers
),
$this->statusSummary->services_not_processing_event_handlers
)
)
); ?>
<?php else: ?>
<div class="box entry">
<a href="<?= $this->href(
<?= $this->qlink(
$this->translate('All Services Enabled'),
'monitoring/list/services',
array('service_event_handler_enabled' => 1)
); ?>">
<?= $this->translate('All Services Enabled'); ?>
</a>
array('service_event_handler_enabled' => 1),
array('title' => $this->translate(
'List all services, which are processing event handlers entirely'
))
); ?>
<?php endif ?>
</div>
</td>

View File

@ -10,18 +10,40 @@ $service_problems = (
?>
<div class="box ok_hosts state_<?= $this->statusSummary->hosts_up ? 'up' : 'pending'; ?>">
<?php if ($this->statusSummary->hosts_up): ?>
<h2>
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 0)); ?>">
<?= sprintf($this->translatePlural('%d Host UP', '%d Hosts UP', $this->statusSummary->hosts_up), $this->statusSummary->hosts_up); ?>
</a>
</h2>
<h2><?= $this->qlink(
sprintf(
$this->translatePlural('%u Host UP', '%u Hosts UP', $this->statusSummary->hosts_up),
$this->statusSummary->hosts_up
),
'monitoring/list/hosts',
array('host_state' => 0),
array('title' => sprintf(
$this->translatePlural(
'List %u host that is currently in state UP',
'List %u hosts which are currently in state UP',
$this->statusSummary->hosts_up
),
$this->statusSummary->hosts_up
))
); ?></h2>
<?php endif ?>
<?php if ($this->statusSummary->hosts_pending): ?>
<h2>
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 99)); ?>">
<?= sprintf($this->translatePlural('%d Host PENDING', '%d Hosts PENDING', $this->statusSummary->hosts_pending), $this->statusSummary->hosts_pending); ?>
</a>
</h2>
<h2><?= $this->qlink(
sprintf(
$this->translatePlural('%u Host PENDING', '%u Hosts PENDING', $this->statusSummary->hosts_pending),
$this->statusSummary->hosts_pending
),
'monitoring/list/hosts',
array('host_state' => 99),
array('title' => sprintf(
$this->translatePlural(
'List %u host that is currently in state PENDING',
'List %u hosts which are currently in state PENDING',
$this->statusSummary->hosts_pending
),
$this->statusSummary->hosts_pending
))
); ?></h2>
<?php endif ?>
<?php if ($service_problems || $this->statusSummary->hosts_down || $this->statusSummary->hosts_unreachable): ?>
<div class="box contents">

View File

@ -1,280 +1,396 @@
<?php
use Icinga\Module\Monitoring\Object\Service;
?>
<?php if ($services_critical_handled || $services_critical_unhandled): ?>
<div class="box entry state_critical <?= $services_critical_unhandled ? '' : 'handled'; ?>">
<div class="box entry state_<?= Service::getStateText(2); ?> <?= $services_critical_unhandled ? '' : 'handled'; ?>">
<?php if ($services_critical_unhandled): ?>
<a href="<?= $this->href(
<?= $this->qlink(
$services_critical_unhandled . ' ' . Service::getStateText(2, true),
'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 2, 'service_acknowledged' => 0, 'service_in_downtime' => 0)
); ?>">
<?= sprintf($this->translatePlural('%d CRITICAL', '%d CRITICAL', $services_critical_unhandled, 'icinga.state'), $services_critical_unhandled); ?>
</a>
array(
'host_problem' => $host_problem,
'service_state' => 2,
'service_acknowledged' => 0,
'service_in_downtime' => 0
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state CRITICAL',
'List %u services which are currently in state CRITICAL',
$services_critical_unhandled
),
$services_critical_unhandled
))
); ?>
<?php endif ?>
<?php if ($services_critical_handled): ?>
<a href="<?= $this->href(
<?= $this->qlink(
$services_critical_handled . ' ' . (
$services_critical_unhandled ? $this->translate('Acknowledged') : Service::getStateText(2, true)
),
'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 2, 'service_handled' => 1)
); ?>">
<?= $services_critical_handled . ' ' . ($services_critical_unhandled ? $this->translate('Acknowledged') : $this->translate('CRITICAL', 'icinga.state')); ?>
</a>
array(
'host_problem' => $host_problem,
'service_state' => 2,
'service_handled' => 1
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state CRITICAL (Acknowledged)',
'List %u services which are currently in state CRITICAL (Acknowledged)',
$services_critical_handled
),
$services_critical_handled
))
); ?>
<?php endif ?>
<?php if ($services_critical_passive): ?>
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural(
'%u is passively checked',
'%u are passively checked',
$services_critical_passive
),
$services_critical_passive
),
'monitoring/list/services',
array(
'service_state' => 2,
'host_problem' => $host_problem,
'service_active_checks_enabled' => 0,
'service_passive_checks_enabled' => 1
)
); ?>">
<?php
if ($services_critical_passive > 1) {
printf(
$this->translate('%d are passively checked'),
$services_critical_passive
);
} else {
printf(
$this->translate('%d is passively checked'),
$services_critical_passive
);
}
?>
</a>
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state CRITICAL and passively checked',
'List %u services which are currently in state CRITICAL and passively checked',
$services_critical_passive
),
$services_critical_passive
))
); ?>
<?php endif ?>
<?php if ($services_critical_not_checked): ?>
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural(
'%u is not checked at all',
'%u are not checked at all',
$services_critical_not_checked
),
$services_critical_not_checked
),
'monitoring/list/services',
array(
'service_state' => 2,
'host_problem' => $host_problem,
'service_active_checks_enabled' => 0,
'service_passive_checks_enabled' => 0
)
); ?>">
<?php
if ($services_critical_not_checked > 1) {
printf(
$this->translate('%d are not checked at all'),
$services_critical_not_checked
);
} else {
printf(
$this->translate('%d is not checked at all'),
$services_critical_not_checked
);
}
?>
</a>
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state CRITICAL and not checked at all',
'List %u services which are currently in state CRITICAL and not checked at all',
$services_critical_not_checked
),
$services_critical_not_checked
))
); ?>
<?php endif ?>
</div>
<?php endif ?>
<?php if ($services_warning_handled || $services_warning_unhandled): ?>
<div class="box entry state_warning <?= $services_warning_unhandled ? '' : 'handled'; ?>">
<div class="box entry state_<?= Service::getStateText(1); ?> <?= $services_warning_unhandled ? '' : 'handled'; ?>">
<?php if ($services_warning_unhandled): ?>
<a href="<?= $this->href(
<?= $this->qlink(
$services_warning_unhandled . ' ' . Service::getStateText(1, true),
'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 1, 'service_acknowledged' => 0, 'service_in_downtime' => 0)
); ?>">
<?= $services_warning_unhandled; ?> <?= $this->translate('WARNING', 'icinga.state') ?>
</a>
array(
'host_problem' => $host_problem,
'service_state' => 1,
'service_acknowledged' => 0,
'service_in_downtime' => 0
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state WARNING',
'List %u services which are currently in state WARNING',
$services_warning_unhandled
),
$services_warning_unhandled
))
); ?>
<?php endif ?>
<?php if ($services_warning_handled): ?>
<a href="<?= $this->href(
<?= $this->qlink(
$services_warning_handled . ' ' . (
$services_warning_unhandled ? $this->translate('Acknowledged') : Service::getStateText(1, true)
),
'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 1, 'service_handled' => 1)
); ?>">
<?= $services_warning_handled . ' ' . ($services_warning_unhandled ? $this->translate('Acknowledged') : $this->translate('WARNING', 'icinga.state')); ?>
</a>
array(
'host_problem' => $host_problem,
'service_state' => 1,
'service_handled' => 1
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state WARNING (Acknowledged)',
'List %u services which are currently in state WARNING (Acknowledged)',
$services_warning_handled
),
$services_warning_handled
))
); ?>
<?php endif ?>
<?php if ($services_warning_passive): ?>
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural(
'%u is passively checked',
'%u are passively checked',
$services_warning_passive
),
$services_warning_passive
),
'monitoring/list/services',
array(
'service_state' => 1,
'host_problem' => $host_problem,
'service_active_checks_enabled' => 0,
'service_passive_checks_enabled' => 1
)
); ?>">
<?php
if ($services_warning_passive > 1) {
printf(
$this->translate('%d are passively checked'),
$services_warning_passive
);
} else {
printf(
$this->translate('%d is passively checked'),
$services_warning_passive
);
}
?>
</a>
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state WARNING and passively checked',
'List %u services which are currently in state WARNING and passively checked',
$services_warning_passive
),
$services_warning_passive
))
); ?>
<?php endif ?>
<?php if ($services_warning_not_checked): ?>
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural(
'%u is not checked at all',
'%u are not checked at all',
$services_warning_not_checked
),
$services_warning_not_checked
),
'monitoring/list/services',
array(
'service_state' => 1,
'host_problem' => $host_problem,
'service_active_checks_enabled' => 0,
'service_passive_checks_enabled' => 0
)
); ?>">
<?php
if ($services_warning_not_checked > 1) {
printf(
$this->translate('%d are not checked at all'),
$services_warning_not_checked
);
} else {
printf(
$this->translate('%d is not checked at all'),
$services_warning_not_checked
);
}
?>
</a>
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state WARNING and not checked at all',
'List %u services which are currently in state WARNING and not checked at all',
$services_warning_not_checked
),
$services_warning_not_checked
))
); ?>
<?php endif ?>
</div>
<?php endif ?>
<?php if ($services_unknown_handled || $services_unknown_unhandled): ?>
<div class="box entry state_unknown <?= $services_unknown_unhandled ? '' : 'handled'; ?>">
<div class="box entry state_<?= Service::getStateText(3); ?> <?= $services_unknown_unhandled ? '' : 'handled'; ?>">
<?php if ($services_unknown_unhandled): ?>
<a href="<?= $this->href(
<?= $this->qlink(
$services_unknown_unhandled . ' ' . Service::getStateText(3, true),
'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 3, 'service_acknowledged' => 0, 'service_in_downtime' => 0)
); ?>">
<?= sprintf($this->translatePlural('%d UNKNOWN', '%d UNKNOWN', $services_unknown_unhandled, 'icinga.state'), $services_unknown_unhandled) ?>
</a>
array(
'host_problem' => $host_problem,
'service_state' => 3,
'service_acknowledged' => 0,
'service_in_downtime' => 0
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state UNKNOWN',
'List %u services which are currently in state UNKNOWN',
$services_unknown_unhandled
),
$services_unknown_unhandled
))
); ?>
<?php endif ?>
<?php if ($services_unknown_handled): ?>
<a href="<?= $this->href(
<?= $this->qlink(
$services_unknown_handled . ' ' . (
$services_unknown_unhandled ? $this->translate('Acknowledged') : Service::getStateText(3, true)
),
'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 3, 'service_handled' => 1)
); ?>">
<?= $services_unknown_handled . ' ' . ($services_unknown_unhandled ? $this->translate('Acknowledged') : $this->translate('UNKNOWN', 'icinga.state')); ?>
</a>
array(
'host_problem' => $host_problem,
'service_state' => 3,
'service_handled' => 1
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state UNKNOWN (Acknowledged)',
'List %u services which are currently in state UNKNOWN (Acknowledged)',
$services_unknown_handled
),
$services_unknown_handled
))
); ?>
<?php endif ?>
<?php if ($services_unknown_passive): ?>
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural(
'%u is passively checked',
'%u are passively checked',
$services_unknown_passive
),
$services_unknown_passive
),
'monitoring/list/services',
array(
'service_state' => 3,
'host_problem' => $host_problem,
'service_active_checks_enabled' => 0,
'service_passive_checks_enabled' => 1
)
); ?>">
<?php
if ($services_unknown_passive > 1) {
printf(
$this->translate('%d are passively checked'),
$services_unknown_passive
);
} else {
printf(
$this->translate('%d is passively checked'),
$services_unknown_passive
);
}
?>
</a>
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state UNKNOWN and passively checked',
'List %u services which are currently in state UNKNOWN and passively checked',
$services_unknown_passive
),
$services_unknown_passive
))
); ?>
<?php endif ?>
<?php if ($services_unknown_not_checked): ?>
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural(
'%u is not checked at all',
'%u are not checked at all',
$services_unknown_not_checked
),
$services_unknown_not_checked
),
'monitoring/list/services',
array(
'service_state' => 3,
'host_problem' => $host_problem,
'service_active_checks_enabled' => 0,
'service_passive_checks_enabled' => 0
)
); ?>">
<?php
if ($services_unknown_not_checked > 1) {
printf(
$this->translate('%d are not checked at all'),
$services_unknown_not_checked
);
} else {
printf(
$this->translate('%d is not checked at all'),
$services_unknown_not_checked
);
}
?>
</a>
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state UNKNOWN and not checked at all',
'List %u services which are currently in state UNKNOWN and not checked at all',
$services_unknown_not_checked
),
$services_unknown_not_checked
))
); ?>
<?php endif ?>
</div>
<?php endif ?>
<?php if ($services_ok): ?>
<div class="box entry state_ok">
<a href="<?= $this->href(
<div class="box entry state_<?= Service::getStateText(0); ?>">
<?= $this->qlink(
$services_ok . ' ' . Service::getStateText(0, true),
'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 0)
); ?>">
<?= $services_ok; ?> <?= $this->translate('OK', 'icinga.state') ?>
</a>
array(
'host_problem' => $host_problem,
'service_state' => 0
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state OK',
'List %u services which are currently in state OK',
$services_ok
),
$services_ok
))
); ?>
<?php if ($services_ok_not_checked): ?>
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural(
'%u is not checked at all',
'%u are not checked at all',
$services_ok_not_checked
),
$services_ok_not_checked
),
'monitoring/list/services',
array(
'service_state' => 0,
'host_problem' => $host_problem,
'service_active_checks_enabled' => 0,
'service_passive_checks_enabled' => 0
)
); ?>">
<?php
if ($services_ok_not_checked > 1) {
printf(
$this->translate('%d are not checked at all'),
$services_ok_not_checked
);
} else {
printf(
$this->translate('%d is not checked at all'),
$services_ok_not_checked
);
}
?>
</a>
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state OK and not checked at all',
'List %u services which are currently in state OK and not checked at all',
$services_ok_not_checked
),
$services_ok_not_checked
))
); ?>
<?php endif ?>
</div>
<?php endif ?>
<?php if ($services_pending): ?>
<div class="box entry state_pending">
<a href="<?= $this->href(
<div class="box entry state_<?= Service::getStateText(99); ?>">
<?= $this->qlink(
$services_pending . ' ' . Service::getStateText(99, true),
'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 99)
); ?>">
<?= sprintf($this->translatePlural('%d PENDING', '%d PENDING', $services_pending, 'icinga.state'), $services_pending); ?>
</a>
array(
'host_problem' => $host_problem,
'service_state' => 99
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state PENDING',
'List %u services which are currently in state PENDING',
$services_pending
),
$services_pending
))
); ?>
<?php if ($services_pending_not_checked): ?>
<a href="<?= $this->href(
<?= $this->qlink(
sprintf(
$this->translatePlural(
'%u is not checked at all',
'%u are not checked at all',
$services_pending_not_checked
),
$services_pending_not_checked
),
'monitoring/list/services',
array(
'service_state' => 99,
'host_problem' => $host_problem,
'service_active_checks_enabled' => 0,
'service_passive_checks_enabled' => 0
)
); ?>">
<?php
if ($services_pending_not_checked > 1) {
printf(
$this->translate('%d are not checked at all'),
$services_pending_not_checked
);
} else {
printf(
$this->translate('%d is not checked at all'),
$services_pending_not_checked
);
}
?>
</a>
),
array('title' => sprintf(
$this->translatePlural(
'List %u service that is currently in state PENDING and not checked at all',
'List %u services which are currently in state PENDING and not checked at all',
$services_pending_not_checked
),
$services_pending_not_checked
))
); ?>
<?php endif ?>
</div>
<?php endif ?>
<?php endif ?>

View File

@ -5,18 +5,44 @@
}
?>">
<?php if ($this->statusSummary->hosts_down): ?>
<h2>
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 1)); ?>">
<?= sprintf($this->translatePlural('%d Host DOWN', '%d Hosts DOWN', $this->statusSummary->hosts_down), $this->statusSummary->hosts_down); ?>
</a>
</h2>
<h2><?= $this->qlink(
sprintf(
$this->translatePlural('%u Host DOWN', '%u Hosts DOWN', $this->statusSummary->hosts_down),
$this->statusSummary->hosts_down
),
'monitoring/list/hosts',
array('host_state' => 1),
array('title' => sprintf(
$this->translatePlural(
'List %u host that is currently in state DOWN',
'List %u hosts which are currently in state DOWN',
$this->statusSummary->hosts_down
),
$this->statusSummary->hosts_down
))
); ?></h2>
<?php endif ?>
<?php if ($this->statusSummary->hosts_unreachable): ?>
<h2>
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 2)); ?>">
<?= sprintf($this->translatePlural('%d Host UNREACHABLE', '%d Hosts UNREACHABLE', $this->statusSummary->hosts_unreachable), $this->statusSummary->hosts_unreachable); ?>
</a>
</h2>
<h2><?= $this->qlink(
sprintf(
$this->translatePlural(
'%u Host UNREACHABLE',
'%u Hosts UNREACHABLE',
$this->statusSummary->hosts_unreachable
),
$this->statusSummary->hosts_unreachable
),
'monitoring/list/hosts',
array('host_state' => 2),
array('title' => sprintf(
$this->translatePlural(
'List %u host that is currently in state UNREACHABLE',
'List %u hosts which are currently in state UNREACHABLE',
$this->statusSummary->hosts_unreachable
),
$this->statusSummary->hosts_unreachable
))
); ?></h2>
<?php endif ?>
<div class="box contents">
<strong><?= $this->translate('Services'); ?></strong>