Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/ntop/ntopng into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoBiscosi committed Jul 10, 2024
2 parents db2969b + 818a461 commit 4d97f3b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/lua/host_stats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ require "flow_utils"

local json = require ("dkjson")

local host = {}

local host_info = url2hostinfo(_GET)

if((host_info ~= nil) and (host_info["host"] ~= nil)) then
interface.select(ifname)
host = interface.getHostInfo(host_info["host"], host_info["vlan"])
if(host == nil) then
host = "{}"
host = {}
else
local hostinfo = {host=host["ip"], vlan=host["vlan"]}

Expand All @@ -28,11 +30,8 @@ if((host_info ~= nil) and (host_info["host"] ~= nil)) then
interface.setHostResolvedName(hostinfo2hostkey(hostinfo), host["name"])
end
end
else
host = "{}"
end


sendHTTPContentTypeHeader('text/html')
--sendHTTPHeader('application/json')

Expand Down

0 comments on commit 4d97f3b

Please sign in to comment.