diff --git a/Netdisco/Changes b/Netdisco/Changes index 9420b3b5..810b3cfc 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -21,9 +21,10 @@ * [#60] Incorrect format string in store_vlans (Robert Kerr) * Fix form reset icon on ports tab when using custom path (Daniel Tuecks) * Don't store failed SNMP community in the database - * [#51] Support DBD::Pg default for "host" field as local socket - * [#58] Search by VLAN name now works + * [#51] Support DBD::Pg default for "host" field as local socket (R. Kerr) + * [#58] Search by VLAN name now works (R. Kerr) * Make "Not" option work for vlan number search in Device Ports + * [#48] Fix for netmap links when domain_suffix is set (R. Kerr) 2.020002 - 2013-12-11 diff --git a/Netdisco/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm b/Netdisco/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm index 466b391c..d4706671 100644 --- a/Netdisco/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm +++ b/Netdisco/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm @@ -30,7 +30,11 @@ sub _add_children { next if exists var('seen')->{$c}; var('seen')->{$c}++; push @legit, $c; - push @{$ptr}, { name => _get_name($c), ip => $c }; + push @{$ptr}, { + name => _get_name($c), + fullname => (var('devices')->{$c} || $c), + ip => $c, + }; } for (my $i = 0; $i < @legit; $i++) { @@ -66,6 +70,7 @@ get '/ajax/data/device/netmap' => require_login sub { my %tree = ( ip => $start, name => _get_name($start), + fullname => (var('devices')->{$start} || $start), children => [], ); diff --git a/Netdisco/share/views/ajax/device/netmap.tt b/Netdisco/share/views/ajax/device/netmap.tt index 82904250..1999bfee 100644 --- a/Netdisco/share/views/ajax/device/netmap.tt +++ b/Netdisco/share/views/ajax/device/netmap.tt @@ -60,7 +60,7 @@ function to_class(name) { return 'nd_' + name.replace(/\./g, "_") } // handler for clicking on a circle - redirect to that device's netmap function circleClick(d) { - window.location = '[% uri_for('/device') %]?tab=netmap&q=' + (d.name || d.ip); + window.location = '[% uri_for('/device') %]?tab=netmap&q=' + d.fullname; } // handler for mouseover on a circle - show that device's real neighbors