diff --git a/Netdisco/Changes b/Netdisco/Changes index 36004b67..717fc08f 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -4,6 +4,10 @@ * netdisco-sshcollector script to get ARP data on devices without SNMP (C. Ramseyer) + [ENHANCEMENTS] + + * Port search also searches on the Remote ID and Type + 2.029005 - 2014-08-13 [ENHANCEMENTS] diff --git a/Netdisco/lib/App/Netdisco/Web/Plugin/Search/Port.pm b/Netdisco/lib/App/Netdisco/Web/Plugin/Search/Port.pm index eb1c38fb..37ab2f75 100644 --- a/Netdisco/lib/App/Netdisco/Web/Plugin/Search/Port.pm +++ b/Netdisco/lib/App/Netdisco/Web/Plugin/Search/Port.pm @@ -37,6 +37,8 @@ get '/ajax/content/search/port' => require_login sub { ? { "me.mac" => $q } : \[ 'me.mac::text ILIKE ?', $likeval ] ), + { "me.remote_id" => $likeclause }, + { "me.remote_type" => $likeclause }, ] }, { '+columns' => [qw/ device.dns device.name port_vlans.vlan /], diff --git a/Netdisco/share/views/ajax/search/port.tt b/Netdisco/share/views/ajax/search/port.tt index a4fbed26..c71520a1 100644 --- a/Netdisco/share/views/ajax/search/port.tt +++ b/Netdisco/share/views/ajax/search/port.tt @@ -32,7 +32,9 @@ $(document).ready(function() { if (row.device.dns || row.device.name) { ddns = ' (' + he.encode(row.device.dns || row.device.name) + ')'; } - return '' + he.encode(data) + '[' + he.encode(row.port) + ']' + ddns; + return '' + he.encode(data) + + ' [' + he.encode(row.port) + ']' + ddns; } }, { "data": 'descr',