Skip to content

Commit

Permalink
monitoring: Fix link to an object's contact in the detail views
Browse files Browse the repository at this point in the history
  • Loading branch information
lippserd committed Oct 7, 2014
1 parent f954e8c commit 2126b8c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 29 deletions.
Expand Up @@ -5,7 +5,7 @@ if (! empty($object->contacts)) {
$list = array();
foreach ($object->contacts as $contact) {
$list[] = $this->qlink($contact->contact_alias, 'monitoring/show/contact', array(
'contact_name' => $contact->contact_name
'contact' => $contact->contact_name
));
}

Expand All @@ -24,7 +24,7 @@ if (! empty($object->contactgroups)) {
$list[] = $this->qlink(
$contactgroup->contactgroup_alias,
'monitoring/list/contactgroups',
array('contactgroup_name' => $contactgroup->contactgroup_name)
array('contactgroup' => $contactgroup->contactgroup_name)
);
}

Expand Down
Expand Up @@ -8,39 +8,39 @@ class ContactgroupQuery extends IdoQuery
{
protected $columnMap = array(
'contactgroups' => array(
'contactgroup_name' => 'cgo.name1 COLLATE latin1_general_ci',
'contactgroup_alias' => 'cg.alias',
'contactgroup' => 'cgo.name1 COLLATE latin1_general_ci',
'contactgroup_name' => 'cgo.name1 COLLATE latin1_general_ci',
'contactgroup_alias' => 'cg.alias',
),
'contacts' => array(
'contact_name' => 'co.name1 COLLATE latin1_general_ci',
'contact_alias' => 'c.alias',
'contact_email' => 'c.email_address',
'contact_pager' => 'c.pager_address',
'contact_has_host_notfications' => 'c.host_notifications_enabled',
'contact_has_service_notfications' => 'c.service_notifications_enabled',
'contact_can_submit_commands' => 'c.can_submit_commands',
'contact_notify_service_recovery' => 'c.notify_service_recovery',
'contact_notify_service_warning' => 'c.notify_service_warning',
'contact_notify_service_critical' => 'c.notify_service_critical',
'contact_notify_service_unknown' => 'c.notify_service_unknown',
'contact_notify_service_flapping' => 'c.notify_service_flapping',
'contact_notify_service_downtime' => 'c.notify_service_recovery',
'contact_notify_host_recovery' => 'c.notify_host_recovery',
'contact_notify_host_down' => 'c.notify_host_down',
'contact_notify_host_unreachable' => 'c.notify_host_unreachable',
'contact_notify_host_flapping' => 'c.notify_host_flapping',
'contact_notify_host_downtime' => 'c.notify_host_downtime',
'contact' => 'co.name1 COLLATE latin1_general_ci',
'contact_name' => 'co.name1 COLLATE latin1_general_ci',
'contact_alias' => 'c.alias',
'contact_email' => 'c.email_address',
'contact_pager' => 'c.pager_address',
'contact_has_host_notfications' => 'c.host_notifications_enabled',
'contact_has_service_notfications' => 'c.service_notifications_enabled',
'contact_can_submit_commands' => 'c.can_submit_commands',
'contact_notify_service_recovery' => 'c.notify_service_recovery',
'contact_notify_service_warning' => 'c.notify_service_warning',
'contact_notify_service_critical' => 'c.notify_service_critical',
'contact_notify_service_unknown' => 'c.notify_service_unknown',
'contact_notify_service_flapping' => 'c.notify_service_flapping',
'contact_notify_service_downtime' => 'c.notify_service_recovery',
'contact_notify_host_recovery' => 'c.notify_host_recovery',
'contact_notify_host_down' => 'c.notify_host_down',
'contact_notify_host_unreachable' => 'c.notify_host_unreachable',
'contact_notify_host_flapping' => 'c.notify_host_flapping',
'contact_notify_host_downtime' => 'c.notify_host_downtime',
),
'hosts' => array(
'host_object_id' => 'ho.object_id',
'host_name' => 'ho.name1',
'host' => 'ho.name1'
'host' => 'ho.name1',
'host_name' => 'ho.name1'
),
'services' => array(
'service_object_id' => 'so.object_id',
'service_host_name' => 'so.name1 COLLATE latin1_general_ci',
'service' => 'so.name2 COLLATE latin1_general_ci',
'service_description' => 'so.name2 COLLATE latin1_general_ci',
'service' => 'so.name2 COLLATE latin1_general_ci',
'service_description' => 'so.name2 COLLATE latin1_general_ci',
'service_host_name' => 'so.name1 COLLATE latin1_general_ci'
)
);

Expand Down
1 change: 1 addition & 0 deletions modules/monitoring/library/Monitoring/DataView/Contact.php
Expand Up @@ -18,6 +18,7 @@ class Contact extends DataView
public function getColumns()
{
return array(
'contact',
'contact_name',
'contact_alias',
'contact_email',
Expand Down
Expand Up @@ -18,7 +18,9 @@ class Contactgroup extends DataView
public function getColumns()
{
return array(
'contact',
'contact_name',
'contactgroup',
'contactgroup_name',
'contactgroup_alias',
'host',
Expand Down

0 comments on commit 2126b8c

Please sign in to comment.