Skip to content

Commit

Permalink
show/contact: Ensure dashboard compliance
Browse files Browse the repository at this point in the history
refs #7876
  • Loading branch information
Johannes Meyer committed Apr 17, 2015
1 parent 9388944 commit 3f092ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/monitoring/application/controllers/ShowController.php
Expand Up @@ -145,9 +145,7 @@ public function contactAction()
'contact_notify_host_flapping',
'contact_notify_host_downtime',
));

$query->where('contact_name', $contactName);

$contact = $query->getQuery()->fetchRow();

if ($contact) {
Expand All @@ -171,6 +169,8 @@ public function contactAction()

$notifications->where('contact_object_id', $contact->contact_object_id);
$this->view->notifications = $notifications->paginate();
$this->setupLimitControl();
$this->setupPaginationControl($this->view->notifications);
}

$this->view->contact = $contact;
Expand Down
@@ -1,6 +1,8 @@
<?php $contactHelper = $this->getHelper('ContactFlags') ?>
<div class="controls">
<?= $this->tabs ?>
<?php if (! $this->compact): ?>
<?= $this->tabs; ?>
<?php endif ?>
<h1><?= $this->translate('Contact details') ?></h1>
<div class="circular" style="background-image: url('<?=
$this->href('static/gravatar', array('email' => $contact->contact_email))
Expand Down Expand Up @@ -54,6 +56,8 @@
</ul>
<?php endif ?>
<h1><?= $this->translate('Notifications sent to this contact') ?></h1>
<?= $this->limiter; ?>
<?= $this->paginator; ?>
</div>

<?php if (count($notifications)): ?>
Expand Down

0 comments on commit 3f092ff

Please sign in to comment.