mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Added question tooltip when string is cut (Issue #5522)
This commit is contained in:
parent
29f69056f0
commit
572e209bd0
2 changed files with 12 additions and 5 deletions
|
|
@ -47,6 +47,8 @@ end
|
|||
-- @return A human-readable string
|
||||
function alert_suspicious_file_transfer.format(ifid, alert, alert_type_params)
|
||||
local res = i18n("alerts_dashboard.suspicious_file_transfer")
|
||||
local url = alert_type_params["protos.http.last_url"]
|
||||
local info = ""
|
||||
|
||||
if alert_type_params and alert_type_params["protos.http.last_url"] then
|
||||
local type_icon = ''
|
||||
|
|
@ -58,10 +60,15 @@ function alert_suspicious_file_transfer.format(ifid, alert, alert_type_params)
|
|||
elseif extn == ".png" or extn == ".jpg" then
|
||||
type_icon = '<i class="fas fa-fw fa-file-image"></i>'
|
||||
end
|
||||
|
||||
res = i18n("alerts_dashboard.suspicious_file_transfer_url",
|
||||
{url = shortenString(alert_type_params["protos.http.last_url"], 64),
|
||||
type_icon = type_icon})
|
||||
if string.len(url) > 64 then
|
||||
url = shortenString(alert_type_params["protos.http.last_url"], 64)
|
||||
info = '<i class="fas fa-question-circle" data-bs-toggle="tooltip" data-bs-placement="bottom" title="'..alert_type_params["protos.http.last_url"]..'"></i>'
|
||||
end
|
||||
res = i18n("alerts_dashboard.suspicious_file_transfer_url", {
|
||||
url = url,
|
||||
type_icon = type_icon,
|
||||
info = info,
|
||||
})
|
||||
end
|
||||
|
||||
return res
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue