use the new duplex mismatch query in a template
This commit is contained in:
		| @@ -13,13 +13,12 @@ register_report({ | |||||||
| }); | }); | ||||||
|  |  | ||||||
| ajax '/ajax/content/report/duplexmismatch' => sub { | ajax '/ajax/content/report/duplexmismatch' => sub { | ||||||
| #    my $q = param('q'); |     my $set = schema('netdisco')->resultset('Virtual::DuplexMismatch'); | ||||||
| #    my $device = schema('netdisco')->resultset('Device') |     return unless $set->count; | ||||||
| #      ->with_times()->search_for_device($q) or return; |  | ||||||
|  |  | ||||||
|     content_type('text/html'); |     content_type('text/html'); | ||||||
|     template 'ajax/report/duplexmismatch.tt', { |     template 'ajax/report/duplexmismatch.tt', { | ||||||
| #      d => $device, |       results => $set, | ||||||
|     }, { layout => undef }; |     }, { layout => undef }; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -0,0 +1,30 @@ | |||||||
|  | <table class="table-bordered table-condensed table-striped"> | ||||||
|  |   <thead> | ||||||
|  |     <tr> | ||||||
|  |       <th class="center_cell">Left Device</th> | ||||||
|  |       <th class="center_cell">Interface</th> | ||||||
|  |       <th class="center_cell">Duplex</th> | ||||||
|  |       <th class="center_cell">Right Device</th> | ||||||
|  |       <th class="center_cell">Interface</th> | ||||||
|  |       <th class="center_cell">Duplex</th> | ||||||
|  |     </tr> | ||||||
|  |   </thead> | ||||||
|  |   </tbody> | ||||||
|  |     [% WHILE (row = results.next) %] | ||||||
|  |     <tr> | ||||||
|  |       <td class="center_cell">[% row.left_dns || row.left_ip | html_entity %]</a> | ||||||
|  |       <td class="center_cell"><a class="nd_linkcell" | ||||||
|  |         href="[% device_ports %]&q=[% row.left_dns || row.left_ip | uri %]&f=[% row.left_port | uri %]&c_duplex=on"> | ||||||
|  |           [% row.left_port | html_entity %]</a></td> | ||||||
|  |       <td class="center_cell">[% row.left_duplex.ucfirst | html_entity %]</td> | ||||||
|  |  | ||||||
|  |       <td class="center_cell">[% row.right_dns || row.right_ip | html_entity %]</a> | ||||||
|  |       <td class="center_cell"><a class="nd_linkcell" | ||||||
|  |         href="[% device_ports %]&q=[% row.right_dns || row.right_ip | uri %]&f=[% row.right_port | uri %]&c_duplex=on"> | ||||||
|  |           [% row.right_port | html_entity %]</a></td> | ||||||
|  |       <td class="center_cell">[% row.right_duplex.ucfirst | html_entity %]</td> | ||||||
|  |     </tr> | ||||||
|  |     [% END %] | ||||||
|  |   </tbody> | ||||||
|  | </table> | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user