#900 make Port VLAN mismatch respect p_hide1002 setting

This commit is contained in:
Oliver Gorwits
2022-08-03 10:25:23 +01:00
parent 3d81f3e5f6
commit b40c30606e
2 changed files with 7 additions and 2 deletions

View File

@@ -17,7 +17,12 @@ register_report(
get '/ajax/content/report/portvlanmismatch' => require_login sub {
return unless schema('netdisco')->resultset('Device')->count;
my @results = schema('netdisco')->resultset('Virtual::PortVLANMismatch')->hri->all;
my @results = schema('netdisco')
->resultset('Virtual::PortVLANMismatch')->search({},{
bind => [ setting('sidebar_defaults')->{'device_ports'}->{'p_hide1002'}->{'default'}
? (1002, 1003, 1004, 1005) : (0, 0, 0, 0) ],
})
->hri->all;
if (request->is_ajax) {
my $json = to_json (\@results);