mbolli / nfsen-ng

Responsive NetFlow visualizer built on top of nfdump tools.
Apache License 2.0
232 stars 44 forks source link

Fix row count off by one #34

Closed nrensen closed 4 years ago

nrensen commented 4 years ago

The csv output includes three summary rows at the end, e.g.

Summary flows,bytes,packets,avg_bps,avg_pps,avg_bpp 20,1018704,6576,46,0,154

nfsen-ng.js strips these off, but takes 4 rows instead of three, losing a row of actual data:

var temprows = data.slice(2, data.length - 4),

For example, aggregate by proto with a filter of proto tcp should produce a single row, but I see no results.

This can be fixed by replacing -4 with -3 above, but I thought it better to do this in the backend since the backend is responsible for producing the data and should understand the nfdump output. The frontend is then responsible only for display.

mbolli commented 4 years ago

This can be fixed by replacing -4 with -3 above, but I thought it better to do this in the backend since the backend is responsible for producing the data and should understand the nfdump output. The frontend is then responsible only for display.

Makes sense. Thanks!