mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 19:15:03 +00:00
Adds category id to the rest application consts getter
Implements #3944
This commit is contained in:
parent
04945cc72f
commit
38067e4ef8
2 changed files with 6 additions and 3 deletions
|
|
@ -23,8 +23,11 @@ local res = {}
|
|||
|
||||
local applications = interface.getnDPIProtocols()
|
||||
|
||||
for application, application_id in pairs(applications) do
|
||||
res[application] = {application_id = tonumber(application_id)}
|
||||
for application, appl_id in pairs(applications) do
|
||||
appl_id = tonumber(appl_id)
|
||||
local cat = ntop.getnDPIProtoCategory(appl_id)
|
||||
|
||||
res[application] = {appl_id = appl_id, cat_id = cat.id}
|
||||
end
|
||||
|
||||
print(rest_utils.rc(rc, res))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue