mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Fix migrations
This commit is contained in:
parent
e9f69aa756
commit
c4d4e1d4dc
1 changed files with 4 additions and 1 deletions
|
|
@ -1992,8 +1992,10 @@ end
|
|||
-- Migrate old configurations
|
||||
|
||||
function vs_utils.migrate_keys()
|
||||
local old_hash_key = "ntopng.prefs.hosts_to_scan"
|
||||
|
||||
local old_hash_key = "ntopng.prefs.host_to_scan"
|
||||
local old_hosts = ntop.getHashKeysCache(old_hash_key) or {}
|
||||
|
||||
for key,_ in pairs(old_hosts) do
|
||||
local hash_value_string = ntop.getHashCache(old_hash_key, key)
|
||||
local old_hash_value = json.decode(hash_value_string)
|
||||
|
|
@ -2002,6 +2004,7 @@ function vs_utils.migrate_keys()
|
|||
host = old_hash_value.host,
|
||||
host_name = old_hash_value.host_name,
|
||||
scan_type = old_hash_value.scan_type,
|
||||
scan_frequency = old_hash_value.scan_frequency,
|
||||
ports = old_hash_value.ports,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue