mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 08:44:10 +02:00
parent
b9249dac4e
commit
2190e553be
@ -467,8 +467,10 @@ class Monitoring_ListController extends Controller
|
|||||||
if ($url = $this->hasBetterUrl()) {
|
if ($url = $this->hasBetterUrl()) {
|
||||||
return $this->redirectNow($url);
|
return $this->redirectNow($url);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->addTitleTab('comments', $this->translate('Comments'), $this->translate('List comments'));
|
$this->addTitleTab('comments', $this->translate('Comments'), $this->translate('List comments'));
|
||||||
$this->setAutorefreshInterval(12);
|
$this->setAutorefreshInterval(12);
|
||||||
|
|
||||||
$query = $this->backend->select()->from('comment', array(
|
$query = $this->backend->select()->from('comment', array(
|
||||||
'id' => 'comment_internal_id',
|
'id' => 'comment_internal_id',
|
||||||
'objecttype' => 'comment_objecttype',
|
'objecttype' => 'comment_objecttype',
|
||||||
@ -486,6 +488,8 @@ class Monitoring_ListController extends Controller
|
|||||||
$this->filterQuery($query);
|
$this->filterQuery($query);
|
||||||
$this->view->comments = $query->paginate();
|
$this->view->comments = $query->paginate();
|
||||||
|
|
||||||
|
$this->setupLimitControl();
|
||||||
|
$this->setupPaginationControl($this->view->comments);
|
||||||
$this->setupSortControl(
|
$this->setupSortControl(
|
||||||
array(
|
array(
|
||||||
'comment_timestamp' => $this->translate('Comment Timestamp'),
|
'comment_timestamp' => $this->translate('Comment Timestamp'),
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
<?php if (false === $this->compact): ?>
|
<?php if (! $this->compact): ?>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->tabs->render($this); ?>
|
<?= $this->tabs; ?>
|
||||||
<div style="margin: 1em" class="dontprint">
|
<?= $this->sortBox; ?>
|
||||||
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
|
<?= $this->limiter; ?>
|
||||||
</div>
|
<?= $this->paginator; ?>
|
||||||
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $comments->count())); ?>
|
<?= $this->filterEditor; ?>
|
||||||
<?= $this->paginationControl($comments, null, null, array('preserve' => $this->preserve)); ?>
|
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<?php if (count($comments) === 0): ?>
|
<?php
|
||||||
<?= $this->translate('No comments matching the filter'); ?>
|
|
||||||
</div>
|
|
||||||
<?php return; endif ?>
|
|
||||||
|
|
||||||
|
if (count($comments) === 0) {
|
||||||
|
echo $this->translate('No comments found matching the filter') . '</div>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
?>
|
||||||
<table data-base-target="_next" class="action comments">
|
<table data-base-target="_next" class="action comments">
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($comments as $comment): ?>
|
<?php foreach ($comments as $comment): ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user