67 lines
2.3 KiB
PHTML
67 lines
2.3 KiB
PHTML
<?php
|
|
|
|
/** @var Zend_View_Helper_CommandForm $cf */
|
|
$cf = $this->getHelper('CommandForm');
|
|
|
|
$data = array('host' => $object->host_name);
|
|
if ($object->service_description) {
|
|
$data['service'] = $object->service_description;
|
|
}
|
|
|
|
?>
|
|
<div>
|
|
<div class="panel-heading">
|
|
<div class="panel-hostname">
|
|
Comments
|
|
<?php
|
|
?>
|
|
<div class="pull-right">
|
|
<a rel="tooltip" title="Add a comment" href="<?= $this->href('monitoring/command/addComment', $data) ?>" class="btn-common btn-small button"><?=
|
|
$this->img('img/icons/comment.png')
|
|
?></a>
|
|
<a rel="tooltip" title="Send custom notification" href="<?= $this->href('monitoring/command/sendCustomNotification', $data
|
|
) ?>" class="btn-common btn-small button">
|
|
<?= $this->img('img/icons/notification.png') ?>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr class="separator" />
|
|
<div class="panel-body">
|
|
<table class="table table-condensed table-detail">
|
|
<tbody>
|
|
<?php if (empty($object->comments)): ?>
|
|
<tr>
|
|
<td>No comments</td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<?php foreach ($object->comments as $comment): ?>
|
|
<tr>
|
|
<td>
|
|
<div class="pull-right">
|
|
<?php
|
|
$deleteData = $data;
|
|
$deleteData['commentid'] = $comment->comment_internal_id;
|
|
|
|
echo $cf->iconSubmitForm(
|
|
'img/icons/remove.png',
|
|
'Remove comment',
|
|
'btn-small',
|
|
'removecomment',
|
|
$deleteData
|
|
);
|
|
?>
|
|
</div>
|
|
<?= $this->escape($comment->comment_author); ?>, <?= $comment->comment_type; ?>
|
|
(<?= $this->format()->timeSince($comment->comment_timestamp); ?>)
|
|
<div class="small-row">
|
|
<?= $this->escape($comment->comment_data); ?>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|