mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Added service map reporting
This commit is contained in:
parent
1e2846f9d3
commit
21f3fbd847
11 changed files with 186 additions and 29 deletions
|
|
@ -3916,6 +3916,27 @@ end
|
|||
|
||||
-- ###########################################
|
||||
|
||||
local cache = {}
|
||||
|
||||
function buildHostHREF(ip_address)
|
||||
local stats = cache[ip_address]
|
||||
|
||||
if(stats == nil) then
|
||||
stats = interface.getHostInfo(ip_address)
|
||||
cache[ip_address] = { stats = stats }
|
||||
else
|
||||
stats = stats.stats
|
||||
end
|
||||
|
||||
if(stats == nil) then
|
||||
return(ip_address)
|
||||
else
|
||||
local name = stats.name
|
||||
|
||||
if((name == nil) or (name == "")) then name = ip_address end
|
||||
return('<A HREF="'..ntop.getHttpPrefix()..'/lua/host_details.lua?host='..ip_address..'">'..name..'</A>')
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
-- IMPORTANT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue