#76 Don't include wireless in ports with multiple nodes attached report

This commit is contained in:
Eric A. Miller
2014-01-14 22:11:05 -05:00
parent b4869c8128
commit 3fdf7802b6
2 changed files with 8 additions and 5 deletions

View File

@@ -20,6 +20,7 @@
* Correct is_discoverable check in Undiscovered Neighbors report
* Correct macsuck for Q-BRIDGE-MIB based devices
* Allow cached SNMP community hint to override SNMP version cycle
* [#76] Don't include wireless in ports with multiple nodes attached report
2.021000 - 2014-01-08

View File

@@ -16,10 +16,12 @@ register_report(
get '/ajax/content/report/portmultinodes' => require_login sub {
my @results = schema('netdisco')->resultset('Device')->search(
{ 'ports.remote_ip' => undef, 'nodes.active' => 1 },
{ result_class => 'DBIx::Class::ResultClass::HashRefInflator',
select => [ 'ip', 'dns', 'name' ],
join => { 'ports' => 'nodes' },
{ 'ports.remote_ip' => undef,
'nodes.active' => 1,
'wireless.port' => undef
},
{ select => [ 'ip', 'dns', 'name' ],
join => { 'ports' => [ 'wireless', 'nodes' ] },
'+columns' => [
{ 'port' => 'ports.port' },
{ 'description' => 'ports.name' },
@@ -29,7 +31,7 @@ get '/ajax/content/report/portmultinodes' => require_login sub {
having => \[ 'count(nodes.mac) > ?', [ count => 1 ] ],
order_by => { -desc => [qw/count/] },
}
)->all;
)->hri->all;
return unless scalar @results;