mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Added country to alert detail view
This commit is contained in:
parent
6921aa9dce
commit
7b99fc17b8
1 changed files with 9 additions and 1 deletions
|
|
@ -1861,7 +1861,7 @@ end
|
|||
|
||||
-- #####################################
|
||||
|
||||
function historical_flow_utils.getHistoricalFlowLabel(record, add_hyperlinks, add_hostnames)
|
||||
function historical_flow_utils.getHistoricalFlowLabel(record, add_hyperlinks, add_hostnames, add_country_flags)
|
||||
local label = ""
|
||||
|
||||
local info = historical_flow_utils.format_clickhouse_record(record)
|
||||
|
|
@ -1877,6 +1877,10 @@ function historical_flow_utils.getHistoricalFlowLabel(record, add_hyperlinks, ad
|
|||
label = label ..historical_flow_utils.get_historical_url(info.cli_ip.ip, "cli_ip", info.cli_ip.ip, add_hyperlinks, nil)
|
||||
end
|
||||
|
||||
if info.cli_country and not isEmptyString(info.cli_country.value) then
|
||||
label = label .. ' <img src="' + ntop.getHttpPrefix() + '/dist/images/blank.gif" class="flag flag-' + string.lower(info.cli_country.value) + '">'
|
||||
end
|
||||
|
||||
if add_hyperlinks and info.cli_location and not isEmptyString(info.cli_location.label) then
|
||||
label = label .. " " .. info.cli_location.label
|
||||
end
|
||||
|
|
@ -1913,6 +1917,10 @@ function historical_flow_utils.getHistoricalFlowLabel(record, add_hyperlinks, ad
|
|||
label = label ..historical_flow_utils.get_historical_url(info.srv_ip.ip, "srv_ip", info.srv_ip.ip, add_hyperlinks, nil)
|
||||
end
|
||||
|
||||
if info.srv_country and not isEmptyString(info.srv_country.value) then
|
||||
label = label .. ' <img src="' .. ntop.getHttpPrefix() .. '/dist/images/blank.gif" class="flag flag-' .. string.lower(info.srv_country.value) .. '">'
|
||||
end
|
||||
|
||||
if add_hyperlinks and info.srv_location and not isEmptyString(info.srv_location.label) then
|
||||
label = label .. " " .. info.srv_location.label
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue