Add S7Comm learning period configuration

This commit is contained in:
Alfredo Cardigliano 2025-12-17 10:14:59 +01:00
parent 8be49d4608
commit 6a95f44b48
6 changed files with 29 additions and 5 deletions

View file

@ -1261,11 +1261,11 @@ if auth.has_capability(auth.capabilities.preferences) then
print('<thead class="table-primary"><tr><th colspan=2 class="info">' .. i18n("prefs.ot_protocols") ..
'</th></tr></thead>')
-- By default 1 hour of learning
-- By default 6 hours of learning
prefsInputFieldPrefs(subpage_active.entries["iec60870_learning_period"].title,
subpage_active.entries["iec60870_learning_period"].description, "ntopng.prefs.", "iec60870_learning_period",
prefs.iec60870_learning_period or 3600, "number", nil, nil, nil, {
min = 21600,
prefs.iec60870_learning_period or 21600, "number", nil, nil, nil, {
min = 3600,
tformat = "hd"
})
@ -1277,6 +1277,14 @@ if auth.has_capability(auth.capabilities.preferences) then
tformat = "hd"
})
-- By default 6 hours of learning
prefsInputFieldPrefs(subpage_active.entries["s7comm_learning_period"].title,
subpage_active.entries["s7comm_learning_period"].description, "ntopng.prefs.", "s7comm_learning_period",
prefs.s7comm_learning_period or 21600, "number", is_behaviour_analysis_enabled, nil, nil, {
min = 3600,
tformat = "hd"
})
print(
'<tr><th colspan=2 style="text-align:right;"><button type="submit" class="btn btn-primary" style="width:115px" disabled="disabled">' ..
i18n("save") .. '</button></th></tr>')