2015-03-06 12:31:34 +01:00
|
|
|
<?php
|
|
|
|
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
|
|
|
?>
|
|
|
|
|
2014-09-24 07:47:26 +02:00
|
|
|
<div class="controls">
|
2015-03-06 12:31:34 +01:00
|
|
|
|
|
|
|
<?php if (! $this->compact): ?>
|
|
|
|
<?= $tabs; ?>
|
|
|
|
<?php endif ?>
|
|
|
|
|
2015-03-06 16:13:00 +01:00
|
|
|
<?= $this->render('partials/host/objects-tinysummary.phtml') ?>
|
2015-02-23 17:22:07 +01:00
|
|
|
<?= $this->render('partials/host/objects-header.phtml'); ?>
|
2015-03-06 13:27:48 +01:00
|
|
|
|
2014-09-24 07:47:26 +02:00
|
|
|
</div>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-03-06 14:49:33 +01:00
|
|
|
<div class="content no-padding-top">
|
2015-03-06 12:31:34 +01:00
|
|
|
<h3>
|
|
|
|
<?= $this->icon('reschedule') ?>
|
|
|
|
<?= $this->translate('Commands') ?>
|
|
|
|
</h3>
|
2015-03-06 15:22:14 +01:00
|
|
|
<?= sprintf($this->translate('Issue commands to all %d selected hosts:'), count($objects)) ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-02-02 16:28:35 +01:00
|
|
|
<?php if (($hostCount = count($objects)) === 0): ?>
|
2015-02-23 17:22:07 +01:00
|
|
|
<?= $this->translate('No hosts matching the filter'); ?>
|
2014-09-24 07:47:26 +02:00
|
|
|
<?php else: ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
|
|
|
<p>
|
2014-09-24 07:47:26 +02:00
|
|
|
<div>
|
2015-02-23 17:22:07 +01:00
|
|
|
<?= $checkNowForm; ?>
|
2014-09-24 07:47:26 +02:00
|
|
|
</div>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2014-12-11 15:52:23 +01:00
|
|
|
<div>
|
2015-03-06 12:31:34 +01:00
|
|
|
<?= $this->qlink(
|
2015-03-06 15:22:14 +01:00
|
|
|
$this->translate('Reschedule next checks'),
|
2015-03-06 12:31:34 +01:00
|
|
|
$rescheduleAllLink,
|
|
|
|
null,
|
|
|
|
array('icon' => 'reschedule')
|
|
|
|
); ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<?= $this->qlink(
|
2015-03-06 15:22:14 +01:00
|
|
|
$this->translate('Schedule downtimes'),
|
2015-03-06 12:31:34 +01:00
|
|
|
$downtimeAllLink,
|
2015-02-23 17:22:07 +01:00
|
|
|
null,
|
2015-02-24 11:35:25 +01:00
|
|
|
array('icon' => 'plug')
|
2015-03-06 12:31:34 +01:00
|
|
|
); ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<?= $this->qlink(
|
2015-03-06 15:22:14 +01:00
|
|
|
$this->translate('Submit passive check results'),
|
2015-03-06 12:31:34 +01:00
|
|
|
$processCheckResultAllLink,
|
|
|
|
null,
|
|
|
|
array('icon' => 'reply')
|
|
|
|
); ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<?= $this->qlink(
|
2015-03-06 15:22:14 +01:00
|
|
|
$this->translate('Add comments'),
|
2015-03-06 12:31:34 +01:00
|
|
|
$addCommentLink,
|
|
|
|
null,
|
|
|
|
array('icon' => 'comment')
|
|
|
|
); ?>
|
|
|
|
</div>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<?php if (($unhandledCount = count($unhandledObjects)) > 0): ?>
|
|
|
|
<div>
|
|
|
|
<h3>
|
|
|
|
<?= $this->icon('attention-alt') ?>
|
|
|
|
<?= $this->translatePlural(
|
|
|
|
'Unhandled Problem',
|
|
|
|
'Unhandled Problems',
|
|
|
|
$unhandledCount
|
|
|
|
) ?>
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<?= sprintf(
|
2015-03-06 15:22:14 +01:00
|
|
|
$this->translate('There are %s unhandled problems. Issue commands to the problematic hosts:'),
|
2015-03-06 12:31:34 +01:00
|
|
|
'<span class="badge badge-critical">' . $unhandledCount . '</span>'
|
|
|
|
) ?>
|
|
|
|
|
|
|
|
<div><?= $this->qlink(
|
|
|
|
sprintf(
|
|
|
|
$this->translatePlural(
|
|
|
|
'Schedule a downtime for %u host',
|
|
|
|
'Schedule a downtime for %u hosts',
|
|
|
|
$unhandledCount
|
|
|
|
),
|
|
|
|
$unhandledCount
|
|
|
|
),
|
|
|
|
$downtimeUnhandledLink,
|
|
|
|
null,
|
|
|
|
array('icon' => 'plug')
|
|
|
|
); ?></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div><?= $this->qlink(
|
|
|
|
sprintf(
|
|
|
|
$this->translatePlural(
|
|
|
|
'Acknowledge %u unhandled host',
|
|
|
|
'Acknowledge %u unhandled hosts',
|
|
|
|
$unhandledCount
|
|
|
|
),
|
2015-02-03 12:34:22 +01:00
|
|
|
$unhandledCount
|
|
|
|
),
|
2015-03-06 12:31:34 +01:00
|
|
|
$acknowledgeUnhandledLink,
|
|
|
|
null,
|
|
|
|
array('icon' => 'ok')
|
|
|
|
); ?></div>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
2014-09-24 07:47:26 +02:00
|
|
|
</div>
|
2015-02-23 17:22:07 +01:00
|
|
|
<?php endif ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-02-23 17:22:07 +01:00
|
|
|
<?php if (($acknowledgedCount = count($acknowledgedObjects)) > 0): ?>
|
|
|
|
<div>
|
2015-03-06 12:31:34 +01:00
|
|
|
<h3><?= $this->icon('ok', $this->translate('Acknowledgements')) ?> <?= $this->translate('Acknowledgements') ?></h3>
|
|
|
|
|
|
|
|
<p><?= sprintf(
|
2015-02-23 17:22:07 +01:00
|
|
|
$this->translatePlural(
|
|
|
|
'%u Acknowledged Host Problem',
|
|
|
|
'%u Acknowledged Host Problems',
|
2014-12-30 10:31:23 +01:00
|
|
|
$acknowledgedCount
|
2015-02-23 17:22:07 +01:00
|
|
|
),
|
|
|
|
$acknowledgedCount
|
2015-03-06 12:31:34 +01:00
|
|
|
); ?></p>
|
|
|
|
|
2015-02-23 17:22:07 +01:00
|
|
|
<?= $removeAckForm ?>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-02-23 17:22:07 +01:00
|
|
|
<?php if (($inDowntimeCount = count($objectsInDowntime)) > 0): ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-03-06 15:22:14 +01:00
|
|
|
<h3><?= $this->icon('plug', $this->translate('Downtimes'))?> <?=$this->translate('Downtimes')?></h3>
|
2015-03-06 12:31:34 +01:00
|
|
|
<p><?= sprintf(
|
2015-02-23 17:22:07 +01:00
|
|
|
$this->translatePlural(
|
2015-03-06 12:31:34 +01:00
|
|
|
'%u Host currently in downtime.',
|
|
|
|
'%u Hosts currently in downtime.',
|
2015-02-23 17:22:07 +01:00
|
|
|
$inDowntimeCount
|
|
|
|
),
|
|
|
|
$inDowntimeCount
|
2015-03-06 12:31:34 +01:00
|
|
|
) ?> <?= $this->qlink(
|
2015-03-06 15:13:08 +01:00
|
|
|
$this->translate('List all'),
|
2015-03-06 12:31:34 +01:00
|
|
|
$inDowntimeLink,
|
2015-03-06 15:13:08 +01:00
|
|
|
null,
|
|
|
|
array('data-base-target' => '_next')
|
2015-03-06 12:31:34 +01:00
|
|
|
); ?>
|
|
|
|
|
|
|
|
</p>
|
2015-02-23 17:22:07 +01:00
|
|
|
<?php endif ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-02-23 17:22:07 +01:00
|
|
|
<?php if (($commentCount = count($objects->getComments())) > 0): ?>
|
2015-03-06 15:22:14 +01:00
|
|
|
<h3> <?= $this->icon('comment', $this->translate('Comments'))?> <?=$this->translate('Comments') ?></h3>
|
2015-03-06 12:31:34 +01:00
|
|
|
<p>
|
|
|
|
<?= sprintf(
|
2015-02-23 17:22:07 +01:00
|
|
|
$this->translatePlural(
|
2015-03-06 12:31:34 +01:00
|
|
|
'There is %u host comment.',
|
|
|
|
'There are %u host comments.',
|
2015-02-23 17:22:07 +01:00
|
|
|
$commentCount
|
|
|
|
),
|
|
|
|
$commentCount
|
2015-03-06 12:31:34 +01:00
|
|
|
) ?>
|
|
|
|
|
|
|
|
<?= $this->qlink(
|
|
|
|
$this->translate('List all'),
|
|
|
|
$commentsLink,
|
2015-03-06 15:13:08 +01:00
|
|
|
null,
|
|
|
|
array('data-base-target' => '_next')
|
2015-03-06 12:31:34 +01:00
|
|
|
); ?>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<?php foreach ($objects as $service): ?>
|
|
|
|
<?php $service->fetchComments(); ?>
|
|
|
|
<?php foreach ($service->comments as $comment): ?>
|
|
|
|
<tr>
|
|
|
|
<td style="vertical-align: top;" data-base-target="_self">
|
|
|
|
<?php
|
|
|
|
$delCommentForm = new DeleteCommentCommandForm();
|
|
|
|
$delCommentForm->populate(
|
|
|
|
array('comment_id' => $comment->id, 'redirect' => html_entity_decode($this->url))
|
|
|
|
);
|
|
|
|
$delCommentForm->setAction(
|
|
|
|
$this->url(
|
2015-03-06 13:27:48 +01:00
|
|
|
'monitoring/host/delete-comment',
|
2015-03-06 12:31:34 +01:00
|
|
|
array('host' => $service->getName())
|
|
|
|
)
|
|
|
|
);
|
|
|
|
echo $delCommentForm;
|
|
|
|
?>
|
|
|
|
(<?= ucfirst($comment->type) ?>):
|
|
|
|
</td>
|
|
|
|
<td style="padding-left: .5em;">
|
|
|
|
<?= nl2br($comment->comment) ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
<p>
|
|
|
|
<div><?= $this->qlink(
|
|
|
|
$this->translate('Remove all'),
|
|
|
|
$deleteCommentLink,
|
|
|
|
null,
|
|
|
|
array('icon' => 'trash')
|
|
|
|
); ?></div>
|
|
|
|
</p>
|
|
|
|
-->
|
2015-02-23 17:22:07 +01:00
|
|
|
<?php endif ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2014-09-24 07:47:26 +02:00
|
|
|
<?php endif ?>
|
2015-02-23 17:22:07 +01:00
|
|
|
</div>
|