mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Added new table to host countries page (#8473)
* Fixes parsing error while pasing XML strings with comments * Ported host countries table to new vue table * Added country filter when redirected to hosts list page * Ported network discovery table to TableWithConfig vue component * FIxed indentation * Added documentation for VueJS, Lua and cpp used in ntopng * Fixed error * Added Netbox pref entry for default site, customizable input box size. To implement cpp side for netbox default site * Removed tprint --------- Co-authored-by: DGabri <gabriele.deri@gmail.com>
This commit is contained in:
parent
e734e27ce5
commit
7321eadf7a
20 changed files with 1011 additions and 479 deletions
|
|
@ -2166,6 +2166,7 @@ local known_parameters = {
|
|||
["bandwidth_threshold"] = validateNumber,
|
||||
["toggle_netbox"] = validateBool,
|
||||
["netbox_activation_url"] = validateSingleWord,
|
||||
["netbox_default_site"] = validateSingleWord,
|
||||
["netbox_personal_access_token"] = validateSingleWord,
|
||||
|
||||
-- Service Map
|
||||
|
|
|
|||
|
|
@ -111,6 +111,10 @@ local menu_subpages = {{
|
|||
title = i18n("prefs.netbox_activation_url_title"),
|
||||
description = i18n("prefs.netbox_activation_url_description")
|
||||
},
|
||||
netbox_default_site = {
|
||||
title = i18n("prefs.netbox_default_site"),
|
||||
description = i18n("prefs.netbox_default_site_description")
|
||||
},
|
||||
netbox_personal_access_token = {
|
||||
title = i18n("prefs.netbox_personal_access_token_title"),
|
||||
description = i18n("prefs.netbox_personal_access_token_description")
|
||||
|
|
|
|||
|
|
@ -163,7 +163,6 @@ end
|
|||
|
||||
function prefsInputFieldPrefs(label, comment, prekey, key, default_value, _input_type, showEnabled, disableAutocomplete, allowURLs, extra)
|
||||
extra = extra or {}
|
||||
|
||||
if(string.ends(prekey, ".")) then
|
||||
k = prekey..key
|
||||
else
|
||||
|
|
@ -295,6 +294,8 @@ function prefsInputFieldPrefs(label, comment, prekey, key, default_value, _input
|
|||
if extra.width == nil then
|
||||
if _input_type == "number" then
|
||||
style["width"] = "8em"
|
||||
elseif (extra["inputBoxWidth"] ~= nil) then
|
||||
style["width"] = extra["inputBoxWidth"] -- use em i.e. 20em
|
||||
else
|
||||
style["width"] = "20em"
|
||||
end
|
||||
|
|
@ -842,6 +843,13 @@ function getNetBoxURL()
|
|||
return ntop.getPref("ntopng.prefs.netbox_activation_url")
|
||||
end
|
||||
|
||||
function getNetBoxDefaultSite()
|
||||
if not ntop.isEnterpriseXL() or not ntop.getPref("ntopng.prefs.toggle_netbox") == "1" then
|
||||
return ""
|
||||
end
|
||||
return ntop.getPref("ntopng.prefs.netbox_default_site")
|
||||
end
|
||||
|
||||
function getNetBoxToken()
|
||||
if not ntop.isEnterpriseXL() or not ntop.getPref("ntopng.prefs.toggle_netbox") == "1" then
|
||||
return ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue