Show all subnets (scrollable), and sort, in sidebar Prefix search
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
* Try to make the Job Queue page a little faster
|
||||
* Require the Net::LDAP module for all installs
|
||||
* Move system information to the Netdisco "home" page
|
||||
* Show all subnets (scrollable), and sort, in sidebar Prefix search
|
||||
|
||||
[BUG FIXES]
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ ajax '/ajax/data/subnet/typeahead' => require_login sub {
|
||||
$q = "$q\%" if $q !~ m/\%/;
|
||||
my $nets = schema('netdisco')->resultset('Subnet')->search(
|
||||
{ 'me.net::text' => { '-ilike' => $q }},
|
||||
{ columns => ['net'] } );
|
||||
{ columns => ['net'], order_by => 'net' } );
|
||||
|
||||
content_type 'application/json';
|
||||
to_json [map {$_->net} $nets->all];
|
||||
|
||||
@@ -43,14 +43,13 @@
|
||||
});
|
||||
|
||||
// activate typeahead on prefix/subnet box
|
||||
$('#nd_ipinventory-subnet').typeahead({
|
||||
source: function (query, process) {
|
||||
return $.get( uri_base + '/ajax/data/subnet/typeahead', { query: query }, function (data) {
|
||||
return process(data);
|
||||
$('#nd_ipinventory-subnet').autocomplete({
|
||||
source: function (request, response) {
|
||||
return $.get( uri_base + '/ajax/data/subnet/typeahead', request, function (data) {
|
||||
return response(data);
|
||||
});
|
||||
}
|
||||
,matcher: function () { return true; } // trust backend
|
||||
,delay: 250
|
||||
,delay: 150
|
||||
,minLength: 3
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user