Host pools improvements

- Traffic Policy: get first available pool, not the "Not Assigned"
- Allow to change MAC address host pool from the MAC page
- When changing an IP address pool from the host page, change MAC address instead, if available
- Show the MAC manufacturer in the host pool memebers page and allow to set a filter with it
This commit is contained in:
emanuele-f 2017-05-22 12:47:10 +02:00
parent 1e4b0636ed
commit 4bc96c935a
11 changed files with 179 additions and 38 deletions

View file

@ -415,6 +415,15 @@ local function validateMember(m)
end
end
local function validateMembersFilter(m)
if starts(m, "manuf:") then
m = string.sub(m, string.len("manuf:") + 1)
return validateUnquoted(m)
end
return validateMember(m)
end
local function validateIdToDelete(i)
if ((i == "__all__") or validateNumber(i)) then
return true
@ -900,6 +909,7 @@ local known_parameters = {
["flow_status"] = validateFlowStatus, -- flows_stats.lua
["include_unlimited"] = validateBool, -- pool_details_ndpi.lua
["policy_preset"] = validateEmptyOr(validatePolicyPreset), -- a traffic bridge policy set
["members_filter"] = validateMembersFilter, -- host_pools.lua
}
-- A special parameter is formed by a prefix, followed by a variable suffix