#24 Show device age in device search view

This commit is contained in:
Oliver Gorwits
2018-03-10 11:09:04 +00:00
parent 66e3d2d64e
commit a2269c469f
6 changed files with 39 additions and 10 deletions

View File

@@ -19,7 +19,7 @@ get '/ajax/content/search/device' => require_login sub {
if ($has_opt) {
$rs = schema('netdisco')->resultset('Device')->columns(
[ "ip", "dns", "name", "contact",
[ "ip", "dns", "name",
"location", "model", "os_ver", "serial"
]
)->with_times->search_by_field( scalar params );
@@ -29,7 +29,7 @@ get '/ajax/content/search/device' => require_login sub {
send_error( 'Missing query', 400 ) unless $q;
$rs = schema('netdisco')->resultset('Device')->columns(
[ "ip", "dns", "name", "contact",
[ "ip", "dns", "name",
"location", "model", "os_ver", "serial"
]
)->with_times->search_fuzzy($q);