Fixed bug in footer.lua that caused a JS error that prevented the page from being updated
Moved utility functions from footer lua script to ntopng_utils.js
This is to guarantee that symbolic names are left
in a consistent state after possible lua calls.
TODO: check: should get_name be mutex-protected?
Also fixes an issue with minute top talkers:
11/May/2016 11:06:21 [Lua.cpp:4617] WARNING: Script failure [/usr/share/ntopng/scripts/callbacks/minute.lua][/usr/share/ntopng/scripts/lua/modules/top_talkers.lua:215: attempt to concatenate field 'name' (a nil value)]
11/May/2016 11:09:22 [Lua.cpp:4617] WARNING: Script failure [/usr/share/ntopng/scripts/callbacks/minute.lua][/usr/share/ntopng/scripts/lua/modules/top_talkers.lua:185: attempt to concatenate field 'name' (a nil value)]
The following error has been fixed:
28/Dec/2015 11:40:02 [Lua.cpp:4447] WARNING: Script failure [/Users/simone/code/ntopng/scripts/callbacks/minute.lua][...s/simone/code/ntopng/scripts/lua/modules/top_talkers.lua:221: table index is nil]
This commit lets the "Other" talker be always shown in the top talkers
report of a web interface if its traffic value is not zero. This also
lets the "Other" talker accumulate traffic also for hosts above the
maximum number of top talkers.
This commit adds to the retrieved top talkers a final entry
grouping stats for all remaining talkers which are not included
in the top ones. This helps get a feeling of the proportion
between the traffic of the top talkers and that of other talkers.