#309 missing Device Port VLAN Mismatch CSV template

This commit is contained in:
Oliver Gorwits
2017-05-06 16:50:34 +01:00
parent d74ccac4f6
commit d0472a9ddf
3 changed files with 17 additions and 2 deletions

View File

@@ -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

View File

@@ -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 };
}
};

View File

@@ -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 %]