Fixed the host pool members table (#9853)

This commit is contained in:
Manuel Ceroni 2025-11-26 17:10:45 +01:00 committed by GitHub
parent 2956ea2641
commit 0eb55dba19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 35 additions and 4 deletions

View file

@ -112,7 +112,7 @@ function host_pools:get_member_details(member)
local res = {}
local member_name
local member_type
local host_info = hostkey2hostinfo(member)
local host_info = poolkey2poolinfo(member)
local address = host_info["host"]
if isMacAddress(address) then

View file

@ -161,7 +161,6 @@ end
-- ##############################################
-- faccio add alla pool che voglio
-- @brief Add a member to a pool
function pools_rest_utils.add_member()
local pools = require "host_pools"
@ -485,7 +484,10 @@ function pools_rest_utils.get_pool_members(pools)
for member, details in pairs(cur_pool["member_details"]) do
details["member"] = member
details["member_cidr"] = member:match("([^@]+)")
details["member_cidr"] = details["name"]
if details["type"] ~= "ip" then
details["member_cidr"] = member:match("([^@]+)")
end
res[#res + 1] = details
end