mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Fixes blacklist count for #8078
This commit is contained in:
parent
f52ba41602
commit
3fc883df5b
7 changed files with 30 additions and 20 deletions
|
|
@ -202,13 +202,14 @@ function lists_utils.getCategoryLists()
|
|||
local redis_lists = loadListsFromRedis()
|
||||
local all_lists = get_lists()
|
||||
local blacklists_stats = ntop.getBlacklistStats()
|
||||
|
||||
|
||||
local default_status = {last_update=0, num_hosts=0, last_error=false, num_errors=0}
|
||||
|
||||
for key, default_values in pairs(all_lists) do
|
||||
local list = table.merge(default_values, redis_lists[key] or {status = {}})
|
||||
list.status = table.merge(default_status, list.status)
|
||||
list.status.num_hits = blacklists_stats[key] or 0
|
||||
|
||||
list.status.num_hits = blacklists_stats[key] or { current = 0, total = 0 }
|
||||
lists[key] = list
|
||||
list.name = key
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue