= $this->translate('Downtimes'); ?> |
hasPermission('monitoring/command/downtime/schedule')) {
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
if ($object->getType() === $object::TYPE_HOST) {
echo $this->qlink(
$this->translate('Schedule downtime'),
'monitoring/host/schedule-downtime',
array('host' => $object->getName()),
array(
'icon' => 'plug',
'data-base-target' => '_self',
'title' => $this->translate(
'Schedule a downtime to suppress all problem notifications within a specific period of time'
)
)
);
} else {
echo $this->qlink(
$this->translate('Schedule downtime'),
'monitoring/service/schedule-downtime',
array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
array(
'icon' => 'plug',
'data-base-target' => '_self',
'title' => $this->translate(
'Schedule a downtime to suppress all problem notifications within a specific period of time'
)
)
);
}
} else {
echo '-';
} ?>
|
downtimes as $downtime) {
// Ticket hook sample
$commentText = $this->tickets ? preg_replace_callback(
$this->tickets->getPattern(),
array($this->tickets, 'createLink'),
$this->escape($downtime->comment)
) : $this->escape($downtime->comment);
if ((bool) $downtime->is_in_effect) {
$state = 'in downtime since ';
$time = $this->timeSince($downtime->start);
} else {
if ((bool) $downtime->is_fixed) {
$state = 'scheduled ';
$time = $this->timeUntil($downtime->start);
} else {
$state = 'scheduled flexible ';
$time = $this->timeUntil($downtime->start);
}
}
?>
= $this->escape($downtime->author_name); ?> |
populate(
array(
'downtime_id' => $downtime->id,
'downtime_is_service' => $object->getType() === $object::TYPE_SERVICE
)
);
echo $delDowntimeForm;
} ?>
= $this->translate('Downtime'); ?>
=
$this->qlink(
$state,
'monitoring/downtime/show',
array('downtime_id' => $downtime->id),
array('data-base-target' => '_next')
) . $time ; ?> - = str_replace(array('\r\n', '\n'), ' ', $commentText); ?>
|