#76 Don't include wireless in ports with multiple nodes attached report
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
* Correct is_discoverable check in Undiscovered Neighbors report
|
* Correct is_discoverable check in Undiscovered Neighbors report
|
||||||
* Correct macsuck for Q-BRIDGE-MIB based devices
|
* Correct macsuck for Q-BRIDGE-MIB based devices
|
||||||
* Allow cached SNMP community hint to override SNMP version cycle
|
* 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
|
2.021000 - 2014-01-08
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,12 @@ register_report(
|
|||||||
|
|
||||||
get '/ajax/content/report/portmultinodes' => require_login sub {
|
get '/ajax/content/report/portmultinodes' => require_login sub {
|
||||||
my @results = schema('netdisco')->resultset('Device')->search(
|
my @results = schema('netdisco')->resultset('Device')->search(
|
||||||
{ 'ports.remote_ip' => undef, 'nodes.active' => 1 },
|
{ 'ports.remote_ip' => undef,
|
||||||
{ result_class => 'DBIx::Class::ResultClass::HashRefInflator',
|
'nodes.active' => 1,
|
||||||
select => [ 'ip', 'dns', 'name' ],
|
'wireless.port' => undef
|
||||||
join => { 'ports' => 'nodes' },
|
},
|
||||||
|
{ select => [ 'ip', 'dns', 'name' ],
|
||||||
|
join => { 'ports' => [ 'wireless', 'nodes' ] },
|
||||||
'+columns' => [
|
'+columns' => [
|
||||||
{ 'port' => 'ports.port' },
|
{ 'port' => 'ports.port' },
|
||||||
{ 'description' => 'ports.name' },
|
{ 'description' => 'ports.name' },
|
||||||
@@ -29,7 +31,7 @@ get '/ajax/content/report/portmultinodes' => require_login sub {
|
|||||||
having => \[ 'count(nodes.mac) > ?', [ count => 1 ] ],
|
having => \[ 'count(nodes.mac) > ?', [ count => 1 ] ],
|
||||||
order_by => { -desc => [qw/count/] },
|
order_by => { -desc => [qw/count/] },
|
||||||
}
|
}
|
||||||
)->all;
|
)->hri->all;
|
||||||
|
|
||||||
return unless scalar @results;
|
return unless scalar @results;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user