mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Removed MUD implementation obsoleted by the service map
Fixes #4326 Fixes 3499
This commit is contained in:
parent
ac1ad3a3e3
commit
31a33b1b11
7 changed files with 0 additions and 921 deletions
|
|
@ -232,60 +232,6 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
--
|
||||
-- MUD template
|
||||
--
|
||||
|
||||
local FlowMUDTemplate = {}
|
||||
|
||||
function FlowMUDTemplate:new()
|
||||
local obj = Template:new("flow_mud")
|
||||
|
||||
setmetatable(obj, self)
|
||||
self.__index = self
|
||||
|
||||
return obj
|
||||
end
|
||||
|
||||
function FlowMUDTemplate:parseConfig(script, conf)
|
||||
if(tonumber(conf.max_recording) == nil) then
|
||||
return false, "bad max_recording value"
|
||||
end
|
||||
|
||||
return http_lint.validateListItems(script, conf, "device_types")
|
||||
end
|
||||
|
||||
function FlowMUDTemplate:describeConfig(script, hooks_conf)
|
||||
local discover = require("discover_utils")
|
||||
local mud_utils = require("mud_utils")
|
||||
|
||||
if(not hooks_conf.all) then
|
||||
return '' -- disabled, nothing to show
|
||||
end
|
||||
|
||||
local conf = hooks_conf.all.script_conf
|
||||
|
||||
if(not conf.max_recording) then
|
||||
return ''
|
||||
end
|
||||
|
||||
local enabled_on = {}
|
||||
|
||||
for _, k in pairs(conf.device_types or {}) do
|
||||
enabled_on[#enabled_on + 1] = discover.devtype2string(discover.devtype2id(k))
|
||||
end
|
||||
|
||||
local msg = i18n("user_scripts.stop_recording_after", {duration = mud_utils.formatMaxRecording(conf.max_recording)})
|
||||
|
||||
if(#enabled_on > 0) then
|
||||
msg = msg .. ". " .. i18n("user_scripts.mud_enabled_on", {device_types = table.concat(enabled_on, ', ')})
|
||||
end
|
||||
|
||||
return msg
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
-- Available templates
|
||||
return {
|
||||
default = DefaultTemplate:new(),
|
||||
|
|
@ -294,5 +240,4 @@ return {
|
|||
items_list = ItemsList:new(),
|
||||
elephant_flows = ElephantFlowsTemplate:new(),
|
||||
long_lived = LongLivedTemplate:new(),
|
||||
flow_mud = FlowMUDTemplate:new(),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue