mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
parent
b7f756c7ac
commit
20fe918d66
8 changed files with 81 additions and 48 deletions
22
scripts/lua/geoip_config.lua
Normal file
22
scripts/lua/geoip_config.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
--
|
||||
-- (C) 2013-20 - ntop.org
|
||||
--
|
||||
|
||||
local dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
local json = require("dkjson")
|
||||
require "lua_utils"
|
||||
|
||||
if _POST and isAdministrator() then
|
||||
local dismiss_missing_geoip_reminder = _POST["dismiss_missing_geoip_reminder"]
|
||||
|
||||
if not isEmptyString(dismiss_missing_geoip_reminder) then
|
||||
if dismiss_missing_geoip_reminder == "true" then
|
||||
ntop.setPref("ntopng.prefs.geoip.reminder_dismissed", "true")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
sendHTTPContentTypeHeader('application/json')
|
||||
|
||||
print(json.encode({status = "OK"}))
|
||||
Loading…
Add table
Add a link
Reference in a new issue