parent
9465c3ffb6
commit
5e84ff4ac4
|
@ -123,6 +123,7 @@ class Monitoring_ShowController extends Controller
|
|||
'contact_alias',
|
||||
'contact_email',
|
||||
'contact_pager',
|
||||
'contact_object_id',
|
||||
'contact_notify_service_timeperiod',
|
||||
'contact_notify_service_recovery',
|
||||
'contact_notify_service_warning',
|
||||
|
@ -149,6 +150,20 @@ class Monitoring_ShowController extends Controller
|
|||
))->where('contact_id', $contact->contact_id);
|
||||
|
||||
$this->view->commands = $commands->paginate();
|
||||
|
||||
$notifications = $this->backend->select()->from('notification', array(
|
||||
'host',
|
||||
'service',
|
||||
'notification_output',
|
||||
'notification_contact',
|
||||
'notification_start_time',
|
||||
'notification_state'
|
||||
));
|
||||
|
||||
$notifications->where('contact_object_id', $contact->contact_object_id);
|
||||
|
||||
$this->view->compact = true;
|
||||
$this->view->notifications = $notifications->paginate();
|
||||
}
|
||||
|
||||
$this->view->contact = $contact;
|
||||
|
|
|
@ -53,6 +53,9 @@ $contactHelper = $this->getHelper('ContactFlags');
|
|||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
<h4><?= $this->translate('Notifications'); ?>:</h4>
|
||||
<?= $this->render('list/notifications.phtml') ?>
|
||||
|
||||
<?php else: ?>
|
||||
<?= $this->translate('No such contact'); ?>: <?= $contactName; ?>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -13,6 +13,7 @@ class ContactQuery extends IdoQuery
|
|||
'contact_alias' => 'c.alias COLLATE latin1_general_ci',
|
||||
'contact_email' => 'c.email_address COLLATE latin1_general_ci',
|
||||
'contact_pager' => 'c.pager_address',
|
||||
'contact_object_id' => 'c.contact_object_id',
|
||||
'contact_has_host_notfications' => 'c.host_notifications_enabled',
|
||||
'contact_has_service_notfications' => 'c.service_notifications_enabled',
|
||||
'contact_can_submit_commands' => 'c.can_submit_commands',
|
||||
|
|
|
@ -25,7 +25,8 @@ class NotificationQuery extends IdoQuery
|
|||
'service' => 'o.name2'
|
||||
),
|
||||
'contact' => array(
|
||||
'notification_contact' => 'c_o.name1'
|
||||
'notification_contact' => 'c_o.name1',
|
||||
'contact_object_id' => 'c_o.object_id'
|
||||
),
|
||||
'command' => array(
|
||||
'notification_command' => 'cmd_o.name1'
|
||||
|
|
|
@ -38,6 +38,7 @@ class Contact extends DataView
|
|||
'contact_notify_host_unreachable',
|
||||
'contact_notify_host_flapping',
|
||||
'contact_notify_host_downtime',
|
||||
'contact_object_id',
|
||||
'host_object_id',
|
||||
'host_name',
|
||||
'service_object_id',
|
||||
|
|
Loading…
Reference in New Issue