mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
improvement on service_map page
The graph page has been set as the first page wehn a user navigates to the service map page. When a user double clicks a node then the map will be filtered with only the edges linked to the node. The flush data and download buttons have been restored.
This commit is contained in:
parent
3f21f1e983
commit
5fa6e69038
6 changed files with 178 additions and 35 deletions
|
|
@ -4002,6 +4002,33 @@ function buildHostHREF(ip_address, vlan_id, page)
|
|||
end
|
||||
end
|
||||
|
||||
function builServiceMapHREF(ip_address, vlan_id)
|
||||
|
||||
local stats = cache[ip_address]
|
||||
|
||||
if(stats == nil) then
|
||||
stats = interface.getHostInfo(ip_address, vlan_id)
|
||||
cache[ip_address] = { stats = stats }
|
||||
else
|
||||
stats = stats.stats
|
||||
end
|
||||
|
||||
if(stats == nil) then
|
||||
return(ip_address)
|
||||
else
|
||||
local name = stats.name
|
||||
local res
|
||||
|
||||
if((name == nil) or (name == "")) then name = ip_address end
|
||||
res = '<a href="'..ntop.getHttpPrefix()..'/lua/service_map.lua?host='..ip_address
|
||||
|
||||
if(vlan_id and (vlan_id ~= 0)) then res = res .. "@"..vlan_id end
|
||||
res = res ..'&page=graph">'..name..'</A>'
|
||||
|
||||
return(res)
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
-- IMPORTANT
|
||||
-- Leave it at the end so it can use the functions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue