mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Fixed flow drilldown not working (#6527)
This commit is contained in:
parent
e428151d06
commit
c18c341258
2 changed files with 33 additions and 30 deletions
|
|
@ -3353,7 +3353,7 @@ end
|
|||
-- ##########################################
|
||||
|
||||
function historicalProtoHostHref(ifId, host, l4_proto, ndpi_proto_id, info, vlan, no_print)
|
||||
if ntop.isEnterpriseM() then
|
||||
if ntop.isEnterpriseM() then
|
||||
local now = os.time()
|
||||
local ago1h = now - 3600
|
||||
|
||||
|
|
@ -3362,35 +3362,38 @@ function historicalProtoHostHref(ifId, host, l4_proto, ndpi_proto_id, info, vlan
|
|||
local hist_url = ntop.getHttpPrefix().."/lua/pro/db_search.lua?"
|
||||
local params = {epoch_end = now, epoch_begin = ago1h, ifid = ifId}
|
||||
|
||||
if host then
|
||||
local host_k = hostinfo2hostkey(host)
|
||||
if isEmptyString(host_k) then
|
||||
host_k = host
|
||||
end
|
||||
params["ip"] = host_k..";eq"
|
||||
end
|
||||
if l4_proto then
|
||||
params["l4proto"] = l4_proto..";eq"
|
||||
end
|
||||
if ndpi_proto_id then
|
||||
params["l7proto"] = ndpi_proto_id..";eq"
|
||||
end
|
||||
if vlan and vlan ~= 0 then
|
||||
params["vlan_id"] = vlan..";eq"
|
||||
end
|
||||
|
||||
local url_params = table.tconcat(params, "=", "&")
|
||||
|
||||
if not no_print then
|
||||
print(' ')
|
||||
-- print('<span class="badge bg-info">')
|
||||
print('<a href="'..hist_url..url_params..'" title="'..i18n("db_explorer.last_hour_flows")..'"><i class="fas fa-search-plus"></i></a>')
|
||||
-- print('</span>')
|
||||
else
|
||||
return '<a href="'..hist_url..url_params..'" title="'..i18n("db_explorer.last_hour_flows")..'"><i class="fas fa-search-plus"></i></a>'
|
||||
if host then
|
||||
local host_k = hostinfo2hostkey(host)
|
||||
if isEmptyString(host_k) then
|
||||
host_k = host
|
||||
end
|
||||
params["ip"] = host_k..";eq"
|
||||
end
|
||||
end
|
||||
if l4_proto then
|
||||
params["l4proto"] = l4_proto..";eq"
|
||||
end
|
||||
if ndpi_proto_id then
|
||||
params["l7proto"] = ndpi_proto_id..";eq"
|
||||
end
|
||||
if vlan and vlan ~= 0 then
|
||||
params["vlan_id"] = vlan..";eq"
|
||||
end
|
||||
if info then
|
||||
params["info"] = info..";in"
|
||||
end
|
||||
|
||||
local url_params = table.tconcat(params, "=", "&")
|
||||
|
||||
if not no_print then
|
||||
print(' ')
|
||||
-- print('<span class="badge bg-info">')
|
||||
print('<a href="'..hist_url..url_params..'" title="'..i18n("db_explorer.last_hour_flows")..'"><i class="fas fa-search-plus"></i></a>')
|
||||
-- print('</span>')
|
||||
else
|
||||
return '<a href="'..hist_url..url_params..'" title="'..i18n("db_explorer.last_hour_flows")..'"><i class="fas fa-search-plus"></i></a>'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- #############################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue