mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 19:15:03 +00:00
Return a standard json format for arrays
This commit is contained in:
parent
da44b8fb65
commit
6eec119083
8 changed files with 32 additions and 13 deletions
|
|
@ -23,7 +23,10 @@ local rc = rest_utils.consts_ok
|
|||
local res = {}
|
||||
|
||||
for severity, severity_descr in pairs(alert_consts.alert_severities) do
|
||||
res[severity] = {severity_id = severity_descr.severity_id}
|
||||
res[#res + 1] = {
|
||||
severity = severity,
|
||||
id = severity_descr.severity_id,
|
||||
}
|
||||
end
|
||||
|
||||
print(rest_utils.rc(rc, res))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue