From 00ac3cff4a5d001ddd0b6ad3278ddc3122ff0848 Mon Sep 17 00:00:00 2001 From: slofunk <41204201+slofunk@users.noreply.github.com> Date: Fri, 19 Oct 2018 09:42:37 -0400 Subject: [PATCH] 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. --- lib/App/Netdisco/Web/Plugin/Report/NodeVendor.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/App/Netdisco/Web/Plugin/Report/NodeVendor.pm b/lib/App/Netdisco/Web/Plugin/Report/NodeVendor.pm index 53220600..a61aafac 100644 --- a/lib/App/Netdisco/Web/Plugin/Report/NodeVendor.pm +++ b/lib/App/Netdisco/Web/Plugin/Report/NodeVendor.pm @@ -102,7 +102,7 @@ get '/ajax/content/report/nodevendor' => require_login sub { $rs = $rs->search( { }, { join => 'oui', - select => [ 'oui.abbrev', { count => 'me.mac' } ], + select => [ 'oui.abbrev', { count => {distinct 'me.mac'}} ], as => [qw/ vendor count /], group_by => [qw/ oui.abbrev /] }