Port filter supports basic */?/%/_ wildcards (closes #25)
This commit is contained in:
1
Changes
1
Changes
@@ -6,6 +6,7 @@
|
||||
* Typeahead on the main navbar search (for devices only)
|
||||
* Support for have_nodeip_dns_col setting (closes #14)
|
||||
* Set focus to navbar search on initial login or when changing to home (closes #24)
|
||||
* Port filter supports basic */?/%/_ wildcards (closes #25)
|
||||
|
||||
[ENHANCEMENTS]
|
||||
|
||||
|
||||
@@ -113,6 +113,10 @@ ajax '/ajax/content/device/ports' => sub {
|
||||
return unless $set->count;
|
||||
}
|
||||
else {
|
||||
$q =~ s/\*/%/g if index($q, '*') >= 0;
|
||||
$q =~ s/\?/_/g if index($q, '?') >= 0;
|
||||
$q = { '-ilike' => $q };
|
||||
|
||||
if ($set->search({'me.port' => $q})->count) {
|
||||
$set = $set->search({'me.port' => $q});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user