145 lines
4.8 KiB
PHTML
145 lines
4.8 KiB
PHTML
<div class="controls">
|
|
<?= $this->tabs ?>
|
|
</div>
|
|
<div class="content">
|
|
<?php $hostCount = count($objects) ?>
|
|
<?php if ($hostCount === 0): ?>
|
|
<?= $this->translate('No hosts matching the filter') ?>
|
|
<?php else: ?>
|
|
<div class="hbox-item">
|
|
<b><?= sprintf($this->translatePlural('Host (%u)', 'Hosts (%u)', $hostCount), $hostCount) ?></b>
|
|
</div>
|
|
<div class="hbox-item">
|
|
<?= $this->hostStatesPieChart ?>
|
|
</div>
|
|
<div class="hbox-item" style="font-size: 14px">
|
|
<?php foreach (array_filter($hostStates) as $text => $count) {
|
|
echo sprintf('%s: %u <br>', $this->translate(strtoupper($text)), $count);
|
|
} ?>
|
|
</div>
|
|
|
|
<h3>
|
|
<?= sprintf(
|
|
$this->translatePlural(
|
|
'%u Host',
|
|
'%u Hosts',
|
|
$hostCount
|
|
),
|
|
$hostCount
|
|
) ?>
|
|
</h3>
|
|
|
|
<div>
|
|
<a href="<?= $listAllLink ?>" title="<?= $this->translate('List all') ?>">
|
|
<?= $this->translate('List all') ?>
|
|
</a>
|
|
</div>
|
|
|
|
<div>
|
|
<?= $checkNowForm ?>
|
|
</div>
|
|
|
|
<div>
|
|
<a href="<?= $rescheduleAllLink ?>">
|
|
<?= $this->icon('reschedule') ?>
|
|
<?= $this->translate('Reschedule host checks') ?>
|
|
</a>
|
|
</div>
|
|
|
|
<div>
|
|
<a href="<?= $downtimeAllLink ?>">
|
|
<?= $this->icon('plug') ?>
|
|
<?= $this->translate('Schedule host downtimes') ?>
|
|
</a>
|
|
</div>
|
|
|
|
<div>
|
|
<a href="<?= $processCheckResultAllLink; ?>">
|
|
<?= $this->icon('reply'); ?>
|
|
<?= $this->translate('Submit passive check results'); ?>
|
|
</a>
|
|
</div>
|
|
|
|
<?php if (! empty($unhandledObjects)): ?>
|
|
<h3>
|
|
<?php $unhandledCount = count($unhandledObjects) ?>
|
|
<?= sprintf(
|
|
$this->translatePlural(
|
|
'%u Unhandled Host Problem',
|
|
'%u Unhandled Host Problems',
|
|
$unhandledCount
|
|
),
|
|
$unhandledCount
|
|
) ?>
|
|
</h3>
|
|
<div>
|
|
<a href="<?= $downtimeUnhandledLink ?>"
|
|
title="<?= $this->translate('Schedule downtimes for unhandled problem hosts') ?>">
|
|
<?= $this->icon('plug') ?>
|
|
<?= $this->translate('Schedule downtimes for unhandled problem hosts') ?>
|
|
</a>
|
|
</div>
|
|
<div>
|
|
<a href="<?= $acknowledgeUnhandledLink ?>"
|
|
title="<?= $this->translate('Acknowledge unhandled problem hosts') ?>">
|
|
<?= $this->icon('ok') ?>
|
|
<?= $this->translate('Acknowledge unhandled problem hosts') ?>
|
|
</a>
|
|
</div>
|
|
<?php endif ?>
|
|
|
|
<?php if (! empty($acknowledgedObjects)): ?>
|
|
<h2>
|
|
<?php $acknowledgedCount = count($acknowledgedObjects) ?>
|
|
<?= sprintf(
|
|
$this->translatePlural(
|
|
'%u Acknowledged Host Problem',
|
|
'%u Acknowledged Host Problems',
|
|
$acknowledgedCount
|
|
),
|
|
$acknowledgedCount
|
|
) ?>
|
|
</h2>
|
|
<div>
|
|
<?= $removeAckForm ?>
|
|
</div>
|
|
<?php endif ?>
|
|
|
|
<?php if (! empty($objectsInDowntime)): ?>
|
|
<h2>
|
|
<?php $inDowntimeCount = count($objectsInDowntime) ?>
|
|
<a href="<?= $inDowntimeLink ?>"
|
|
title="<?= $this->translate('Hosts in downtime') ?>">
|
|
<?= $this->icon('plug') ?>
|
|
<?= sprintf(
|
|
$this->translatePlural(
|
|
'%u host is in downtime',
|
|
'%u hosts are in downtime',
|
|
$inDowntimeCount
|
|
),
|
|
$inDowntimeCount
|
|
) ?>
|
|
</a>
|
|
</h2>
|
|
<?php endif ?>
|
|
|
|
<?php $havingCommentsCount = count($objects->getComments()) ?>
|
|
<?php if ($havingCommentsCount): ?>
|
|
<h2>
|
|
<a href="<?= $havingCommentsLink ?>"
|
|
title="<?= $this->translate('Comments') ?>">
|
|
<?= $this->icon('comment') ?>
|
|
<?= sprintf(
|
|
$this->translatePlural(
|
|
'%u comment',
|
|
'%u comments',
|
|
$havingCommentsCount
|
|
),
|
|
$havingCommentsCount
|
|
) ?>
|
|
</a>
|
|
</h2>
|
|
<?php endif ?>
|
|
<?php endif ?>
|
|
</div>
|