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:
GabrieleDeri 2024-06-25 10:57:57 +02:00 committed by GitHub
parent e734e27ce5
commit 7321eadf7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 1011 additions and 479 deletions

View file

@ -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 ""