#900 make Port VLAN mismatch respect p_hide1002 setting
This commit is contained in:
@@ -20,7 +20,7 @@ __PACKAGE__->result_source_instance->view_definition(<<'ENDSQL');
|
||||
LEFT JOIN device_port dp2 ON (dp.ip = dp2.ip and dp.port = dp2.slave_of)
|
||||
LEFT JOIN device_port_vlan dp2v ON (dp2.ip = dp2v.ip and dp2.port = dp2v.port)
|
||||
WHERE dp.has_subinterfaces) alldpv
|
||||
WHERE vlan NOT IN (1002, 1003, 1004, 1005) GROUP BY ip, port)
|
||||
WHERE vlan::text NOT IN (?, ?, ?, ?) GROUP BY ip, port)
|
||||
|
||||
SELECT CASE WHEN length(ld.dns) > 0 THEN ld.dns ELSE host(ld.ip) END AS left_device,
|
||||
lp.port AS left_port,
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user