diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 123ec053b..cd0a734ef 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -350,8 +350,8 @@ class Monitoring_ListController extends Controller $query = $this->backend->select()->from('contact', array( 'contact_name', 'contact_id', - 'contact_alias_name', - 'contact_email_address', + 'contact_alias', + 'contact_email', 'contact_pager', 'contact_notify_service_timeperiod', 'contact_notify_service_recovery', @@ -365,18 +365,18 @@ class Monitoring_ListController extends Controller 'contact_notify_host_down', 'contact_notify_host_unreachable', 'contact_notify_host_flapping', - 'contact_notify_host_downtime' + 'contact_notify_host_downtime', )); $this->filterQuery($query); $this->view->contacts = $query->paginate(); $this->setupSortControl(array( - 'contact_name' => $this->translate('Name'), - 'contact_alias_name' => $this->translate('Alias'), - 'contact_email_address' => $this->translate('Email'), - 'contact_pager' => $this->translate('Pager Address / Number'), + 'contact_name' => $this->translate('Name'), + 'contact_alias' => $this->translate('Alias'), + 'contact_email' => $this->translate('Email'), + 'contact_pager' => $this->translate('Pager Address / Number'), 'contact_notify_service_timeperiod' => $this->translate('Service Notification Timeperiod'), - 'contact_notify_host_timeperiod' => $this->translate('Host Notification Timeperiod') + 'contact_notify_host_timeperiod' => $this->translate('Host Notification Timeperiod') )); } diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index 1a8504d73..f41811297 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -124,8 +124,8 @@ class Monitoring_ShowController extends Controller $query = $this->backend->select()->from('contact', array( 'contact_name', 'contact_id', - 'contact_alias_name', - 'contact_email_address', + 'contact_alias', + 'contact_email', 'contact_pager', 'contact_object_id', 'contact_notify_service_timeperiod', @@ -140,7 +140,7 @@ class Monitoring_ShowController extends Controller 'contact_notify_host_down', 'contact_notify_host_unreachable', 'contact_notify_host_flapping', - 'contact_notify_host_downtime' + 'contact_notify_host_downtime', )); $query->where('contact_name', $contactName); diff --git a/modules/monitoring/application/views/scripts/list/contacts.phtml b/modules/monitoring/application/views/scripts/list/contacts.phtml index b321d8e85..80405f7c6 100644 --- a/modules/monitoring/application/views/scripts/list/contacts.phtml +++ b/modules/monitoring/application/views/scripts/list/contacts.phtml @@ -14,19 +14,19 @@ } foreach ($contacts as $contact): ?>
- img('/static/gravatar', array('email' => $contact->contact_email_address)); ?> + img('/static/gravatar', array('email' => $contact->contact_email)); ?> qlink( $contact->contact_name, 'monitoring/show/contact', array('contact_name' => $contact->contact_name), array('title' => sprintf( $this->translate('Show detailed information about %s'), - $contact->contact_alias_name + $contact->contact_alias )) - ); ?> (contact_alias_name; ?>) + ); ?> (contact_alias; ?>)
- translate('Email'); ?>: - escape($contact->contact_email_address); ?> + translate('Email'); ?>: + escape($contact->contact_email); ?>
contact_pager): ?> diff --git a/modules/monitoring/application/views/scripts/show/components/contacts.phtml b/modules/monitoring/application/views/scripts/show/components/contacts.phtml index bad1d9cd3..f445e10d1 100644 --- a/modules/monitoring/application/views/scripts/show/components/contacts.phtml +++ b/modules/monitoring/application/views/scripts/show/components/contacts.phtml @@ -5,10 +5,10 @@ if (! empty($object->contacts)) { $list = array(); foreach ($object->contacts as $contact) { $list[] = $this->qlink( - $contact->contact_alias_name, + $contact->contact_alias, 'monitoring/show/contact', array('contact_name' => $contact->contact_name), - array('title' => sprintf($this->translate('Show detailed information about %s'), $contact->contact_alias_name)) + array('title' => sprintf($this->translate('Show detailed information about %s'), $contact->contact_alias)) ); } diff --git a/modules/monitoring/application/views/scripts/show/contact.phtml b/modules/monitoring/application/views/scripts/show/contact.phtml index 0b07edd89..c4142707a 100644 --- a/modules/monitoring/application/views/scripts/show/contact.phtml +++ b/modules/monitoring/application/views/scripts/show/contact.phtml @@ -3,7 +3,7 @@ tabs ?>

translate('Contact details') ?>

@@ -15,14 +15,14 @@ - escape($contact->contact_alias_name) ?> (contact_name ?>) + escape($contact->contact_alias) ?> (contact_name ?>) -contact_email_address): ?> +contact_email): ?> translate('Email') ?> - - escape($contact->contact_email_address); ?> + + escape($contact->contact_email); ?> diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactQuery.php index ce00b6151..3d23b8947 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactQuery.php @@ -10,10 +10,8 @@ class ContactQuery extends IdoQuery 'contact_id' => 'c.contact_id', 'contact' => 'co.name1 COLLATE latin1_general_ci', 'contact_name' => 'co.name1', - 'alias' => 'c.alias COLLATE latin1_general_ci', - 'contact_alias_name' => 'c.alias', - 'email' => 'c.email_address COLLATE latin1_general_ci', - 'contact_email_address' => 'c.email_address', + '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', diff --git a/modules/monitoring/library/Monitoring/DataView/Contact.php b/modules/monitoring/library/Monitoring/DataView/Contact.php index 3a364b968..fdc32e8be 100644 --- a/modules/monitoring/library/Monitoring/DataView/Contact.php +++ b/modules/monitoring/library/Monitoring/DataView/Contact.php @@ -17,8 +17,8 @@ class Contact extends DataView { return array( 'contact_name', - 'contact_alias_name', - 'contact_email_address', + 'contact_alias', + 'contact_email', 'contact_pager', 'contact_notify_hosts', 'contact_notify_services', @@ -53,7 +53,7 @@ class Contact extends DataView public function getSortRules() { return array( - 'contact_alias_name' => array( + 'contact_alias' => array( 'order' => self::SORT_DESC ) ); diff --git a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php index 173fd88fa..c33e1be2d 100644 --- a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php +++ b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php @@ -185,10 +185,10 @@ abstract class MonitoredObject implements Filterable $this->contacts = array(); foreach (preg_split('~,~', $this->properties->host_contacts) as $contact) { $this->contacts[] = (object) array( - 'contact_name' => $contact, - 'contact_alias_name' => $contact, - 'contact_email_address' => null, - 'contact_pager' => null + 'contact_name' => $contact, + 'contact_alias' => $contact, + 'contact_email' => null, + 'contact_pager' => null, ); } } @@ -385,9 +385,9 @@ abstract class MonitoredObject implements Filterable $contacts = $this->backend->select()->from('contact', array( 'contact_name', - 'contact_alias_name', - 'contact_email_address', - 'contact_pager' + 'contact_alias', + 'contact_email', + 'contact_pager', )); if ($this->type === self::TYPE_SERVICE) { $contacts