mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Fix findDnsPreset
This commit is contained in:
parent
405386072d
commit
9411232b86
2 changed files with 21 additions and 20 deletions
|
|
@ -879,6 +879,24 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function system_config.findDnsPreset(preset_name)
|
||||
require("prefs_utils")
|
||||
|
||||
for _, preset in pairs(DNS_PRESETS) do
|
||||
if preset.id == preset_name then
|
||||
return preset
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
function system_config:_get_default_global_dns_preset()
|
||||
return system_config.findDnsPreset("google")
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function system_config:getDnsConfig()
|
||||
return self.config.globals.dns
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue