mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Added SNMP Trap preference (#8485)
* Added SNMP Trap preference * Added SNMP trap lint * Added SNMP trap lint * Fixed issue #8477 --------- Co-authored-by: DGabri <gabriele.deri@gmail.com>
This commit is contained in:
parent
57988a8913
commit
a4780f4003
9 changed files with 79 additions and 59 deletions
|
|
@ -1068,6 +1068,11 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
-- function to format dns query to an HTML copy button and query value
|
||||
function format_dns_query_copy_btn(dns_query)
|
||||
return "<button onclick='const textArea = document.createElement(`textarea`);textArea.value=`" .. dns_query .. "`;textArea.style.position=`absolute`;textArea.style.left=`-999999px`;document.body.prepend(textArea);textArea.select();document.execCommand(`copy`);'class='btn btn-light btn-sm border ms-1'style='cursor: pointer;'><i class='fas fa-copy'></i></button><span style='margin-left: 8px;'>" .. dns_query .. "</span>"
|
||||
end
|
||||
|
||||
-- @brief Given a table of values, if available, it's going to format the values with the standard
|
||||
-- info and then return the same table formatted
|
||||
function format_dns_query_info(dns_info, no_html)
|
||||
|
|
@ -1097,11 +1102,7 @@ function format_dns_query_info(dns_info, no_html)
|
|||
local url = dns_info["last_query"]
|
||||
url = string.gsub(url, " ", "") -- Clean the URL from spaces and %20, spaces in html
|
||||
if not string.find(url, '*') then
|
||||
dns_info.last_query = i18n("external_link_url", {
|
||||
proto = 'https',
|
||||
url = url,
|
||||
url_name = dns_info["last_query"]
|
||||
})
|
||||
dns_info.last_query = format_dns_query_copy_btn(dns_info["last_query"])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1298,7 +1299,7 @@ function format_proto_info(flow_details, proto_info)
|
|||
proto_info[key] = nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
for proto, info in pairs(proto_info or {}) do
|
||||
if proto == "tls" then
|
||||
proto_details[proto] = format_tls_info(info)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue