mbolli / nfsen-ng

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

503 error on subnet aggregation with missing prefix length #55

Closed candlerb closed 3 years ago

candlerb commented 4 years ago

(Expansion of issue from #31) This is a minor usability / data validation issue. To reproduce:

Result is a red 503 error:

image

Got 503 - Service unavailable. NfDump: Initialization failed. /usr/local/bin/nfdump -M '/var/nfsen/profiles-data/live/gw' -R '2020/06/11/nfcapd.202006110810:2020/06/12/nfcapd.202006120805' -c '20' -o 'csv' -a '-Asrcip4' 2>&1

The problem is fixed if you type (say) "24" in the prefix length box.

I think the issues are:

I think it would be better if the slash were moved out of the selection boxes:

      [ IPv4 Subnets     ] / [   ]

The box can display a grey "24" (making it clearer what the user is expected to enter here). Then if the user leaves this blank, 24 can be supplied to the backend.

mbolli commented 3 years ago

Fixed in 5f2702e6e6d38dfa66e05a502b121752525bf5a0. When I find a way to add the slash as a "watermark" in the input field, I will do so.

candlerb commented 3 years ago

How about you just put a literal slash character in front of the input box?

mbolli commented 3 years ago

This messes with the grid system and puts the subnet input box on the next line.

candlerb commented 3 years ago

WFM if I reduce width: 30% to width: 25% on the prefix box, and insert

<div class="pull-left" style="width: 5%; font-size: 170%; text-align: center;">/</div>

before it.

image

mbolli commented 3 years ago

managed to do it in the input field :) thanks anyway.