From d0472a9ddfe7db1a368c2914388daa7c8016d452 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sat, 6 May 2017 16:50:34 +0100 Subject: [PATCH] #309 missing Device Port VLAN Mismatch CSV template --- Changes | 3 ++- .../Netdisco/Web/Plugin/Report/PortVLANMismatch.pm | 2 +- share/views/ajax/report/portvlanmismatch_csv.tt | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 share/views/ajax/report/portvlanmismatch_csv.tt diff --git a/Changes b/Changes index 22e47ad2..4a0f791d 100644 --- a/Changes +++ b/Changes @@ -1,8 +1,9 @@ -2.035007 - +2.036000 - [BUG FIXES] * Add SSL development library to Release Notes + * #309 missing Device Port VLAN Mismatch CSV template 2.035006 - 2017-04-29 diff --git a/lib/App/Netdisco/Web/Plugin/Report/PortVLANMismatch.pm b/lib/App/Netdisco/Web/Plugin/Report/PortVLANMismatch.pm index e2ffa45f..53ef47b9 100644 --- a/lib/App/Netdisco/Web/Plugin/Report/PortVLANMismatch.pm +++ b/lib/App/Netdisco/Web/Plugin/Report/PortVLANMismatch.pm @@ -25,7 +25,7 @@ get '/ajax/content/report/portvlanmismatch' => require_login sub { } else { header( 'Content-Type' => 'text/comma-separated-values' ); - template 'ajax/report/portvlanmismatch.tt', { results => \@results, }, + template 'ajax/report/portvlanmismatch_csv.tt', { results => \@results, }, { layout => undef }; } }; diff --git a/share/views/ajax/report/portvlanmismatch_csv.tt b/share/views/ajax/report/portvlanmismatch_csv.tt new file mode 100644 index 00000000..ad6eaba2 --- /dev/null +++ b/share/views/ajax/report/portvlanmismatch_csv.tt @@ -0,0 +1,14 @@ +[% USE CSV -%] +[% CSV.dump([ 'Left Device' 'Left Port' 'Left VLANs' 'Right Device', 'RightPort', 'Right VLANs' ]) %] + +[% FOREACH row IN results %] + [% mylist = [] %] + [% mylist.push(row.left_device) %] + [% mylist.push(row.left_port) %] + [% mylist.push(row.left_vlans) %] + [% mylist.push(row.right_device) %] + [% mylist.push(row.right_port) %] + [% mylist.push(row.right_vlans) %] + [% CSV.dump(mylist) %] + +[% END %]