From 5a3401cc28c579214fcfa0a9e4ac90827f26a6c9 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 31 Jul 2015 15:15:13 +0200 Subject: [PATCH] monitoring: Reduce amount of default quick search columns Entering an arbitrary pattern in the quick search field will now only search for a host's and service's display name or a group's / contact's alias. fixes #9751 --- .../monitoring/library/Monitoring/DataView/Comment.php | 2 +- .../monitoring/library/Monitoring/DataView/Contact.php | 10 +--------- .../library/Monitoring/DataView/Contactgroup.php | 2 +- .../library/Monitoring/DataView/Downtime.php | 2 +- .../library/Monitoring/DataView/Eventhistory.php | 2 +- .../library/Monitoring/DataView/Hostgroupsummary.php | 2 +- .../library/Monitoring/DataView/Hoststatus.php | 2 +- .../library/Monitoring/DataView/Notification.php | 2 +- .../Monitoring/DataView/Servicegroupsummary.php | 2 +- .../library/Monitoring/DataView/Servicestatus.php | 2 +- 10 files changed, 10 insertions(+), 18 deletions(-) diff --git a/modules/monitoring/library/Monitoring/DataView/Comment.php b/modules/monitoring/library/Monitoring/DataView/Comment.php index 18d518bd3..9b3be8061 100644 --- a/modules/monitoring/library/Monitoring/DataView/Comment.php +++ b/modules/monitoring/library/Monitoring/DataView/Comment.php @@ -62,7 +62,7 @@ class Comment extends DataView */ public function getSearchColumns() { - return array('host', 'host_display_name', 'service', 'service_display_name', 'comment_author'); + return array('host_display_name', 'service_display_name'); } /** diff --git a/modules/monitoring/library/Monitoring/DataView/Contact.php b/modules/monitoring/library/Monitoring/DataView/Contact.php index 42c6806ac..d64a80e86 100644 --- a/modules/monitoring/library/Monitoring/DataView/Contact.php +++ b/modules/monitoring/library/Monitoring/DataView/Contact.php @@ -79,14 +79,6 @@ class Contact extends DataView */ public function getSearchColumns() { - return array( - 'contact', - 'contact_alias', - 'contact_email', - 'host', - 'host_display_name', - 'service', - 'service_display_name' - ); + return array('contact_alias'); } } diff --git a/modules/monitoring/library/Monitoring/DataView/Contactgroup.php b/modules/monitoring/library/Monitoring/DataView/Contactgroup.php index 4e5684d43..8560b55fb 100644 --- a/modules/monitoring/library/Monitoring/DataView/Contactgroup.php +++ b/modules/monitoring/library/Monitoring/DataView/Contactgroup.php @@ -84,6 +84,6 @@ class Contactgroup extends DataView */ public function getSearchColumns() { - return array('contactgroup', 'contactgroup_alias', 'contact', 'contact_alias', 'contact_email'); + return array('contactgroup_alias'); } } diff --git a/modules/monitoring/library/Monitoring/DataView/Downtime.php b/modules/monitoring/library/Monitoring/DataView/Downtime.php index c5324a22d..767fc577d 100644 --- a/modules/monitoring/library/Monitoring/DataView/Downtime.php +++ b/modules/monitoring/library/Monitoring/DataView/Downtime.php @@ -69,7 +69,7 @@ class Downtime extends DataView */ public function getSearchColumns() { - return array('downtime_author', 'host', 'host_display_name', 'service', 'service_display_name'); + return array('host_display_name', 'service_display_name'); } /** diff --git a/modules/monitoring/library/Monitoring/DataView/Eventhistory.php b/modules/monitoring/library/Monitoring/DataView/Eventhistory.php index ad6c384cb..a99790a38 100644 --- a/modules/monitoring/library/Monitoring/DataView/Eventhistory.php +++ b/modules/monitoring/library/Monitoring/DataView/Eventhistory.php @@ -72,6 +72,6 @@ class EventHistory extends DataView */ public function getSearchColumns() { - return array('host', 'host_display_name', 'service', 'service_display_name', 'type'); + return array('host_display_name', 'service_display_name'); } } diff --git a/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php b/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php index 9fd58fc31..7f10d072e 100644 --- a/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php +++ b/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php @@ -60,7 +60,7 @@ class Hostgroupsummary extends DataView */ public function getSearchColumns() { - return array('host', 'host_display_name', 'hostgroup', 'hostgroup_alias'); + return array('hostgroup_alias'); } /** diff --git a/modules/monitoring/library/Monitoring/DataView/Hoststatus.php b/modules/monitoring/library/Monitoring/DataView/Hoststatus.php index a9d6be771..9c2848618 100644 --- a/modules/monitoring/library/Monitoring/DataView/Hoststatus.php +++ b/modules/monitoring/library/Monitoring/DataView/Hoststatus.php @@ -84,7 +84,7 @@ class HostStatus extends DataView */ public function getSearchColumns() { - return array('host', 'host_display_name'); + return array('host_display_name'); } /** diff --git a/modules/monitoring/library/Monitoring/DataView/Notification.php b/modules/monitoring/library/Monitoring/DataView/Notification.php index 7f17769b8..5c2500843 100644 --- a/modules/monitoring/library/Monitoring/DataView/Notification.php +++ b/modules/monitoring/library/Monitoring/DataView/Notification.php @@ -90,6 +90,6 @@ class Notification extends DataView */ public function getSearchColumns() { - return array('contact', 'host', 'host_display_name', 'service', 'service_display_name'); + return array('host_display_name', 'service_display_name'); } } diff --git a/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php b/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php index 39fa74932..205aa56de 100644 --- a/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php +++ b/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php @@ -55,7 +55,7 @@ class Servicegroupsummary extends DataView */ public function getSearchColumns() { - return array('service', 'service_display_name', 'servicegroup', 'servicegroup_alias'); + return array('servicegroup_alias'); } /** diff --git a/modules/monitoring/library/Monitoring/DataView/Servicestatus.php b/modules/monitoring/library/Monitoring/DataView/Servicestatus.php index 10d65c48a..a4516a93a 100644 --- a/modules/monitoring/library/Monitoring/DataView/Servicestatus.php +++ b/modules/monitoring/library/Monitoring/DataView/Servicestatus.php @@ -191,6 +191,6 @@ class ServiceStatus extends DataView */ public function getSearchColumns() { - return array('host', 'host_display_name', 'service', 'service_display_name'); + return array('host_display_name', 'service_display_name'); } }