mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Added interfaces input and output name formatting (#5953)
This commit is contained in:
parent
ef86a08137
commit
1a9cf6aaac
2 changed files with 18 additions and 5 deletions
|
|
@ -5021,6 +5021,17 @@ function add_delete_obs_point_button()
|
|||
return button
|
||||
end
|
||||
|
||||
function format_portidx_name(cached_dev, portidx)
|
||||
local port_info = cached_dev["interfaces"][tostring(portidx)]
|
||||
local idx_name = portidx
|
||||
|
||||
if port_info then
|
||||
idx_name = portidx .. "[" .. shortenString(port_info["name"]) .. "]"
|
||||
end
|
||||
|
||||
return idx_name
|
||||
end
|
||||
|
||||
function print_copy_button(id, data)
|
||||
print('<button style="" class="btn btn-sm border ms-1" data-placement="bottom" id="btn-copy-' .. id ..'" data="' .. data .. '"><i class="fas fa-copy"></i></button>')
|
||||
print("<script>$('#btn-copy-" .. id .. "').click(function(e) { NtopUtils.copyToClipboard($(this).attr('data'), '" .. i18n('copied') .. "', '" .. i18n('request_failed_message') .. "', $(this));});</script>")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue