mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 19:15:03 +00:00
Refactors user_scripts into checks (lua)
This commit is contained in:
parent
3c3aa5a25f
commit
76fd315d1b
222 changed files with 980 additions and 981 deletions
|
|
@ -2,7 +2,7 @@
|
|||
-- (C) 2019-21 - ntop.org
|
||||
--
|
||||
|
||||
local user_scripts = require("user_scripts")
|
||||
local checks = require("checks")
|
||||
local ts_utils = require("ts_utils_core")
|
||||
local plugins_utils = require("plugins_utils")
|
||||
local am_utils = plugins_utils.loadModule("active_monitoring", "am_utils")
|
||||
|
|
@ -12,7 +12,7 @@ local do_trace = false
|
|||
|
||||
local script = {
|
||||
-- Script category
|
||||
category = user_scripts.script_categories.network,
|
||||
category = checks.script_categories.network,
|
||||
|
||||
-- This module is enabled by default
|
||||
default_enabled = true,
|
||||
|
|
@ -18,7 +18,7 @@ local am_pool = active_monitoring_pools:create()
|
|||
|
||||
local graph_utils = require("graph_utils")
|
||||
local alert_utils = require("alert_utils")
|
||||
local user_scripts = require("user_scripts")
|
||||
local checks = require("checks")
|
||||
local auth = require "auth"
|
||||
|
||||
local ts_creation = plugins_utils.timeseriesCreationEnabled()
|
||||
|
|
@ -41,12 +41,12 @@ local url = base_url
|
|||
local info = ntop.getInfo()
|
||||
local measurement_info
|
||||
|
||||
if (not user_scripts.isSystemScriptEnabled("active_monitoring")) then
|
||||
if (not checks.isSystemScriptEnabled("active_monitoring")) then
|
||||
-- The active monitoring is disabled
|
||||
print [[<div class="alert alert-warning" role="alert">]]
|
||||
print(i18n("host_config.active_monitor_enable", {
|
||||
url = ntop.getHttpPrefix() ..
|
||||
'/lua/admin/edit_configset.lua?subdir=system&user_script=active_monitoring#all'
|
||||
'/lua/admin/edit_configset.lua?subdir=system&check=active_monitoring#all'
|
||||
}))
|
||||
print [[</div>]]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue