<%- local ubus = require "ubus" local sys = require "luci.sys" local utl = require "luci.util" function connect_ubus(methods) local result local conn = ubus.connect() if not conn then error("Failed to connect to ubusd") end result = conn:call("otbr", methods, {}) return result end function threadget(action) local result = connect_ubus(action) return result end -%> <%+header%>

<%:Thread View: %><%=threadget("networkname").NetworkName%><%: (wpan0)%>

This is the list and topograph of your thread network.

<%: Leader Situation of Network%>


<%:Leader Router Id%>
<%:Partition Id%>
<%:Weighting%>
<%:Data Version%>
<%:Stable Data Version%>
<% leader = threadget("leaderdata").leaderdata %>
<%=leader.LeaderRouterId%>
<%=leader.PartitionId%>
<%=leader.Weighting%>
<%=leader.DataVersion%>
<%=leader.StableDataVersion%>

<%: Neighbor Situation of Network%>


<%:RLOC16%>
<%:Role%>
<%:Age%>
<%:Avg RSSI%>
<%:Last RSSI%>
<%:Mode%>
<%:Extended MAC%>
 
<%:Collecting data...%>
<%+footer%>