diff --git a/app/Http/Controllers/Table/DeviceController.php b/app/Http/Controllers/Table/DeviceController.php index e74b96fa91..fce0d03a29 100644 --- a/app/Http/Controllers/Table/DeviceController.php +++ b/app/Http/Controllers/Table/DeviceController.php @@ -67,7 +67,7 @@ class DeviceController extends TableController protected function searchFields($request) { - return ['sysName', 'hostname', 'hardware', 'os', 'locations.location']; + return ['sysName', 'hostname', 'display', 'hardware', 'os', 'locations.location']; } protected function sortFields($request) diff --git a/includes/html/pages/devices.inc.php b/includes/html/pages/devices.inc.php index 6aa0becc21..55f83198c8 100644 --- a/includes/html/pages/devices.inc.php +++ b/includes/html/pages/devices.inc.php @@ -133,8 +133,8 @@ if ($format == 'graph') { } if (! empty($vars['searchquery'])) { - $where .= ' AND (sysName LIKE ? OR hostname LIKE ? OR hardware LIKE ? OR os LIKE ? OR location LIKE ?)'; - $sql_param += array_fill(count($param), 5, '%' . $vars['searchquery'] . '%'); + $where .= ' AND (sysName LIKE ? OR hostname LIKE ? OR display LIKE ? OR hardware LIKE ? OR os LIKE ? OR location LIKE ?)'; + $sql_param += array_fill(count($param), 6, '%' . $vars['searchquery'] . '%'); } if (! empty($vars['os'])) { $where .= ' AND os = ?'; @@ -344,7 +344,7 @@ if ($format == 'graph') { }, post: function () { return { - format: ' ', + format: '', searchPhrase: '', os: '', version: '', @@ -372,7 +372,7 @@ if ($format == 'graph') { "