From ce1b847ceabb3cb8ec6bac370071d55acd40dc48 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sat, 2 Mar 2019 18:47:44 +0000 Subject: [PATCH] fix bug showing no nodes when only one matches in netmap --- lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm b/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm index bc1e3aec..612eebc6 100644 --- a/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm +++ b/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm @@ -219,8 +219,9 @@ ajax '/ajax/data/device/netmap' => require_login sub { DEVICE: while (my $device = $devices->next) { # if in neighbors or vlan mode then use %ok_dev to filter - next DEVICE if (($mapshow eq 'neighbors') or $vlan) - and (not $ok_dev{$device->ip}); + next DEVICE if ($device->ip ne $qdev->ip) + and (($mapshow eq 'neighbors') or $vlan) + and (not $ok_dev{$device->ip}); # showing only neighbors but no link # if location picked then filter next DEVICE if ((scalar @lgrplist) and ((!defined $device->location)