implement cheap Inventory search until we have proper Report

This commit is contained in:
Oliver Gorwits
2012-01-15 19:00:56 +00:00
parent ac17c57d81
commit 7210df4e17

View File

@@ -183,6 +183,8 @@ get '/search' => sub {
schema('netdisco')->resultset('Device')->get_distinct('vendor')
]);
params->{'q'} ||= '_'; # FIXME a cheat Inventory, for now
my $q = param('q');
if ($q and not param('tab')) {
# pick most likely tab for initial results
@@ -217,10 +219,6 @@ get '/search' => sub {
params->{'tab'} ||= 'node';
}
}
elsif (not $q) {
redirect '/';
return;
}
# list of tabs
var('tabs' => [