diff --git a/Netdisco/lib/App/Netdisco/Web/Plugin/Report/DuplexMismatch.pm b/Netdisco/lib/App/Netdisco/Web/Plugin/Report/DuplexMismatch.pm index 39efffe0..a87bebf8 100644 --- a/Netdisco/lib/App/Netdisco/Web/Plugin/Report/DuplexMismatch.pm +++ b/Netdisco/lib/App/Netdisco/Web/Plugin/Report/DuplexMismatch.pm @@ -13,13 +13,12 @@ register_report({ }); ajax '/ajax/content/report/duplexmismatch' => sub { -# my $q = param('q'); -# my $device = schema('netdisco')->resultset('Device') -# ->with_times()->search_for_device($q) or return; + my $set = schema('netdisco')->resultset('Virtual::DuplexMismatch'); + return unless $set->count; content_type('text/html'); template 'ajax/report/duplexmismatch.tt', { -# d => $device, + results => $set, }, { layout => undef }; }; diff --git a/Netdisco/share/views/ajax/report/duplexmismatch.tt b/Netdisco/share/views/ajax/report/duplexmismatch.tt index e69de29b..d0a67bb0 100644 --- a/Netdisco/share/views/ajax/report/duplexmismatch.tt +++ b/Netdisco/share/views/ajax/report/duplexmismatch.tt @@ -0,0 +1,30 @@ + + + + + + + + + + + + + [% WHILE (row = results.next) %] + + + + + + + + [% END %] + +
Left DeviceInterfaceDuplexRight DeviceInterfaceDuplex
[% row.left_dns || row.left_ip | html_entity %] + + [% row.left_port | html_entity %][% row.left_duplex.ucfirst | html_entity %][% row.right_dns || row.right_ip | html_entity %] + + [% row.right_port | html_entity %][% row.right_duplex.ucfirst | html_entity %]
+