mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
using 'unknown' presets as default, added also 'unknown' to the editor
This commit is contained in:
parent
2ac9e5406c
commit
9f77e758f0
4 changed files with 197 additions and 32 deletions
|
|
@ -281,14 +281,14 @@ end
|
|||
|
||||
-- ################################################################################
|
||||
|
||||
function discover.printDeviceTypeSelectorOptions(device_type)
|
||||
function discover.printDeviceTypeSelectorOptions(device_type, skip_unknown)
|
||||
device_type = tonumber(device_type)
|
||||
|
||||
for typeid, info in discover.sortedDeviceTypeLabels() do
|
||||
local devtype = info[1]
|
||||
local label = info[2]
|
||||
|
||||
if devtype ~= "unknown" then
|
||||
if not skip_unknown or devtype ~= "unknown" then
|
||||
print("<option value=\"".. typeid .."\"")
|
||||
if(typeid == device_type) then print(" selected") end
|
||||
print(">".. label .."</option>")
|
||||
|
|
@ -302,7 +302,7 @@ function discover.printDeviceTypeSelector(device_type, field_name)
|
|||
print [[<div class="form-group"><select name="]] print(field_name) print[[" class="form-control">\
|
||||
<option value="0"></option>]]
|
||||
|
||||
discover.printDeviceTypeSelectorOptions(device_type)
|
||||
discover.printDeviceTypeSelectorOptions(device_type, true)
|
||||
|
||||
print [[</select></div>]]
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue