navbar_autocomplete config item to disable main navbar autocomplete
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
@@ -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>.
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user