mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
parent
d04d5da466
commit
1a23ccb07f
1 changed files with 3 additions and 2 deletions
|
|
@ -47,7 +47,8 @@ local function countHosts()
|
|||
end
|
||||
|
||||
function dumpInterfaceStats(interface_name)
|
||||
interface.select(interface_name..'')
|
||||
local ifid = getInterfaceId(interface_name)
|
||||
interface.select(ifid..'')
|
||||
|
||||
local ifstats = interface.getStats()
|
||||
|
||||
|
|
@ -182,7 +183,7 @@ if(_GET["iffilter"] == "all") then
|
|||
local ifid = getInterfaceId(ifname)
|
||||
-- ifid in the key must be a string or json.encode will think
|
||||
-- its a lua array and will look for integers starting at one
|
||||
res[ifid..""] = dumpInterfaceStats(ifid)
|
||||
res[ifid..""] = dumpInterfaceStats(ifname)
|
||||
end
|
||||
elseif not isEmptyString(_GET["iffilter"]) then
|
||||
res = dumpInterfaceStats(_GET["iffilter"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue