Refactors user_scripts into checks (lua)

This commit is contained in:
Simone Mainardi 2021-06-16 18:02:22 +02:00
parent 3c3aa5a25f
commit 76fd315d1b
222 changed files with 980 additions and 981 deletions

View file

@ -34,7 +34,7 @@ page_utils.menu_sections = {
if_stats = {key = "if_stats", i18n_title = "interface", icon = "fas fa-ethernet"},
system_stats = {key = "system_stats", i18n_title = "system", icon = "fas fa-desktop"},
admin = {key = "admin", i18n_title = "settings", icon = "fas fa-cog"},
alert_exclusions = {key = "alert_exclusions", i18n_title = "edit_user_script.exclusion_list", icon = "fas fa-bell-slash"},
alert_exclusions = {key = "alert_exclusions", i18n_title = "edit_check.exclusion_list", icon = "fas fa-bell-slash"},
dev = {key = "dev", i18n_title = "developer", icon = "fas fa-code"},
about = {key = "about", i18n_title = "help", icon = "fas fa-life-ring"},
health = {key = "health", i18n_title = "health", icon = "fas fa-laptop-medical"},
@ -42,7 +42,7 @@ page_utils.menu_sections = {
tools = {key = "tools", i18n_title = "tools", icon = "fas fa-cogs"},
pools = {key = "pools", i18n_title = "pools.pools", icon = "fas fa-users"},
notifications = {key = "notifications", i18n_title = "endpoint_notifications.notifications", icon = "fas fa-bell"},
user_scripts = {key = "user_scripts", i18n_title = "about.user_scripts" },
checks = {key = "checks", i18n_title = "about.checks" },
-- nEdge
views = {key = "hosts", i18n_title = "views", icon = "fas fa-bars"},
}
@ -112,17 +112,17 @@ page_utils.menu_entries = {
nedge_users = {key = "nedge_users", i18n_title = "manage_users.manage_users", section = "admin", help_link = "https://www.ntop.org/guides/nedge/users.html#"},
manage_users = {key = "manage_users", i18n_title = ternary(is_nedge, "nedge.system_users", "manage_users.manage_users"), section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/settings.html#manage-users"},
preferences = {key = "preferences", i18n_title = "prefs.preferences", section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/settings.html#preferences"},
scripts_config = {key = "scripts_config", i18n_title = "about.user_scripts", section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/user_scripts.html"},
scripts_config_hosts = {key = "scripts_config", subkey="hosts", i18n_title = alert_entities.host.i18n_label, section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/user_scripts.html"},
scripts_config_interfaces = {key = "scripts_config", subkey="interfaces", i18n_title = alert_entities.interface.i18n_label, section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/user_scripts.html"},
scripts_config_networks = {key = "scripts_config", subkey="networks", i18n_title = alert_entities.network.i18n_label, section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/user_scripts.html"},
scripts_config_snmp_devices = {key = "scripts_config", subkey="snmp_devices", i18n_title = alert_entities.snmp_device.i18n_label, section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/user_scripts.html"},
scripts_config_flows = {key = "scripts_config", subkey="flows", i18n_title = alert_entities.flow.i18n_label, section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/user_scripts.html"},
scripts_config_system = {key = "scripts_config", subkey="system", i18n_title = alert_entities.system.i18n_label, section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/user_scripts.html"},
scripts_config_syslog = {key = "scripts_config", subkey="syslog", i18n_title = "syslog.syslog", section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/user_scripts.html"},
alert_exclusions = {key = "alert_exclusions", i18n_title = "edit_user_script.exclusion_list", section = "alert_exclusions", help_link = "https://www.ntop.org/guides/ntopng/web_gui/user_scripts.html"},
alert_exclusions_hosts = {key = "alert_exclusions", subkey="hosts", i18n_title = alert_entities.host.i18n_label, section = "alert_exclusions", help_link = "https://www.ntop.org/guides/ntopng/web_gui/user_scripts.html"},
alert_exclusions_flows = {key = "alert_exclusions", subkey="flows", i18n_title = alert_entities.flow.i18n_label, section = "alert_exclusions", help_link = "https://www.ntop.org/guides/ntopng/web_gui/user_scripts.html"},
scripts_config = {key = "scripts_config", i18n_title = "about.checks", section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/checks.html"},
scripts_config_hosts = {key = "scripts_config", subkey="hosts", i18n_title = alert_entities.host.i18n_label, section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/checks.html"},
scripts_config_interfaces = {key = "scripts_config", subkey="interfaces", i18n_title = alert_entities.interface.i18n_label, section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/checks.html"},
scripts_config_networks = {key = "scripts_config", subkey="networks", i18n_title = alert_entities.network.i18n_label, section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/checks.html"},
scripts_config_snmp_devices = {key = "scripts_config", subkey="snmp_devices", i18n_title = alert_entities.snmp_device.i18n_label, section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/checks.html"},
scripts_config_flows = {key = "scripts_config", subkey="flows", i18n_title = alert_entities.flow.i18n_label, section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/checks.html"},
scripts_config_system = {key = "scripts_config", subkey="system", i18n_title = alert_entities.system.i18n_label, section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/checks.html"},
scripts_config_syslog = {key = "scripts_config", subkey="syslog", i18n_title = "syslog.syslog", section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/checks.html"},
alert_exclusions = {key = "alert_exclusions", i18n_title = "edit_check.exclusion_list", section = "alert_exclusions", help_link = "https://www.ntop.org/guides/ntopng/web_gui/checks.html"},
alert_exclusions_hosts = {key = "alert_exclusions", subkey="hosts", i18n_title = alert_entities.host.i18n_label, section = "alert_exclusions", help_link = "https://www.ntop.org/guides/ntopng/web_gui/checks.html"},
alert_exclusions_flows = {key = "alert_exclusions", subkey="flows", i18n_title = alert_entities.flow.i18n_label, section = "alert_exclusions", help_link = "https://www.ntop.org/guides/ntopng/web_gui/checks.html"},
license = {key = "license", i18n_title = "license_page.license", section = "admin"},
profiles = {key = "profiles", i18n_title = "traffic_profiles.traffic_profiles", section = "admin", help_link = "https://www.ntop.org/guides/ntopng/advanced_features/traffic_profiles.html"},
categories = {key = "categories", i18n_title = "custom_categories.apps_and_categories", section = "admin", help_link = "https://www.ntop.org/guides/ntopng/web_gui/categories.html#custom-applications"},
@ -150,7 +150,7 @@ page_utils.menu_entries = {
-- Developer
directories = {key = "directories", i18n_title = "about.directories", section = "dev", help_link = "https://www.ntop.org/guides/ntopng/plugins/distributing_plugins.html"},
plugins = {key = "plugins", i18n_title = "plugins", section = "dev", help_link = "https://www.ntop.org/guides/ntopng/basic_concepts/plugins.html"},
user_scripts_dev = {key = "user_scripts_dev", i18n_title = "about.user_scripts", section = "dev", help_link = "https://www.ntop.org/guides/ntopng/plugins/user_scripts.html"},
checks_dev = {key = "checks_dev", i18n_title = "about.checks", section = "dev", help_link = "https://www.ntop.org/guides/ntopng/plugins/checks.html"},
plugin_browser = {key = "plugin_browser", i18n_title = "plugin_browser", section = "dev"},
alert_definitions = {key = "alert_definitions", i18n_title = "about.alert_defines", section = "dev", help_link = "https://www.ntop.org/guides/ntopng/plugins/alert_definitions.html"},
api = {key = "api", i18n_title = "lua_c_api", section = "dev"},