mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Migrate C flow status alerts to Lua user scripts
- Alerts and flow status cleanup - Community flow user scripts migration - Implement scripts filters by l7 proto and packet interface only - Migrate flow2statusinfojson - Lower flow periodic update to 30 seconds if there is flow activity - Display flow scripts without a gui section
This commit is contained in:
parent
bfdf5773d3
commit
b3a8c6d49a
37 changed files with 1071 additions and 1287 deletions
|
|
@ -26,16 +26,31 @@ local function print_callbacks_config_tbody_simple_view(descr)
|
|||
local has_modules = false
|
||||
|
||||
for _, user_script in pairsByKeys(descr.modules, asc) do
|
||||
if user_script.gui then
|
||||
if true --[[user_script.gui]] then
|
||||
if not has_modules then
|
||||
has_modules = true
|
||||
end
|
||||
|
||||
print("<tr><td><b>".. i18n(user_script.gui.i18n_title) .."</b><br>")
|
||||
print("<small>"..i18n(user_script.gui.i18n_description)..".</small>\n")
|
||||
local title
|
||||
local description
|
||||
|
||||
if(user_script.gui) then
|
||||
title = i18n(user_script.gui.i18n_title) or user_script.gui.i18n_title
|
||||
description = i18n(user_script.gui.i18n_description) or user_script.gui.i18n_description
|
||||
else
|
||||
title = user_script.key
|
||||
description = ""
|
||||
end
|
||||
|
||||
print("<tr><td><b>".. title .."</b><br>")
|
||||
print("<small>"..description..".</small>\n")
|
||||
|
||||
print("</td><td>")
|
||||
print(user_script.gui.input_builder(user_script))
|
||||
if(user_script.gui and user_script.gui.input_builder) then
|
||||
print(user_script.gui.input_builder(user_script))
|
||||
else
|
||||
print('<a href="'.. ntop.getHttpPrefix() ..'/lua/admin/prefs.lua?tab=alerts"><i class="fa fa-flask fa-lg"></i></a>')
|
||||
end
|
||||
print("</td>")
|
||||
|
||||
if user_script.benchmark and table.len(user_script.benchmark) > 0 then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue