mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 16:30:10 +00:00
Added support to wlan ssid filter (#8702)
This commit is contained in:
parent
267c5aeb7b
commit
15c35ce2dd
12 changed files with 616 additions and 468 deletions
|
|
@ -24,6 +24,7 @@ local flow_info = _GET["flow_info"]
|
|||
local flowstats = interface.getActiveFlowsStats(host, nil, false, talking_with, client, server, flow_info)
|
||||
local selected_ip = _GET["flowhosts_type"]
|
||||
|
||||
|
||||
local rsp = {}
|
||||
|
||||
if interface.isView() then
|
||||
|
|
@ -457,6 +458,34 @@ if table.len(networks_stats) > 1 then
|
|||
}
|
||||
end
|
||||
|
||||
local wlan_ssid_filters = {{
|
||||
key = "wlan_ssid",
|
||||
value = "",
|
||||
label = i18n("all")
|
||||
}}
|
||||
|
||||
if table.len(flowstats["wlan_ssid"]) > 0 then
|
||||
local tmp_list = {}
|
||||
for key, value in pairs(flowstats["wlan_ssid"] or {}, asc) do
|
||||
tmp_list[key] = {
|
||||
key = "wlan_ssid",
|
||||
value = key,
|
||||
label = key
|
||||
}
|
||||
end
|
||||
|
||||
for _, value in pairsByKeys(tmp_list, asc) do
|
||||
wlan_ssid_filters[#wlan_ssid_filters + 1] = value
|
||||
end
|
||||
|
||||
rsp[#rsp + 1] = {
|
||||
action = "wlan_ssid",
|
||||
label = i18n("flow_fields_description.wlan_ssid"),
|
||||
name = "wlan_ssid",
|
||||
value = wlan_ssid_filters
|
||||
}
|
||||
end
|
||||
|
||||
if ntop.isPro() and interface.isPacketInterface() == false then
|
||||
local flowdevs = interface.getFlowDevices() or {}
|
||||
local devips = getProbesName(flowdevs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue