diff --git a/library/Icinga/Web/Widget/FilterEditor.php b/library/Icinga/Web/Widget/FilterEditor.php index bf933ed52..115fb1790 100644 --- a/library/Icinga/Web/Widget/FilterEditor.php +++ b/library/Icinga/Web/Widget/FilterEditor.php @@ -235,7 +235,7 @@ class FilterEditor extends AbstractWidget $filter = $this->mergeRootExpression($filter, trim($k), '=', ltrim($v)); } else { if ($this->searchColumns === null && $this->query instanceof FilterColumns) { - $this->searchColumns = $this->query->getSearchColumns(); + $this->searchColumns = $this->query->getSearchColumns($search); } if (! empty($this->searchColumns)) { diff --git a/modules/monitoring/library/Monitoring/DataView/Hoststatus.php b/modules/monitoring/library/Monitoring/DataView/Hoststatus.php index f2fe139ec..582ac21ca 100644 --- a/modules/monitoring/library/Monitoring/DataView/Hoststatus.php +++ b/modules/monitoring/library/Monitoring/DataView/Hoststatus.php @@ -81,9 +81,15 @@ class HostStatus extends DataView /** * {@inheritdoc} */ - public function getSearchColumns() + public function getSearchColumns($search = null) { - return array('host_display_name'); + if ($search !== null + && (@inet_pton($search) !== false || preg_match('/^\d{1,3}\.\d{1,3}\./', $search)) + ) { + return array('host', 'host_address', 'host_address6'); + } else { + return array('host', 'host_display_name'); + } } /** diff --git a/modules/monitoring/library/Monitoring/DataView/Servicestatus.php b/modules/monitoring/library/Monitoring/DataView/Servicestatus.php index ff63e8604..9cd3be344 100644 --- a/modules/monitoring/library/Monitoring/DataView/Servicestatus.php +++ b/modules/monitoring/library/Monitoring/DataView/Servicestatus.php @@ -170,6 +170,6 @@ class ServiceStatus extends DataView */ public function getSearchColumns() { - return array('host_display_name', 'service_display_name'); + return array('service', 'service_display_name'); } }