2015-08-03 13:19:49 +02:00
|
|
|
<div class="controls">
|
2015-03-06 12:31:34 +01:00
|
|
|
<?php if (! $this->compact): ?>
|
|
|
|
<?= $tabs; ?>
|
|
|
|
<?php endif ?>
|
|
|
|
|
2015-09-04 13:02:57 +02:00
|
|
|
<h2 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : ''; ?>
|
|
|
|
<?= $this->render('list/components/hostssummary.phtml') ?>
|
|
|
|
</h2>
|
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-05-18 17:13:46 +02:00
|
|
|
<div class="content multi-commands">
|
2015-03-06 12:31:34 +01:00
|
|
|
<h3>
|
|
|
|
<?= $this->icon('reschedule') ?>
|
|
|
|
<?= $this->translate('Commands') ?>
|
|
|
|
</h3>
|
2015-05-18 14:49:06 +02:00
|
|
|
|
|
|
|
<p>
|
2015-04-07 17:41:38 +02:00
|
|
|
<?= sprintf($this->translatePlural(
|
|
|
|
'Issue commands to %s selected host:',
|
|
|
|
'Issue commands to all %s selected hosts:',
|
|
|
|
count($objects)
|
|
|
|
), '<b>' . count($objects) . '</b>') ?>
|
2015-05-18 14:49:06 +02:00
|
|
|
</p>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-02-02 16:28:35 +01:00
|
|
|
<?php if (($hostCount = count($objects)) === 0): ?>
|
2015-04-17 16:18:56 +02:00
|
|
|
<?= $this->translate('No hosts found matching the filter'); ?>
|
2014-09-24 07:47:26 +02:00
|
|
|
<?php else: ?>
|
2015-05-18 14:49:06 +02:00
|
|
|
<?= $checkNowForm; ?>
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<?= $this->qlink(
|
|
|
|
$this->translate('Reschedule next checks'),
|
|
|
|
$rescheduleAllLink,
|
|
|
|
null,
|
|
|
|
array('icon' => 'reschedule')
|
|
|
|
); ?>
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<?= $this->qlink(
|
|
|
|
$this->translate('Schedule downtimes'),
|
|
|
|
$downtimeAllLink,
|
|
|
|
null,
|
|
|
|
array('icon' => 'plug')
|
|
|
|
); ?>
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<?= $this->qlink(
|
|
|
|
$this->translate('Submit passive check results'),
|
|
|
|
$processCheckResultAllLink,
|
|
|
|
null,
|
|
|
|
array('icon' => 'reply')
|
|
|
|
); ?>
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<?= $this->qlink(
|
|
|
|
$this->translate('Add comments'),
|
|
|
|
$addCommentLink,
|
|
|
|
null,
|
|
|
|
array('icon' => 'comment')
|
|
|
|
); ?>
|
2015-05-11 12:18:50 +02:00
|
|
|
|
|
|
|
<?php if ($this->hasPermission('monitoring/command/send-custom-notification')): ?>
|
2015-05-18 14:49:06 +02:00
|
|
|
<br>
|
|
|
|
<?= $this->qlink(
|
2015-05-11 12:18:50 +02:00
|
|
|
sprintf($this->translate('Send a custom notification for all %u hosts'), $hostCount),
|
|
|
|
$sendCustomNotificationLink,
|
|
|
|
null,
|
|
|
|
array('icon' => 'comment')
|
2015-05-18 14:49:06 +02:00
|
|
|
); ?>
|
2015-05-11 12:18:50 +02:00
|
|
|
<?php endif; ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-04-07 17:41:38 +02:00
|
|
|
<?php
|
|
|
|
$unhandledCount = count($unhandledObjects);
|
|
|
|
$problemCount = count($problemObjects);
|
2015-06-01 12:22:53 +02:00
|
|
|
$unackCount = count($unacknowledgedObjects);
|
2015-04-07 17:41:38 +02:00
|
|
|
?>
|
|
|
|
|
2015-06-01 12:22:53 +02:00
|
|
|
<?php if ($problemCount || $unhandledCount || $unackCount): ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
<h3>
|
|
|
|
<?= $this->icon('attention-alt') ?>
|
|
|
|
<?= $this->translatePlural(
|
2015-04-07 17:41:38 +02:00
|
|
|
'Problem',
|
|
|
|
'Problems',
|
|
|
|
$unhandledCount + $problemCount
|
2015-03-06 12:31:34 +01:00
|
|
|
) ?>
|
|
|
|
</h3>
|
|
|
|
|
2015-04-07 17:41:38 +02:00
|
|
|
<?php if ($problemCount): ?>
|
|
|
|
<p>
|
2015-05-18 14:49:06 +02:00
|
|
|
<?= sprintf(
|
|
|
|
$this->translatePlural(
|
|
|
|
'There is %s problem.',
|
|
|
|
'There are %s problems.',
|
|
|
|
$problemCount
|
|
|
|
),
|
|
|
|
'<b>' . $problemCount . '</b>'
|
|
|
|
); ?>
|
|
|
|
</p>
|
|
|
|
<?= $this->qlink(
|
2015-04-07 17:41:38 +02:00
|
|
|
sprintf(
|
|
|
|
$this->translatePlural(
|
|
|
|
'Schedule a downtime for %u problem host',
|
|
|
|
'Schedule a downtime for %u problem hosts',
|
|
|
|
$problemCount
|
|
|
|
),
|
|
|
|
$problemCount
|
|
|
|
),
|
|
|
|
$downtimeLink,
|
|
|
|
null,
|
|
|
|
array('icon' => 'plug')
|
2015-05-18 14:49:06 +02:00
|
|
|
); ?>
|
2015-04-07 17:41:38 +02:00
|
|
|
<?php endif; ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-06-01 12:22:53 +02:00
|
|
|
<?php
|
|
|
|
if ($unackCount > 0): ?>
|
|
|
|
<br>
|
|
|
|
<?= $this->qlink(
|
|
|
|
sprintf(
|
|
|
|
$this->translatePlural(
|
|
|
|
'Acknowledge %u unacknowledged problem hosts',
|
|
|
|
'Acknowledge %u unacknowledged problem hosts',
|
|
|
|
$unackCount
|
|
|
|
),
|
|
|
|
$unackCount
|
|
|
|
),
|
|
|
|
$acknowledgeLink,
|
|
|
|
null,
|
|
|
|
array('icon' => 'ok')
|
|
|
|
); ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
2015-04-07 17:41:38 +02:00
|
|
|
<?php if ($unhandledCount): ?>
|
2015-05-18 14:49:06 +02:00
|
|
|
<p>
|
2015-03-06 12:31:34 +01:00
|
|
|
<?= sprintf(
|
2015-04-07 17:41:38 +02:00
|
|
|
$this->translatePlural(
|
|
|
|
'There is %s unhandled problem host, issue commands to the problematic host:',
|
|
|
|
'There are %s unhandled problem hosts, issue commands to the problematic hosts:',
|
|
|
|
$unhandledCount
|
|
|
|
),
|
2015-03-06 12:31:34 +01:00
|
|
|
'<span class="badge badge-critical">' . $unhandledCount . '</span>'
|
2015-04-07 17:41:38 +02:00
|
|
|
); ?>
|
2015-05-18 14:49:06 +02:00
|
|
|
</p>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-05-18 14:49:06 +02:00
|
|
|
<?= $this->qlink(
|
2015-03-06 12:31:34 +01:00
|
|
|
sprintf(
|
|
|
|
$this->translatePlural(
|
2015-04-07 17:41:38 +02:00
|
|
|
'Schedule a downtime for %u unhandled problem host',
|
|
|
|
'Schedule a downtime for %u unhandled problem hosts',
|
2015-03-06 12:31:34 +01:00
|
|
|
$unhandledCount
|
|
|
|
),
|
|
|
|
$unhandledCount
|
|
|
|
),
|
|
|
|
$downtimeUnhandledLink,
|
|
|
|
null,
|
|
|
|
array('icon' => 'plug')
|
2015-05-18 14:49:06 +02:00
|
|
|
); ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-04-07 17:41:38 +02:00
|
|
|
<?php endif; ?>
|
|
|
|
<?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>
|
|
|
|
|
2015-05-18 14:49:06 +02:00
|
|
|
<?= sprintf(
|
2015-02-23 17:22:07 +01:00
|
|
|
$this->translatePlural(
|
2015-04-07 17:41:38 +02:00
|
|
|
'%s Acknowledged Host Problem',
|
|
|
|
'%s Acknowledged Host Problems',
|
2014-12-30 10:31:23 +01:00
|
|
|
$acknowledgedCount
|
2015-02-23 17:22:07 +01:00
|
|
|
),
|
2015-04-07 17:41:38 +02:00
|
|
|
'<b>' . $acknowledgedCount . '</b>'
|
2015-05-18 17:13:46 +02:00
|
|
|
); ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-02-23 17:22:07 +01:00
|
|
|
<?= $removeAckForm ?>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-05-18 14:49:06 +02:00
|
|
|
<?php $scheduledDowntimeCount = count($objects->getScheduledDowntimes()) ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-05-18 14:49:06 +02:00
|
|
|
<?php if ($scheduledDowntimeCount): ?>
|
|
|
|
<h3><?= $this->icon('plug', $this->translate('Downtimes'))?> <?=$this->translate('Downtimes')?></h3>
|
|
|
|
<?= $this->qlink(
|
|
|
|
sprintf(
|
|
|
|
$this->translatePlural(
|
|
|
|
'%s scheduled downtime',
|
|
|
|
'%s scheduled downtimes',
|
|
|
|
$scheduledDowntimeCount
|
|
|
|
),
|
|
|
|
$scheduledDowntimeCount
|
2015-02-23 17:22:07 +01:00
|
|
|
),
|
2015-05-18 14:49:06 +02:00
|
|
|
$showDowntimesLink,
|
2015-03-06 15:13:08 +01:00
|
|
|
null,
|
|
|
|
array('data-base-target' => '_next')
|
2015-05-18 14:49:06 +02:00
|
|
|
);?>
|
|
|
|
<?= sprintf($this->translate('on all selected hosts.')) ?>
|
2015-03-06 12:31:34 +01:00
|
|
|
|
2015-05-18 14:49:06 +02:00
|
|
|
<?php if (($inDowntimeCount = count($objectsInDowntime)) > 0): ?>
|
|
|
|
<br>
|
|
|
|
<?= $this->qlink(
|
|
|
|
sprintf(
|
|
|
|
$this->translatePlural(
|
|
|
|
'%s host',
|
|
|
|
'%s hosts',
|
|
|
|
$inDowntimeCount
|
|
|
|
),
|
|
|
|
$inDowntimeCount
|
|
|
|
),
|
|
|
|
$inDowntimeLink,
|
|
|
|
null,
|
|
|
|
array('data-base-target' => '_next')
|
|
|
|
); ?>
|
|
|
|
<?= $this->translate('are currently in downtime.') ?>
|
|
|
|
<?php endif; ?>
|
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-05-18 14:49:06 +02:00
|
|
|
<?= $this->qlink(
|
|
|
|
sprintf(
|
2015-02-23 17:22:07 +01:00
|
|
|
$this->translatePlural(
|
2015-05-18 14:49:06 +02:00
|
|
|
'%s comment',
|
|
|
|
'%s comments',
|
2015-02-23 17:22:07 +01:00
|
|
|
$commentCount
|
|
|
|
),
|
2015-05-18 14:49:06 +02:00
|
|
|
$commentCount
|
|
|
|
),
|
|
|
|
$commentsLink,
|
|
|
|
null,
|
|
|
|
array('data-base-target' => '_next')
|
|
|
|
); ?>
|
|
|
|
<?= $this->translate('on all selected hosts.') ?>
|
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>
|