diff --git a/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm b/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm index 485372d6..bc1e3aec 100644 --- a/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm +++ b/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm @@ -226,11 +226,15 @@ ajax '/ajax/data/device/netmap' => require_login sub { next DEVICE if ((scalar @lgrplist) and ((!defined $device->location) or (0 == scalar grep {$_ eq $device->location} @lgrplist))); - # if host groups piked then use ACLs to filter + # if host groups picked then use ACLs to filter my $first_hgrp = first { check_acl_only($device, setting('host_groups')->{$_}) } @hgrplist; next DEVICE if ((scalar @hgrplist) and (not $first_hgrp)); + # now reset first_hgroup to be the group matching the device, if any + $first_hgrp = first { check_acl_only($device, setting('host_groups')->{$_}) } + keys %{ setting('host_group_displaynames') || {} }; + ++$logvals{ $device->get_column('log') || 1 }; (my $name = lc($device->dns || $device->name || $device->ip)) =~ s/$domain$//; diff --git a/share/public/css/netdisco.css b/share/public/css/netdisco.css index c64f3187..6f0f9f01 100644 --- a/share/public/css/netdisco.css +++ b/share/public/css/netdisco.css @@ -623,7 +623,7 @@ div.toggle.btn-small { /* when the sidebar submit button DOES NOT HAVE a dropdown */ .nd_sidebar button:not(.nd_sidebar-btn-drop):not(.nd_sidebar-btn-drop-drop):not(.nd_sidebar-btn-netmap) { margin-top: 9px; - margin-left: -3px; + margin-left: -2px; width: 165px; }