mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Improves visualization of containers/pods in flows
This commit is contained in:
parent
57f56d1fc3
commit
ae4770fe7d
4 changed files with 60 additions and 70 deletions
|
|
@ -1550,8 +1550,7 @@ function flowinfo2process(process, host_info_to_url)
|
|||
|
||||
clean_name = t[#t]
|
||||
|
||||
-- proc_name = string.format("<i class='fa fa-terminal'></i> %s", clean_name)
|
||||
proc_name = string.format("<A HREF='%s/lua/process_details.lua?%s&pid_name=%s&pid=%u'><i class='fa fa-terminal'></i>%s</A>",
|
||||
proc_name = string.format("<A HREF='%s/lua/process_details.lua?%s&pid_name=%s&pid=%u'><i class='fa fa-terminal'></i> %s</A>",
|
||||
ntop.getHttpPrefix(),
|
||||
host_info_to_url,
|
||||
full_clean_name,
|
||||
|
|
@ -1559,17 +1558,16 @@ function flowinfo2process(process, host_info_to_url)
|
|||
clean_name)
|
||||
end
|
||||
|
||||
if not isEmptyString(process["user_name"]) then
|
||||
local clean_user_name = process["user_name"]:gsub("'", '')
|
||||
-- if not isEmptyString(process["user_name"]) then
|
||||
-- local clean_user_name = process["user_name"]:gsub("'", '')
|
||||
|
||||
-- proc_user_name = string.format("<i class='fa fa-linux'></i> %s", clean_user_name)
|
||||
proc_user_name = string.format("<A HREF='%s/lua/username_details.lua?%s&username=%s&uid=%u'><i class='fa fa-linux'></i> %s</A>",
|
||||
ntop.getHttpPrefix(),
|
||||
host_info_to_url,
|
||||
clean_user_name,
|
||||
process["uid"],
|
||||
clean_user_name)
|
||||
end
|
||||
-- proc_user_name = string.format("<A HREF='%s/lua/username_details.lua?%s&username=%s&uid=%u'><i class='fa fa-linux'></i> %s</A>",
|
||||
-- ntop.getHttpPrefix(),
|
||||
-- host_info_to_url,
|
||||
-- clean_user_name,
|
||||
-- process["uid"],
|
||||
-- clean_user_name)
|
||||
-- end
|
||||
|
||||
fmt = string.format("[%s]", table.concat({proc_user_name, proc_name}, ' '))
|
||||
end
|
||||
|
|
@ -1579,6 +1577,30 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function flowinfo2container(container)
|
||||
local fmt, cont_name, pod_name = '', '', ''
|
||||
|
||||
if container then
|
||||
cont_name = string.format("<A HREF='%s/lua/flows_stats.lua?container=%s'><i class='fa fa-ship'></i> %s</A>",
|
||||
ntop.getHttpPrefix(),
|
||||
container["id"], format_utils.formatContainer(container))
|
||||
|
||||
-- local formatted_pod = format_utils.formatPod(container)
|
||||
-- if not isEmptyString(formatted_pod) then
|
||||
-- pod_name = string.format("<A HREF='%s/lua/containers_stats.lua?pod=%s'><i class='fa fa-crosshairs'></i> %s</A>",
|
||||
-- ntop.getHttpPrefix(),
|
||||
-- formatted_pod,
|
||||
-- formatted_pod)
|
||||
-- end
|
||||
|
||||
fmt = string.format("[%s]", table.concat({cont_name, pod_name}, ''))
|
||||
end
|
||||
|
||||
return fmt
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function getLocalNetworkAliasKey()
|
||||
return "ntopng.network_aliases"
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue