%
local map = self.map
local api = map.api
local appname = map.config
local shunt_rule_list = {}
local node = map:get("@global[0]", "node")
if node then
local node_protocol = map:get(node, "protocol")
if node_protocol == "_shunt" then
local node_shunt_group = map:get(node, "shunt_group")
map:foreach("shunt_rules", function(e)
if e[".name"] and e.remarks and e.group == node_shunt_group then
shunt_rule_list[#shunt_rule_list + 1] = e
end
end)
shunt_rule_list[#shunt_rule_list + 1] = {
[".name"] = "default_node",
remarks = translate("Default")
}
end
end
-%>
<%:Click to sort; click again to reverse. Press Save & Apply to keep the order.%><%:Sort by type or protocol, then by name%><%:Sort by server address and port%><%:Restore the saved order%><%:The order changed on this page only. Press Save & Apply to store it on the router.%><%:Saved order restored.%><%:Automatic ping is still running (%d left). Sorting will run when it finishes.%><%:Automatic ping did not finish within 2 minutes. Sorting was cancelled. Reload the page and try again.%><%:Filter:%><%:All%><%:(empty)%><%:Type%><%:Address%><%:Word in remarks%><%:search...%><%:Show only rows that contain this text%><%:Shown %s of %t%><%:Reset%><%:Show all rows%><%:The filter only hides rows on this page and changes nothing on the router. Select all skips hidden rows.%>
<%:Add the node via the link%>
<%:Enter share links, one per line. Subscription links are not supported!%>
<%:Reassign Node Group%>
<%:You choose node is:%>
<%- if #shunt_rule_list > 0 then
for i, v in ipairs(shunt_rule_list) do
-%>
')" value="<%=v.remarks%>" />
<%-
end
-%>
<% else %>
<% end %>