mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-23 00:17:16 +08:00
Update On Sun Aug 3 20:40:41 CEST 2025
This commit is contained in:
@@ -496,6 +496,27 @@ function delete_select_nodes()
|
||||
uci:delete(appname, t[".name"], "to_node")
|
||||
uci:delete(appname, t[".name"], "chain_proxy")
|
||||
end
|
||||
local list_name = t["urltest_node"] and "urltest_node" or (t["balancing_node"] and "balancing_node")
|
||||
if list_name then
|
||||
local nodes = uci:get_list(appname, t[".name"], list_name)
|
||||
if nodes then
|
||||
local changed = false
|
||||
local new_nodes = {}
|
||||
for _, node in ipairs(nodes) do
|
||||
if node ~= w then
|
||||
table.insert(new_nodes, node)
|
||||
else
|
||||
changed = true
|
||||
end
|
||||
end
|
||||
if changed then
|
||||
uci:set_list(appname, t[".name"], list_name, new_nodes)
|
||||
end
|
||||
end
|
||||
end
|
||||
if t["fallback_node"] == w then
|
||||
uci:delete(appname, t[".name"], "fallback_node")
|
||||
end
|
||||
end)
|
||||
if (uci:get(appname, w, "add_mode") or "0") == "2" then
|
||||
local add_from = uci:get(appname, w, "add_from") or ""
|
||||
|
||||
Reference in New Issue
Block a user