fix bug in empty search and add POD note about empty search

This commit is contained in:
Oliver Gorwits
2012-01-18 22:19:34 +00:00
parent d88484f85d
commit a612068143
2 changed files with 11 additions and 2 deletions

View File

@@ -123,7 +123,7 @@ ajax '/ajax/content/search/node' => sub {
->by_ip(param('archived'), $node);
}
}
return unless $set->count;
return unless $set and $set->count;
template 'ajax/search/node_by_ip.tt', {
results => $set,

View File

@@ -84,7 +84,12 @@ called C<dns> then uncomment the two indicated lines in C<NodeIP.pm>.
Remember you can disable authentication by changing a setting in the
configuration file, as explained above.
=head1 RATIONALE
=head1 FUTURE WORK
At the moment the ability to just hit Enter in the title-bar Search is a
I<hack> because there's no other way to list all Inventory. When the Reports
code is added, the Inventory will be a part of that. It's understood that
simply hitting enter should return no results, not all results.
The intention is to support "plugins" for additonal features, most notably
columns in the Device Port listing, but also new menu items and tabs. The
@@ -109,6 +114,10 @@ mismatches). These might be implemented as a plugin bundle.
The Wireless, IP Phone and NetBIOS Node properies are not yet shown.
When running the standalone built-in web server, it will occasionally
start to die on you. This usually manifests as returning page content
but no stylesheet. Restarting the server is the best solution.
=head1 COPYRIGHT AND LICENCE
Copyright (c) 2012, The Netdisco Developer Team.