icingaweb2/modules/monitoring/application/views/scripts/services/show.phtml

124 lines
4.5 KiB
PHTML

<div class="controls">
<?= $this->render('partials/service/objects-header.phtml'); ?>
</div>
<div class="content">
<?php if (($serviceCount = count($objects)) === 0): ?>
<?= $this->translate('No services matching the filter'); ?>
<?php else: ?>
<h3><?= sprintf($this->translatePlural('%u Service', '%u Services', $serviceCount), $serviceCount); ?></h3>
<div><?= $this->qlink(
sprintf($this->translate('List all %u services'), $serviceCount),
$listAllLink
); ?></div>
<div>
<?= $checkNowForm; ?>
</div>
<div><?= $this->qlink(
sprintf($this->translate('Reschedule the next check for all %u services'), $serviceCount),
$rescheduleAllLink,
null,
array('icon' => 'reschedule')
); ?></div>
<div><?= $this->qlink(
sprintf($this->translate('Schedule a downtime for all %u services'), $serviceCount),
$downtimeAllLink,
null,
array('icon' => 'plug')
); ?></div>
<div><?= $this->qlink(
sprintf($this->translate('Submit a passive check result for all %u services'), $serviceCount),
$processCheckResultAllLink,
null,
array('icon' => 'reply')
); ?></div>
<?php if ($this->hasPermission('monitoring/command/send-custom-notification')): ?>
<div><?= $this->qlink(
sprintf($this->translate('Send a custom notification for all %u services'), $serviceCount),
$sendCustomNotificationLink,
null,
array('icon' => 'comment')
); ?></div>
<?php endif; ?>
<?php if (($unhandledCount = count($unhandledObjects)) > 0): ?>
<div>
<h3><?= sprintf(
$this->translatePlural(
'%u Unhandled Service Problem',
'%u Unhandled Service Problems',
$unhandledCount
),
$unhandledCount
); ?></h3>
<div><?= $this->qlink(
sprintf(
$this->translatePlural(
'Schedule a downtime for %u unhandled service problem',
'Schedule a downtime for %u unhandled service problems',
$unhandledCount
),
$unhandledCount
),
$downtimeUnhandledLink,
null,
array('icon' => 'plug')
); ?></div>
<div><?= $this->qlink(
sprintf(
$this->translatePlural(
'Acknowledge %u unhandled service problem',
'Acknowledge %u unhandled service problems',
$unhandledCount
),
$unhandledCount
),
$acknowledgeUnhandledLink,
null,
array('icon' => 'ok')
); ?></div>
</div>
<?php endif ?>
<?php if (($acknowledgedCount = count($acknowledgedObjects)) > 0): ?>
<div>
<h2><?= sprintf(
$this->translatePlural(
'%u Acknowledged Service Problem',
'%u Acknowledged Service Problems',
$acknowledgedCount
),
$acknowledgedCount
); ?></h2>
<?= $removeAckForm ?>
</div>
<?php endif ?>
<?php if (($inDowntimeCount = count($objectsInDowntime)) > 0): ?>
<h2><?= $this->qlink(
sprintf(
$this->translatePlural(
'List %u service currently in downtime',
'List %u services currently in downtime',
$inDowntimeCount
),
$inDowntimeCount
),
$inDowntimeLink,
null,
array('icon' => 'plug')
); ?></h2>
<?php endif ?>
<?php if (($commentCount = count($objects->getComments())) > 0): ?>
<h2><?= $this->qlink(
sprintf(
$this->translatePlural(
'List %u service comment',
'List %u service comments',
$commentCount
),
$commentCount
),
$commentsLink,
null,
array('icon' => 'comment')
); ?></h2>
<?php endif ?>
<?php endif ?>
</div>