Added HTTP stats: work in progress


git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8656 a02cd0c1-8e76-42e1-a119-56f9641475e2
get_as_data.lua: avoid re-assignment of AS name

Currently, an AS whose ID is 0 is assigned the name "Hidden", which
is then changed to a more appropriate "Private ASN" when actually
building the table. This commit avoids this double assignment by
immediately using the name "Private ASN".

git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8657 a02cd0c1-8e76-42e1-a119-56f9641475e2
scripts/lua: move function ternary() to lua_utils

Currently, the generic ternary() function, implementing a C-like
ternary operator, is included in the get_as_data Lua script, which
is the only one using it. However, since it could be useful in other
scripts in the future, this commit moves it to the lua_utils library.

git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8658 a02cd0c1-8e76-42e1-a119-56f9641475e2
as_data: implement throughput trend in AS view

This commit adds to the AS view the indication about the current
throughput trend of each AS, as it is already done for hosts. The
new functionality is implemented by keeping, for each host, also
the difference between the last sampling of the throughput and the
current sampling, so that the global difference can be quickly
retrieved and grouped by AS by any Lua script.

git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8659 a02cd0c1-8e76-42e1-a119-56f9641475e2
as_stats: fix per-AS view automatic refresh

This commit actually implements the automatic refresh of the per-AS
view by also fixing the related javscript functions. The refresh is
performed every 10 seconds as it already happens for the hosts view.
A quite big portion of the get_as_data Lua script is refactored so
that the script can be used to generate both the JSON for the whole
AS list and the JSON for a single AS. The commit also fixes a type
mismatch for the AS identifier, which was a string for a real AS
name and an integer in case the AS was private or not identified
for some reason.

git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8660 a02cd0c1-8e76-42e1-a119-56f9641475e2
Reworked ASN URLs for hosts so that they not point to the new ASN report page


git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8661 a02cd0c1-8e76-42e1-a119-56f9641475e2
Implemented host HTTP traffic reports


git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8662 a02cd0c1-8e76-42e1-a119-56f9641475e2
scripts/lua: add per-VLAN view in Hosts menu

This commit adds an item to the Hosts menu which allows to view
active IPs by VLAN. A huge portion of the code hosted by the
get_as_data Lua script is reworked to allow grouping by column.

This commit leaves one open TODO about the name of VLANs to be
viewed in the interface table.

git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8663 a02cd0c1-8e76-42e1-a119-56f9641475e2
For DNS and HTTP flows, inside the flow details page, we now represent the query (DNS) and URL/response code (HTTP)


git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8664 a02cd0c1-8e76-42e1-a119-56f9641475e2
Removed warning


git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8665 a02cd0c1-8e76-42e1-a119-56f9641475e2
minute.lua: fix typo in string comparison

git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8668 a02cd0c1-8e76-42e1-a119-56f9641475e2
if_stats: add Top Minute AS to historical interface tab

This commit adds to the Historical tab of the interface details page
information about the top talker autonomous systems. Collection of
data is performed similarly to top minute talker hosts. The name of
the AS links to details about active hosts pertaining to such AS.

git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8669 a02cd0c1-8e76-42e1-a119-56f9641475e2
top_talkers.lua: refactor getHistoricalTop*() function

This commit factors out common code from the getHistoricalTopTalkers()
and getHistoricalTopASs() functions into a common functions called
with a single parameter of the filename to be retrieved. Also a part
of the filename building process could be factored out, but for clarity
that part of code is still left as is.

git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8670 a02cd0c1-8e76-42e1-a119-56f9641475e2
graph_utils.lua: fix format of Top Autonomous Systems

Currently, the list header for Top ASs shows in the Top Minute Talkers
section of the interface historical stats even if there are no top
ASs yet. This commit fixes the format so that the header is hidden if
there are no top ASs to show.

git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8671 a02cd0c1-8e76-42e1-a119-56f9641475e2
if_stats: add Top Minute VLANs to historical interface view

This commit adds to the Historical tab of the interface details page
information about the top talker VLANs. This also makes the getTopASs()
function generic so that it is able to get top hosts information grouped
by any column. The name of the VLAN as shown in the page links to details
about active hosts pertaining to such VLAN.

git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8673 a02cd0c1-8e76-42e1-a119-56f9641475e2
top_talkers.lua: fix VLAN name in top minute VLANs

This commit lets the vlan be correctly viewed in the top minute
report in the historical stats for an interface.

git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8674 a02cd0c1-8e76-42e1-a119-56f9641475e2
Added enhancements for displaying ASN and VLAN menu only when needed (i.e. when GeoIP has been loaded and VLAN tagged traffic dissected)



git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8679 a02cd0c1-8e76-42e1-a119-56f9641475e2
Removed debug message in logging
Added Info column in flow details to display the URL (HTTP) or query name (DNS)


git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8681 a02cd0c1-8e76-42e1-a119-56f9641475e2
get_flows_data.lua: small fix about new "info" column for flows view

The content was updated inside a branch that could not be executed
and a subsequent dereference could trigger an error.

git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8682 a02cd0c1-8e76-42e1-a119-56f9641475e2
scripts/lua: add Network view as item in the Hosts menu

This commit adds a per-Network view of active hosts to the Hosts
menu. The change is similar to the one performed for AS and VLANs
with the only exception that the item is always visible in the menu.

git-svn-id: https://svn.ntop.org/svn/ntop/trunk/ntopng@8683 a02cd0c1-8e76-42e1-a119-56f9641475e2