mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Move local broadcast domain preference to the interface settings and show warnings
A dismissable warning is shown if DHCP traffic has been seen on the currrent interface.
This commit is contained in:
parent
cd77a1707e
commit
14a9d83a30
16 changed files with 130 additions and 31 deletions
26
scripts/lua/update_prefs.lua
Normal file
26
scripts/lua/update_prefs.lua
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
--
|
||||
-- (C) 2013-18 - ntop.org
|
||||
--
|
||||
|
||||
local dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
|
||||
require "lua_utils"
|
||||
local json = require "dkjson"
|
||||
|
||||
local res = {success = false}
|
||||
local ifid = _POST["ifid"]
|
||||
|
||||
sendHTTPHeader('application/json')
|
||||
|
||||
if isAdministrator() then
|
||||
if _POST["action"] == "move-rrd-to-influxdb" then
|
||||
ntop.setPref("ntopng.prefs.disable_ts_migration_message", "1")
|
||||
res.success = true
|
||||
elseif _POST["action"] == "host-id-message-warning" then
|
||||
ntop.setPref(string.format("ntopng.prefs.ifid_%u.disable_host_identifier_message", ifid), "1")
|
||||
res.success = true
|
||||
end
|
||||
end
|
||||
|
||||
print(json.encode(res))
|
||||
Loading…
Add table
Add a link
Reference in a new issue