mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Add copy button in info field on historical flow details. (#7649)
This commit is contained in:
parent
ba88b7d4d9
commit
0ec03d6bce
2 changed files with 12 additions and 5 deletions
|
|
@ -1827,14 +1827,21 @@ end
|
|||
|
||||
-- #####################################
|
||||
|
||||
function historical_flow_utils.get_historical_url(label, tag, value, add_hyperlink, title)
|
||||
function historical_flow_utils.get_historical_url(label, tag, value, add_hyperlink, title, add_copy_button)
|
||||
if not add_hyperlink then
|
||||
return label
|
||||
else
|
||||
if add_copy_button ~= nil and add_copy_button then
|
||||
return "<span><button data-to-copy='"..value.."' class='copy-http-url btn btn-light btn-sm border ms-1' style='cursor: pointer;'><i class='fas fa-copy'></i></button> <a href=\"" .. ntop.getHttpPrefix() .. "/lua/pro/db_search.lua?" ..
|
||||
tag .. "=" .. value .. tag_utils.SEPARATOR .. "eq\" " ..
|
||||
ternary(title ~= nil, "title=\"" .. (title or "") .."\"", "") ..
|
||||
" target='_blank'>" .. label .. "</a>"
|
||||
end
|
||||
return "<a href=\"" .. ntop.getHttpPrefix() .. "/lua/pro/db_search.lua?" ..
|
||||
tag .. "=" .. value .. tag_utils.SEPARATOR .. "eq\" " ..
|
||||
ternary(title ~= nil, "title=\"" .. (title or "") .."\"", "") ..
|
||||
" target='_blank'>" .. label .. "</a>"
|
||||
tag .. "=" .. value .. tag_utils.SEPARATOR .. "eq\" " ..
|
||||
ternary(title ~= nil, "title=\"" .. (title or "") .."\"", "") ..
|
||||
" target='_blank'>" .. label .. "</a>"
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue