Fixes L7 protocol hyperlinks in the historical data browser

This commit is contained in:
Simone Mainardi 2016-02-18 19:12:25 +01:00
parent c3e1ea9d47
commit eda4e7f1a7

View file

@ -140,7 +140,7 @@ if stats_type == "top_talkers" then
if res ~= nil then
for _, record in pairs(res) do
record["label"] = shortenString(record["label"])
record["label"] = '<a href="'..ntop.getHttpPrefix()..'/lua/host_details.lua?host='..record["addr"]..'">'..record["label"]..'</a>'
record["label"] = '<a href="'..ntop.getHttpPrefix()..'/lua/host_details.lua?host='..record["addr"]..'" target="_blank">'..record["label"]..'</a>'
end
end
elseif stats_type =="top_applications" then
@ -152,7 +152,7 @@ elseif stats_type =="top_applications" then
end
if res ~= nil then
for _, record in pairs(res) do
record["label"] = '<a href="'..ntop.getHttpPrefix()..'/lua/hosts_stats.lua?protocol='..record["label"]..'">'..record["label"]..'</a>'
record["label"] = '<a href="'..ntop.getHttpPrefix()..'/lua/hosts_stats.lua?protocol='..interface.getnDPIProtoName(tonumber(record["application"]))..'" target="_blank">'..record["label"]..'</a>'
end
end
-- tprint(res)