mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Remove global flow user scripts on/off
This commit is contained in:
parent
f8ccfe24d8
commit
1d5ff7c4e7
10 changed files with 30 additions and 190 deletions
|
|
@ -287,14 +287,12 @@ function printAlerts()
|
|||
showElements = false
|
||||
end
|
||||
|
||||
local elementToSwitch = { "max_num_alerts_per_entity", "max_num_flow_alerts", "row_toggle_alert_probing",
|
||||
"row_toggle_malware_probing", "row_toggle_dns_alerts",
|
||||
"row_toggle_flow_alerts_iface", "row_alerts_retention_header", "row_alerts_settings_header", "row_alerts_security_header",
|
||||
"row_toggle_ssl_alerts", "row_toggle_dns_alerts", "row_toggle_remote_to_remote_alerts",
|
||||
"row_toggle_ip_reassignment_alerts", "row_toggle_dropped_flows_alerts", "row_alerts_informative_header",
|
||||
"row_toggle_device_first_seen_alert", "row_toggle_device_activation_alert", "row_toggle_pool_activation_alert", "row_toggle_quota_exceeded_alert", "row_toggle_mining_alerts", "row_toggle_device_protocols_alerts",
|
||||
"row_toggle_longlived_flows_alerts", "longlived_flow_duration", "row_toggle_elephant_flows_alerts", "elephant_flow_local_to_remote_bytes", "elephant_flow_remote_to_local_bytes",
|
||||
"row_toggle_data_exfiltration", "row_toggle_external_alerts", "row_toggle_potentially_dangerous_protocols_alerts"
|
||||
local elementToSwitch = { "max_num_alerts_per_entity", "max_num_flow_alerts",
|
||||
"row_alerts_retention_header", "row_alerts_settings_header", "row_alerts_security_header",
|
||||
"row_toggle_remote_to_remote_alerts",
|
||||
"row_toggle_ip_reassignment_alerts", "row_alerts_informative_header",
|
||||
"row_toggle_device_first_seen_alert", "row_toggle_device_activation_alert", "row_toggle_pool_activation_alert", "row_toggle_quota_exceeded_alert",
|
||||
"longlived_flow_duration", "elephant_flow_local_to_remote_bytes", "elephant_flow_remote_to_local_bytes"
|
||||
}
|
||||
|
||||
if not subpage_active.entries["toggle_mysql_check_open_files_limit"].hidden then
|
||||
|
|
@ -326,27 +324,6 @@ function printAlerts()
|
|||
if (showElements == false) then print(' style="display:none;"') end
|
||||
print('><th colspan=2 class="info">'..i18n("prefs.security_alerts")..'</th></tr>')
|
||||
|
||||
prefsToggleButton(subpage_active, {
|
||||
field = "toggle_alert_probing",
|
||||
pref = "probing_alerts",
|
||||
default = "0",
|
||||
hidden = not showElements,
|
||||
})
|
||||
|
||||
prefsToggleButton(subpage_active, {
|
||||
field = "toggle_ssl_alerts",
|
||||
pref = "ssl_alerts",
|
||||
default = "0",
|
||||
hidden = not showElements,
|
||||
})
|
||||
|
||||
prefsToggleButton(subpage_active, {
|
||||
field = "toggle_dns_alerts",
|
||||
pref = "dns_alerts",
|
||||
default = "0",
|
||||
hidden = not showElements,
|
||||
})
|
||||
|
||||
prefsToggleButton(subpage_active, {
|
||||
field = "toggle_ip_reassignment_alerts",
|
||||
pref = "ip_reassignment_alerts",
|
||||
|
|
@ -361,69 +338,11 @@ function printAlerts()
|
|||
hidden = not showElements,
|
||||
})
|
||||
|
||||
if ntop.isnEdge() then
|
||||
prefsToggleButton(subpage_active, {
|
||||
field = "toggle_dropped_flows_alerts",
|
||||
pref = "dropped_flows_alerts",
|
||||
default = "0",
|
||||
hidden = not showElements,
|
||||
})
|
||||
end
|
||||
|
||||
prefsToggleButton(subpage_active, {
|
||||
field = "toggle_mining_alerts",
|
||||
pref = "mining_alerts",
|
||||
default = "1",
|
||||
hidden = not showElements,
|
||||
})
|
||||
|
||||
prefsToggleButton(subpage_active, {
|
||||
field = "toggle_malware_probing",
|
||||
pref = "host_blacklist",
|
||||
default = "1",
|
||||
hidden = not showElements,
|
||||
})
|
||||
|
||||
prefsToggleButton(subpage_active, {
|
||||
field = "toggle_external_alerts",
|
||||
pref = "external_alerts",
|
||||
default = "1",
|
||||
hidden = not showElements,
|
||||
})
|
||||
|
||||
prefsToggleButton(subpage_active, {
|
||||
field = "toggle_potentially_dangerous_protocols_alerts",
|
||||
pref = "potentially_dangerous_protocols_alerts",
|
||||
default = "1",
|
||||
hidden = not showElements,
|
||||
})
|
||||
|
||||
prefsToggleButton(subpage_active, {
|
||||
field = "toggle_device_protocols_alerts",
|
||||
pref = "device_protocols_alerts",
|
||||
default = "0",
|
||||
hidden = not showElements,
|
||||
})
|
||||
|
||||
prefsToggleButton(subpage_active, {
|
||||
field = "toggle_longlived_flows_alerts",
|
||||
pref = "longlived_flows_alerts",
|
||||
default = ternary(prefs.are_longlived_flows_alerts_enabled, "1", "0"),
|
||||
hidden = not showElements,
|
||||
})
|
||||
|
||||
prefsInputFieldPrefs(subpage_active.entries["longlived_flow_duration"].title,
|
||||
subpage_active.entries["longlived_flow_duration"].description,
|
||||
"ntopng.prefs.", "longlived_flow_duration", prefs.longlived_flow_duration,
|
||||
"number", showElements, nil, nil, {min=1, max=60*60*24*7, tformat="mhd"})
|
||||
|
||||
prefsToggleButton(subpage_active, {
|
||||
field = "toggle_elephant_flows_alerts",
|
||||
pref = "elephant_flows_alerts",
|
||||
default = "0",
|
||||
hidden = not showElements,
|
||||
})
|
||||
|
||||
prefsInputFieldPrefs(subpage_active.entries["elephant_flow_local_to_remote_bytes"].title,
|
||||
subpage_active.entries["elephant_flow_local_to_remote_bytes"].description,
|
||||
"ntopng.prefs.", "elephant_flow_local_to_remote_bytes", prefs.elephant_flow_local_to_remote_bytes,
|
||||
|
|
@ -434,13 +353,6 @@ function printAlerts()
|
|||
"ntopng.prefs.", "elephant_flow_remote_to_local_bytes", prefs.elephant_flow_remote_to_local_bytes,
|
||||
"number", showElements, nil, nil, {min=1024, format_spec = FMT_TO_DATA_BYTES, tformat="kmg"})
|
||||
|
||||
prefsToggleButton(subpage_active, {
|
||||
field = "toggle_data_exfiltration",
|
||||
pref = "data_exfiltration_alerts",
|
||||
default = "1",
|
||||
hidden = not showElements,
|
||||
})
|
||||
|
||||
print('<tr id="row_alerts_informative_header" ')
|
||||
if (showElements == false) then print(' style="display:none;"') end
|
||||
print('><th colspan=2 class="info">'..i18n("prefs.status_alerts")..'</th></tr>')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue