<% local map = self.map local api = map.api local appname = map.config local is_js_luci = api.is_js_luci() local section_tag = is_js_luci and "div" or "fieldset" local default_node_type = "" local shunt_rule_list = {} local node = map:get("@global[0]", "node") if node then local node_type = map:get(node, "type") local node_protocol = map:get(node, "protocol") if (node_type == "Xray" or node_type == "sing-box") and node_protocol == "_shunt" then default_node_type = node_protocol 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) end end -%>
<<%=section_tag%> class="cbi-section" id="node_list"> >

<%:Reassign Node Group%>

<%:default%>
<%:You choose node is:%>
<% if default_node_type == "_shunt" then %>
<% for i, v in ipairs(shunt_rule_list) do %> ')" value="<%=v.remarks%>" /> <% end %>
<% end %>