mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Fixes flow devices not working with view interface
This commit is contained in:
parent
21129f81e4
commit
f6c29ea09f
11 changed files with 187 additions and 153 deletions
|
|
@ -298,32 +298,34 @@ function printHostsDeviceFilterDropdown(base_url, page_params)
|
|||
|
||||
dev_params["deviceIP"] = nil
|
||||
|
||||
if table.len(devips) > 0 then
|
||||
print[[, '<div class="btn-group float-right">]]
|
||||
for interface, device_list in pairs(devips or {}) do
|
||||
for dev_ip, dev_resolved_name in pairsByValues(device_list, asc) do
|
||||
print[[, '<div class="btn-group float-right">]]
|
||||
|
||||
print[[
|
||||
<button class="btn btn-link dropdown-toggle" data-bs-toggle="dropdown">]] print(i18n("flows_page.device_ip")) print[[]] print(cur_dev_filter) print[[<span class="caret"></span></button>\
|
||||
<ul class="dropdown-menu dropdown-menu-end scrollable-dropdown" role="menu" id="flow_dropdown">\
|
||||
]]print('<li><a class="dropdown-item') print(page_params.deviceIP == nil and ' active' or '') print[[" href="]] print(getPageUrl(base_url, dev_params)) print[[">]] print(i18n("flows_page.all_devices")) print[[</a></li>\]]
|
||||
print[[
|
||||
<button class="btn btn-link dropdown-toggle" data-bs-toggle="dropdown">]] print(i18n("flows_page.device_ip")) print[[]] print(cur_dev_filter) print[[<span class="caret"></span></button>\
|
||||
<ul class="dropdown-menu dropdown-menu-end scrollable-dropdown" role="menu" id="flow_dropdown">\
|
||||
]]print('<li><a class="dropdown-item') print(page_params.deviceIP == nil and ' active' or '') print[[" href="]] print(getPageUrl(base_url, dev_params)) print[[">]] print(i18n("flows_page.all_devices")) print[[</a></li>\]]
|
||||
|
||||
for dev_ip, dev_resolved_name in ordering_fun(devips, asc) do
|
||||
local dev_name = dev_ip
|
||||
for dev_ip, dev_resolved_name in ordering_fun(device_list, asc) do
|
||||
local dev_name = dev_ip
|
||||
|
||||
dev_params["deviceIP"] = dev_name
|
||||
dev_params["deviceIP"] = dev_name
|
||||
|
||||
if not isEmptyString(dev_resolved_name) and dev_resolved_name ~= dev_name then
|
||||
dev_name = dev_name .. " ["..shortenString(dev_resolved_name).."]"
|
||||
if not isEmptyString(dev_resolved_name) and dev_resolved_name ~= dev_name then
|
||||
dev_name = dev_name .. " ["..shortenString(dev_resolved_name).."]"
|
||||
end
|
||||
|
||||
print[[
|
||||
<li><a class="dropdown-item ]] print(dev_ip == cur_dev and 'active' or '') print[[" href="]] print(getPageUrl(base_url, dev_params)) print[[">]] print(i18n("flows_page.device_ip").." "..dev_name) print[[</a></li>\]]
|
||||
end
|
||||
|
||||
print[[
|
||||
<li><a class="dropdown-item ]] print(dev_ip == cur_dev and 'active' or '') print[[" href="]] print(getPageUrl(base_url, dev_params)) print[[">]] print(i18n("flows_page.device_ip").." "..dev_name) print[[</a></li>\]]
|
||||
</ul>\
|
||||
]]
|
||||
|
||||
print[[</div>']]
|
||||
end
|
||||
|
||||
print[[
|
||||
</ul>\
|
||||
]]
|
||||
|
||||
print[[</div>']]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue