update NodeVendor.pm (#427)
It would seem like we'd want for this to be distinct mac addresses here right? Otherwise you'd could get duplicate counters. In our environment where things move around this makes for repeat lines in the nodes table. To get a true inventory count I'd think this should only count unique macs. Apologies if this is NOT the desired output for this module.
This commit is contained in:
@@ -102,7 +102,7 @@ get '/ajax/content/report/nodevendor' => require_login sub {
|
|||||||
$rs = $rs->search(
|
$rs = $rs->search(
|
||||||
{ },
|
{ },
|
||||||
{ join => 'oui',
|
{ join => 'oui',
|
||||||
select => [ 'oui.abbrev', { count => 'me.mac' } ],
|
select => [ 'oui.abbrev', { count => {distinct 'me.mac'}} ],
|
||||||
as => [qw/ vendor count /],
|
as => [qw/ vendor count /],
|
||||||
group_by => [qw/ oui.abbrev /]
|
group_by => [qw/ oui.abbrev /]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user