From c3ab472cfb48e17521c85c8bb176ee4843601dfd Mon Sep 17 00:00:00 2001 From: Simone Mainardi Date: Tue, 1 Aug 2017 14:36:48 +0200 Subject: [PATCH] Adds note to listed application protocols Fixes #1377 --- scripts/locales/en.lua | 2 ++ scripts/lua/if_stats.lua | 18 ++++++++++++++++++ src/DivertInterface.cpp | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/scripts/locales/en.lua b/scripts/locales/en.lua index 9612be3d56..650e74e083 100644 --- a/scripts/locales/en.lua +++ b/scripts/locales/en.lua @@ -128,6 +128,8 @@ local en = { top_receivers = "Top Receivers", top_profiles = "Top Profiles", all_protocols = "All Protocols", + note_click_to_zoom = "Left-click on the chart to zoom in, right-click to zoom out.", + note_protocols_shown = "Protocols not seen in the selected timeframe are not listed in the dropdown.", }, flows_page = { diff --git a/scripts/lua/if_stats.lua b/scripts/lua/if_stats.lua index 449cb3389c..bd10504932 100644 --- a/scripts/lua/if_stats.lua +++ b/scripts/lua/if_stats.lua @@ -820,6 +820,24 @@ elseif(page == "historical") then if(rrd_file == nil) then rrd_file = "bytes.rrd" end drawRRD(ifstats.id, nil, rrd_file, _GET["zoom"], url.."&page=historical", 1, _GET["epoch"], selected_epoch, topArray) --drawRRD(ifstats.id, nil, rrd_file, _GET["zoom"], url.."&page=historical", 1, _GET["epoch"], selected_epoch, topArray, _GET["comparison_period"]) + + if ntop.isPro() then + + print[[ + +
+ +
+ ]] print(i18n('notes')) print[[ + +
+ +]] + end + elseif(page == "trafficprofiles") then print("\n") print("\n") diff --git a/src/DivertInterface.cpp b/src/DivertInterface.cpp index c425dd21cc..20d8866f70 100644 --- a/src/DivertInterface.cpp +++ b/src/DivertInterface.cpp @@ -67,7 +67,7 @@ static void* divertPacketPollLoop(void* ptr) { #else h.len = h.caplen = len, gettimeofday(&h.ts, NULL); #endif /* __OpenBSD__ */ - iface->dissectPacket(0, &h, packet, &c, &srcHost, &dstHost, &flow); + iface->dissectPacket(0, NULL, &h, packet, &c, &srcHost, &dstHost, &flow); /* Enable the row below to specify the firewall rule corresponding to the protocol */ #if 0
" .. i18n("traffic_profiles.profile_name") .. "" .. i18n("chart") .. "" .. i18n("traffic") .. "