mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-06 03:45:26 +00:00
Fixes missing mac filter (#9099)
This commit is contained in:
parent
dd19e209f0
commit
55c1f82308
4 changed files with 48 additions and 2 deletions
|
|
@ -87,6 +87,10 @@ if isEmptyString(device_ip) then
|
|||
device_ip = nil
|
||||
end
|
||||
|
||||
if isEmptyString(mac) then
|
||||
mac = nil
|
||||
end
|
||||
|
||||
local rsp = {}
|
||||
|
||||
local mapping_column_lua_c = {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ require "lua_utils_get"
|
|||
local rest_utils = require "rest_utils"
|
||||
local rsp = {}
|
||||
local country = _GET["country"]
|
||||
local mac = _GET["mac"]
|
||||
local asn = _GET["asn"]
|
||||
|
||||
local ip_version_filters = {{
|
||||
|
|
@ -345,4 +346,23 @@ if (not isEmptyString(asn)) then
|
|||
}
|
||||
end
|
||||
|
||||
local mac_filter = {{
|
||||
key = "mac",
|
||||
value = "",
|
||||
label = i18n("all")
|
||||
}, {
|
||||
key = "mac",
|
||||
value = mac,
|
||||
label = mac
|
||||
}}
|
||||
|
||||
if (not isEmptyString(mac)) then
|
||||
rsp[#rsp + 1] = {
|
||||
action = "mac",
|
||||
label = i18n("mac_address"),
|
||||
name = "mac",
|
||||
value = mac_filter
|
||||
}
|
||||
end
|
||||
|
||||
rest_utils.answer(rest_utils.consts.success.ok, rsp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue