device port search will match on Description as well as Port

This commit is contained in:
Oliver Gorwits
2018-05-07 17:34:13 +01:00
parent 6098b893ad
commit d7a0bec20b
2 changed files with 3 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
* #408 improvements to MakeRancidConf (earendilfr) * #408 improvements to MakeRancidConf (earendilfr)
* #410 improvements to Undiscovered Neighbors report * #410 improvements to Undiscovered Neighbors report
* device port search will match on Description as well as Port
2.039028 - 2018-05-05 2.039028 - 2018-05-05

View File

@@ -63,11 +63,12 @@ get '/ajax/content/device/ports' => require_login sub {
} }
if (($prefer eq 'port') or not $prefer and if (($prefer eq 'port') or not $prefer and
$set->search({'me.port' => $f})->count) { $set->search({-or => ['me.port' => $f, 'me.descr' => $f]})->count) {
$set = $set->search({ $set = $set->search({
-or => [ -or => [
'me.port' => $f, 'me.port' => $f,
'me.descr' => $f,
'me.slave_of' => $f, 'me.slave_of' => $f,
], ],
}); });