navbar_autocomplete config item to disable main navbar autocomplete

This commit is contained in:
Oliver Gorwits
2014-08-08 23:16:18 +01:00
parent 1e58a045d4
commit cb9667f58c
4 changed files with 10 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
* Support for stuffing other locations into @INC at runtime
* New netdisco-do command "show" for diagnostic reporting
* Additional debug levels for netdisco-do to show DBIx::Class and net-snmp
* [#107] navbar_autocomplete config item to disable main navbar autocomplete
[ENHANCEMENTS]

View File

@@ -103,6 +103,12 @@ database:
netdisco=> update users set port_control = true where username = 'guest';
netdisco=> update users set admin = true where username = 'guest';
=head3 C<navbar_autocomplete>
Value: Boolean. Default: C<true>.
Set this to C<false> to disable the device autocomplete in the main navbar.
=head3 C<suggest_guest>
Value: Boolean. Default: C<false>.

View File

@@ -8,6 +8,8 @@ use Dancer::Plugin::Auth::Extensible;
use App::Netdisco::Util::Web (); # for sort_port
ajax '/ajax/data/devicename/typeahead' => require_login sub {
return '[]' unless setting('navbar_autocomplete');
my $q = param('query') || param('term');
my $set = schema('netdisco')->resultset('Device')->search_fuzzy($q);

View File

@@ -20,6 +20,7 @@ include_paths: []
domain_suffix: ""
no_auth: false
suggest_guest: false
navbar_autocomplete: true
trust_remote_user: false
trust_x_remote_user: false
#ldap: