implement cheap Inventory search until we have proper Report
This commit is contained in:
@@ -183,6 +183,8 @@ get '/search' => sub {
|
|||||||
schema('netdisco')->resultset('Device')->get_distinct('vendor')
|
schema('netdisco')->resultset('Device')->get_distinct('vendor')
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
params->{'q'} ||= '_'; # FIXME a cheat Inventory, for now
|
||||||
|
|
||||||
my $q = param('q');
|
my $q = param('q');
|
||||||
if ($q and not param('tab')) {
|
if ($q and not param('tab')) {
|
||||||
# pick most likely tab for initial results
|
# pick most likely tab for initial results
|
||||||
@@ -217,10 +219,6 @@ get '/search' => sub {
|
|||||||
params->{'tab'} ||= 'node';
|
params->{'tab'} ||= 'node';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif (not $q) {
|
|
||||||
redirect '/';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
# list of tabs
|
# list of tabs
|
||||||
var('tabs' => [
|
var('tabs' => [
|
||||||
|
|||||||
Reference in New Issue
Block a user