mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Add function to get the exporter interface identifier
This commit is contained in:
parent
3c4c6495bd
commit
4f32f927c8
2 changed files with 11 additions and 1 deletions
|
|
@ -238,6 +238,14 @@ function format_utils.formatContainer(cont)
|
|||
return cont["id"]
|
||||
end
|
||||
|
||||
function format_utils.formatExporterInterface(port_idx, port_info)
|
||||
if port_info["container"] then
|
||||
return format_utils.formatContainer(port_info["container"])
|
||||
end
|
||||
|
||||
return(port_info["ifName"] or port_idx)
|
||||
end
|
||||
|
||||
function format_utils.formatContainerFromId(cont_id)
|
||||
-- NOTE: this is expensive, use format_utils.formatContainer when possible
|
||||
local containers = interface.getContainersStats()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue