mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 15:24:05 +02:00
monitoring: Use descriptive variable names in commentsAction()
This commit is contained in:
parent
aefb5cfe08
commit
975230d116
@ -385,12 +385,20 @@ class ListController extends Controller
|
|||||||
$this->view->groupData = $groupData;
|
$this->view->groupData = $groupData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List all comments
|
||||||
|
*/
|
||||||
public function commentsAction()
|
public function commentsAction()
|
||||||
{
|
{
|
||||||
$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(
|
$comments = $this->backend->select()->from('comment', array(
|
||||||
'id' => 'comment_internal_id',
|
'id' => 'comment_internal_id',
|
||||||
'objecttype' => 'object_type',
|
'objecttype' => 'object_type',
|
||||||
'comment' => 'comment_data',
|
'comment' => 'comment_data',
|
||||||
@ -404,12 +412,11 @@ class ListController extends Controller
|
|||||||
'host_display_name',
|
'host_display_name',
|
||||||
'service_display_name'
|
'service_display_name'
|
||||||
));
|
));
|
||||||
$this->applyRestriction('monitoring/filter/objects', $query);
|
$this->applyRestriction('monitoring/filter/objects', $comments);
|
||||||
$this->filterQuery($query);
|
$this->filterQuery($comments);
|
||||||
$this->view->comments = $query;
|
|
||||||
|
|
||||||
|
$this->setupPaginationControl($comments);
|
||||||
$this->setupLimitControl();
|
$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'),
|
||||||
@ -418,9 +425,11 @@ class ListController extends Controller
|
|||||||
'comment_type' => $this->translate('Comment Type'),
|
'comment_type' => $this->translate('Comment Type'),
|
||||||
'comment_expiration' => $this->translate('Expiration')
|
'comment_expiration' => $this->translate('Expiration')
|
||||||
),
|
),
|
||||||
$query
|
$comments
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$this->view->comments = $comments;
|
||||||
|
|
||||||
if ($this->Auth()->hasPermission('monitoring/command/comment/delete')) {
|
if ($this->Auth()->hasPermission('monitoring/command/comment/delete')) {
|
||||||
$this->view->delCommentForm = new DeleteCommentCommandForm();
|
$this->view->delCommentForm = new DeleteCommentCommandForm();
|
||||||
$this->view->delCommentForm->handleRequest();
|
$this->view->delCommentForm->handleRequest();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user