diff --git a/Netdisco/lib/App/Netdisco/Web/Plugin/Search/Device.pm b/Netdisco/lib/App/Netdisco/Web/Plugin/Search/Device.pm index 596b83dd..9442ec31 100644 --- a/Netdisco/lib/App/Netdisco/Web/Plugin/Search/Device.pm +++ b/Netdisco/lib/App/Netdisco/Web/Plugin/Search/Device.pm @@ -19,13 +19,15 @@ get '/ajax/content/search/device' => require_login sub { my $set; if ($has_opt) { - $set = schema('netdisco')->resultset('Device')->search_by_field(scalar params); + $set = schema('netdisco')->resultset('Device') + ->with_times->search_by_field(scalar params); } else { my $q = param('q'); send_error('Missing query', 400) unless $q; - $set = schema('netdisco')->resultset('Device')->search_fuzzy($q); + $set = schema('netdisco')->resultset('Device') + ->with_times->search_fuzzy($q); } return unless $set->count; diff --git a/Netdisco/share/views/ajax/search/device.tt b/Netdisco/share/views/ajax/search/device.tt index 7168f9ed..4fe973a2 100644 --- a/Netdisco/share/views/ajax/search/device.tt +++ b/Netdisco/share/views/ajax/search/device.tt @@ -9,6 +9,7 @@ OS Version Management IP Serial + Last Discovered @@ -22,6 +23,7 @@ [% row.os_ver | html_entity %] [% row.ip | html_entity %] [% row.serial | html_entity %] + [% row.last_discover_stamp | html_entity %] [% END %]