From 4b19ef34d9a14eb11a42de2892d1a5dfac805175 Mon Sep 17 00:00:00 2001 From: Christian Glombek Date: Sat, 25 Jul 2026 15:23:22 +0200 Subject: [PATCH] [openwrt] remove the in-tree LuCI app (proposed for openwrt/luci) The OpenWrt LuCI web interface for OTBR is now maintained in the openwrt/luci repository as luci-app-openthread, per the OpenWrt maintainers' request (openthread/ot-br-posix#3431, openwrt/packages#29791). It has been rewritten there for the modern client-side JS + rpcd ucode framework. Remove the legacy Lua controller, the admin_thread .htm templates and handle_error.js from this tree, stop installing them from the OpenWrt package, and drop the now-unused luci-lua-runtime dependency. --- etc/openwrt/openthread-br/Makefile | 14 +- etc/openwrt/openthread-br/README.md | 20 +- src/openwrt/controller/thread.lua | 357 ---------------- src/openwrt/handle_error.js | 94 ---- src/openwrt/view/admin_thread/thread_add.htm | 80 ---- src/openwrt/view/admin_thread/thread_join.htm | 60 --- .../view/admin_thread/thread_overview.htm | 234 ---------- src/openwrt/view/admin_thread/thread_scan.htm | 126 ------ .../view/admin_thread/thread_setting.htm | 401 ------------------ src/openwrt/view/admin_thread/thread_view.htm | 394 ----------------- 10 files changed, 21 insertions(+), 1759 deletions(-) delete mode 100644 src/openwrt/controller/thread.lua delete mode 100644 src/openwrt/handle_error.js delete mode 100644 src/openwrt/view/admin_thread/thread_add.htm delete mode 100644 src/openwrt/view/admin_thread/thread_join.htm delete mode 100644 src/openwrt/view/admin_thread/thread_overview.htm delete mode 100644 src/openwrt/view/admin_thread/thread_scan.htm delete mode 100644 src/openwrt/view/admin_thread/thread_setting.htm delete mode 100644 src/openwrt/view/admin_thread/thread_view.htm diff --git a/etc/openwrt/openthread-br/Makefile b/etc/openwrt/openthread-br/Makefile index 961f6167feb..c8bf7bc87f3 100644 --- a/etc/openwrt/openthread-br/Makefile +++ b/etc/openwrt/openthread-br/Makefile @@ -33,7 +33,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openthread-br PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_VERSION:=1.0 include $(INCLUDE_DIR)/package.mk @@ -69,8 +69,7 @@ define Package/openthread-br +libblobmsg-json \ +libjson-c \ +libstdcpp \ - +libubus \ - +luci-lua-runtime + +libubus endef define Package/openthread-br/description @@ -87,15 +86,6 @@ define Package/openthread-br/install $(INSTALL_DIR) $(1)/etc/config $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/config/* $(1)/etc/config - - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller/admin - $(INSTALL_BIN) $(LOCAL_SOURCE_DIR)/src/openwrt/controller/thread.lua $(1)/usr/lib/lua/luci/controller/admin - - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/view - $(CP) $(LOCAL_SOURCE_DIR)/src/openwrt/view/admin_thread $(1)/usr/lib/lua/luci/view - - $(INSTALL_DIR) $(1)/www/luci-static/resources - $(CP) $(LOCAL_SOURCE_DIR)/src/openwrt/handle_error.js $(1)/www/luci-static/resources endef $(eval $(call BuildPackage,openthread-br)) diff --git a/etc/openwrt/openthread-br/README.md b/etc/openwrt/openthread-br/README.md index a99d5bf6437..242afbb8d6d 100644 --- a/etc/openwrt/openthread-br/README.md +++ b/etc/openwrt/openthread-br/README.md @@ -88,4 +88,22 @@ service otbr-agent start ### Test -Enter the OpenWRT web GUI. There will be a new item _Thread_ under _Network_. Scan or create network here. +Form a network and check the state from the command line: + +```bash +ot-ctl dataset init new +ot-ctl dataset commit active +ot-ctl ifconfig up +ot-ctl thread start +ot-ctl state +``` + +The agent also exposes a ubus object with equivalent controls: + +```bash +ubus call otbr threadstart +ubus call otbr state +ubus call otbr scan +``` + +A LuCI web interface is maintained in the [openwrt/luci](https://github.com/openwrt/luci) repository as `luci-app-openthread`. With it installed, a _Thread_ item appears under _Network_ in the OpenWrt web GUI. diff --git a/src/openwrt/controller/thread.lua b/src/openwrt/controller/thread.lua deleted file mode 100644 index 38fd0c1010e..00000000000 --- a/src/openwrt/controller/thread.lua +++ /dev/null @@ -1,357 +0,0 @@ -module("luci.controller.admin.thread", package.seeall) - -function index() - page = entry({"admin", "network", "thread"}, template("admin_thread/thread_overview"), translate("Thread"), 16) - page.leaf = true - - page = entry({"admin", "network", "thread_state"}, call("thread_state"), nil) - page.leaf = true - - page = entry({"admin", "network", "thread_neighbors"}, call("thread_neighbors"), nil) - page.leaf = true - - page = entry({"admin", "network", "thread_graph"}, call("thread_graph"), nil) - page.leaf = true - - page = entry({"admin", "network", "thread_scan"}, template("admin_thread/thread_scan"), nil) - page.leaf = true - - page = entry({"admin", "network", "thread_create"}, template("admin_thread/thread_setting"), nil) - page.leaf = true - - page = entry({"admin", "network", "thread_setting"}, template("admin_thread/thread_setting"), nil) - page.leaf = true - - page = entry({"admin", "network", "thread_add"}, post("thread_add"), nil) - page.leaf = true - - page = entry({"admin", "network", "thread_add_page"}, template("admin_thread/thread_add"), nil) - page.leaf = true - - page = entry({"admin", "network", "thread_view"}, template("admin_thread/thread_view"), nil) - page.leaf = true - - page = entry({"admin", "network", "thread_join"}, template("admin_thread/thread_join"), nil) - page.leaf = true - - page = entry({"admin", "network", "joiner_remove"}, post("joiner_remove"), nil) - page.leaf = true - - page = entry({"admin", "network", "thread_attach"}, post("thread_attach"), nil) - page.leaf = true - - page = entry({"admin", "network", "thread_add_joiner"}, post("thread_add_joiner"), nil) - page.leaf = true - - page = entry({"admin", "network", "thread_handler_setting"}, post("thread_handler_setting"), nil) - page.leaf = true - - page = entry({"admin", "network", "thread_stop"}, post("thread_stop"), nil) - page.leaf = true -end - -function thread_handler_setting() - local ubus = require "ubus" - local tpl = require "luci.template" - local http = require "luci.http" - local networkname = luci.http.formvalue("threadname") - local channel = luci.http.formvalue("channel") + 0 - local panid = luci.http.formvalue("panid") - local extpanid = luci.http.formvalue("extpanid") - local mode = luci.http.formvalue("mode") - local networkkey = luci.http.formvalue("networkkey") - local pskc = luci.http.formvalue("pskc") - local macfilter = luci.http.formvalue("macfilterselect") - local macfilteradd = luci.http.formvalue("macfilteradd") - local macfilterremove = luci.http.formvalue("macfilterremove") - local submitcontent = luci.http.formvalue("submitcontent") - local jumpflag = 0 - - local vError = 0 - local result - - local conn = ubus.connect() - - if not conn then - error("Failed to connect to ubusd") - end - - if submitcontent == "enable" then - result = conn:call("otbr", "threadstart", {}) - vError = result.Error - elseif submitcontent == "disable" then - result = conn:call("otbr", "threadstop", {}) - vError = result.Error - elseif submitcontent == "leave" then - result = conn:call("otbr", "leave", {}) - vError = result.Error - elseif submitcontent == "clearAddr" then - result = conn:call("otbr", "macfilterclear", {}) - vError = result.Error - jumpflag = 1 - elseif submitcontent == "addAddr" then - result = conn:call("otbr", "macfilteradd", { addr = macfilteradd }) - conn:call("otbr", "macfiltersetstate", { state = macfilter }) - vError = result.Error - jumpflag = 1 - elseif submitcontent == "removeAddr" then - if type(macfilterremove) == "table" then - local removeAddrIndex = luci.http.formvalue("removeAddrIndex") + 0 - result = conn:call("otbr", "macfilterremove", { addr = macfilterremove[removeAddrIndex] }) - else - result = conn:call("otbr", "macfilterremove", { addr = macfilterremove }) - end - conn:call("otbr", "macfiltersetstate", { state = macfilter }) - vError = result.Error - jumpflag = 1 - else - if(threadget("state").State == "disabled")then - conn:call("otbr", "setnetworkname", { networkname = networkname }) - conn:call("otbr", "setchannel", { channel = channel }) - conn:call("otbr", "setpanid", { panid = panid }) - conn:call("otbr", "setextpanid", { extpanid = extpanid }) - conn:call("otbr", "setmode", { mode = mode }) - conn:call("otbr", "setnetworkkey", { networkkey = networkkey }) - conn:call("otbr", "setpskc", { pskc = pskc }) - conn:call("otbr", "macfiltersetstate", { state = macfilter }) - result = conn:call("otbr", "threadstart", {}) - else - result = conn:call("otbr", "mgmtset", { networkkey = networkkey, networkname = networkname, extpanid = extpanid, panid = panid, channel = tostring(channel), pskc = pskc }) - conn:call("otbr", "macfiltersetstate", { state = macfilter }) - end - vError = result.Error - end - - if(jumpflag == 0) then - local stat, dsp = pcall(require, "luci.dispatcher") - stat = 0 - luci.http.redirect(stat and dsp.build_url("admin", "network", "thread") .. "?error=" .. vError) - else - local stat, dsp = pcall(require, "luci.dispatcher") - luci.http.redirect(stat and dsp.build_url("admin", "network", "thread_setting") .. "?error=" .. vError) - end -end - -function thread_add() - local ubus = require "ubus" - local tpl = require "luci.template" - local http = require "luci.http" - - local conn = ubus.connect() - - if not conn then - error("Failed to connect to ubusd") - end - - result = conn:call("otbr", "commissionerstart", {}) - local vError = result.Error - - local stat, dsp = pcall(require, "luci.dispatcher") - luci.http.redirect(stat and dsp.build_url("admin", "network", "thread_add_page") .. "?error=" .. vError) -end - -function thread_add_joiner() - local ubus = require "ubus" - local tpl = require "luci.template" - local http = require "luci.http" - local pskd = luci.http.formvalue("pskd") - local eui64 = luci.http.formvalue("eui64") - - local conn = ubus.connect() - - if not conn then - error("Failed to connect to ubusd") - end - - result = conn:call("otbr", "joineradd", { pskd = pskd, eui64 = eui64}) - vError = result.Error - - local stat, dsp = pcall(require, "luci.dispatcher") - luci.http.redirect(stat and dsp.build_url("admin", "network", "thread_view") .. "?error=" .. vError) -end - -function joiner_remove() - local ubus = require "ubus" - local tpl = require "luci.template" - local http = require "luci.http" - local eui64 = luci.http.formvalue("eui64") - - local conn = ubus.connect() - - if not conn then - error("Failed to connect to ubusd") - end - - result = conn:call("otbr", "joinerremove", { eui64 = eui64 }) - vError = result.Error - - local stat, dsp = pcall(require, "luci.dispatcher") - luci.http.redirect(stat and dsp.build_url("admin", "network", "thread_view") .. "?error=" .. vError) -end - -function thread_attach() - local ubus = require "ubus" - local tpl = require "luci.template" - local http = require "luci.http" - local panid = luci.http.formvalue("panid") - local channel = luci.http.formvalue("channel") + 0 - local networkkey = luci.http.formvalue("networkkey") - - local conn = ubus.connect() - - if not conn then - error("Failed to connect to ubusd") - end - - conn:call("otbr", "setpanid", { panid = panid }) - conn:call("otbr", "setchannel", { channel = channel }) - conn:call("otbr", "setnetworkkey", { networkkey = networkkey }) - result = conn:call("otbr", "threadstart", {}) - vError = result.Error - - local stat, dsp = pcall(require, "luci.dispatcher") - luci.http.redirect(stat and dsp.build_url("admin", "network", "thread") .. "?error=" .. vError) -end - -function thread_stop() - local ubus = require "ubus" - local tpl = require "luci.template" - local http = require "luci.http" - - local conn = ubus.connect() - - if not conn then - error("Failed to connect to ubusd") - end - - result = conn:call("otbr", "threadstop", {}) - vError = result.Error - - local stat, dsp = pcall(require, "luci.dispatcher") - luci.http.redirect(stat and dsp.build_url("admin", "network", "thread") .. "?error=" .. vError) -end - -function thread_join() - local tpl = require "luci.template" - local http = require "luci.http" - - local stat, dsp = pcall(require, "luci.dispatcher") - luci.http.redirect(stat and dsp.build_url("admin", "network", "thread_join")) -end - -function thread_state() - luci.http.prepare_content("application/json") - - local result = {} - result.state = threadget("state").State - - if(result.state ~= "disabled") then - result.panid = threadget("panid").PanId - result.channel = threadget("channel").Channel - result.networkname = threadget("networkname").NetworkName - end - luci.http.write_json(result) -end - -function thread_graph() - luci.http.prepare_content("application/json") - - luci.http.write_json(networkdata()) -end - -function thread_neighbors() - luci.http.prepare_content("application/json") - - local result = {} - local neighbor = neighborlist() - - result.neighbor = neighbor.neighborlist - - local joiner = joinerlist() - result.joinernum = joiner.joinernum - result.joinerlist = joiner.joinerlist - - result.state = threadget("state").State - - luci.http.write_json(result) -end - -function networkdata() - local k, v, m, n - local data = { } - local l = { } - - local result = connect_ubus("networkdata") - - for k, v in pairs(result) do - l[#l+1] = v - end - - data.connect = l - data.state = threadget("state").State - data.rloc16 = threadget("rloc16").rloc16 - data.joinernum = threadget("joinernum").joinernum - data.leader = threadget("leaderdata").leaderdata.LeaderRouterId - return data -end - -function joinerlist() - local k, v, result - local l = { } - local data = { } - - result = connect_ubus("joinernum") - data.joinernum = result.joinernum - - if result.Joinernum ~= 0 then - for k, v in pairs(result.joinerList) do - l[#l+1] = v - end - end - - data.joinerlist = l - return data -end - -function neighborlist() - local k, v, result, tmpResult - local l = { } - local data = { } - - local state = threadget("state").State - - if state == 'child' then - tmpResult = connect_ubus("parent") - result = tmpResult.parent_list - else - tmpResult = connect_ubus("neighbor") - result = tmpResult.neighbor_list - end - - for k, v in pairs(result) do - l[#l+1] = v - end - - data.neighborlist = l - return data -end - -function connect_ubus(methods) - local ubus = require "ubus" - 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 diff --git a/src/openwrt/handle_error.js b/src/openwrt/handle_error.js deleted file mode 100644 index 11d7bae3481..00000000000 --- a/src/openwrt/handle_error.js +++ /dev/null @@ -1,94 +0,0 @@ -function GetURLParameter(sParam) -{ - var sPageURL = window.location.search.substring(1); - var sURLVariables = sPageURL.split('&'); - for (var i = 0; i < sURLVariables.length; i++) - { - var sParameterName = sURLVariables[i].split('='); - if (sParameterName[0] == sParam) - { - return sParameterName[1]; - } - } -} -function handle_error(sError) -{ - if(sError && sError != 0) - alert("Error: " + translateErrorMessage(parseInt(sError))); -} -function translateErrorMessage(sError) -{ - switch(sError) - { - case 1: - return "Failed"; - case 2: - return "Drop"; - case 3: - return "NoBufs"; - case 4: - return "NoRoute"; - case 5: - return "Busy"; - case 6: - return "Parse"; - case 7: - return "InvalidArgs"; - case 8: - return "Security"; - case 9: - return "AddressQuery"; - case 10: - return "NoAddress"; - case 11: - return "Abort"; - case 12: - return "NotImplemented"; - case 13: - return "InvalidState"; - case 14: - return "NoAck"; - case 15: - return "ChannelAccessFailure"; - case 16: - return "Detached"; - case 17: - return "FcsErr"; - case 18: - return "NoFrameReceived"; - case 19: - return "UnknownNeighbor"; - case 20: - return "InvalidSourceAddress"; - case 21: - return "AddressFiltered"; - case 22: - return "DestinationAddressFiltered"; - case 23: - return "NotFound"; - case 24: - return "Already"; - case 26: - return "Ipv5AddressCreationFailure"; - case 27: - return "NotCapable"; - case 28: - return "ResponseTimeout"; - case 29: - return "Duplicated"; - case 30: - return "ReassemblyTimeout"; - case 31: - return "NotTmf"; - case 32: - return "NonLowpanDataFrame"; - case 33: - return "DisabledFeature"; - case 34: - return "LinkMarginLow"; - case 255: - return "GenericError"; - default: - return "UnknownErrorType"; - } -} diff --git a/src/openwrt/view/admin_thread/thread_add.htm b/src/openwrt/view/admin_thread/thread_add.htm deleted file mode 100644 index 50cf5ce694d..00000000000 --- a/src/openwrt/view/admin_thread/thread_add.htm +++ /dev/null @@ -1,80 +0,0 @@ -<%- - 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%> - -

<%:Add Joiner in Network: %><%=threadget("networkname").NetworkName%>

-
- -

- -
-
-
- -
- -
-
- "/><%:The Joiner Credential is a device-specific string of all uppercase alphanumeric characters(0-9 and A-Y, excluding I, O, Q and Z for readability), with a length between 6 and 32 characters.%> -
-
-
- -
- -
-
- "/><%:To restrict commissioning to a specific Joiner device, which is the devices factory-assigned IEEE EUI-64, use the eui64 parameter to get the EUI-64. You can input '*' to unrestrict to the specific joiner%> -
-
-
- -
- -
-
-
-
- - - -
-
- -<%+footer%> - - diff --git a/src/openwrt/view/admin_thread/thread_join.htm b/src/openwrt/view/admin_thread/thread_join.htm deleted file mode 100644 index a2861e4dbf3..00000000000 --- a/src/openwrt/view/admin_thread/thread_join.htm +++ /dev/null @@ -1,60 +0,0 @@ -<%- - local ubus = require "ubus" - local sys = require "luci.sys" - local utl = require "luci.util" - - function getnetworkkey() - local k, v, result - - local conn = ubus.connect() - if not conn then - error("Failed to connect to ubusd") - end - - result = conn:call("otbr", "networkkey", {}).Networkkey - - return result - end --%> -<%+header%> - -

<%:Join Network: %><%=luci.http.formvalue("NetworkName")%>

-
- -

- -
-
-
- -
-
- -
-
<%:Please input your network key to ensure you join the right network.%>
-
-
-
- -


-
- - - " /> - " /> - -
-
- -<%+footer%> - diff --git a/src/openwrt/view/admin_thread/thread_overview.htm b/src/openwrt/view/admin_thread/thread_overview.htm deleted file mode 100644 index 8a7125380e6..00000000000 --- a/src/openwrt/view/admin_thread/thread_overview.htm +++ /dev/null @@ -1,234 +0,0 @@ -<%- - 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 Overview%>

-
- -
-
- -
-
- " id="wpan0" /> <%=threadget("interfacename").InterfaceName%> -
-
- <%:Generic MAC 802.15.4 Thread%>
-
-
-
-
-
- - -
-
- - -
-
-
-
- - - -
-
-
-
- <%: Collecting data... %> -
-
-
-
-
-
- -
-
- -
-

<%:Neighbors%>

-
- -
-
-
<%:Signal%>
-
<%:Role%>
-
<%:RLOC16%>
-
<%:Age%>
-
<%:Avg RSSI%>
-
<%:Last RSSI%>
-
-
-
<%:Collecting data...%>
-
-
- - -<%+footer%> - - - diff --git a/src/openwrt/view/admin_thread/thread_scan.htm b/src/openwrt/view/admin_thread/thread_scan.htm deleted file mode 100644 index 849a00a28de..00000000000 --- a/src/openwrt/view/admin_thread/thread_scan.htm +++ /dev/null @@ -1,126 +0,0 @@ -<%- - local ubus = require "ubus" - local sys = require "luci.sys" - local utl = require "luci.util" - - function guess_thread_signal(info) - local scale - local icon - local rssi = info.Rssi or 0 - - if rssi <= -100 then - scale = 0 - elseif rssi >= -50 then - scale = 100 - else - scale = math.floor(2 * (100 + rssi)) - end - - if info.NetworkName == nil then - icon = resource .. "/icons/signal-none.svg" - elseif scale < 15 then - icon = resource .. "/icons/signal-000-000.svg" - elseif scale < 35 then - icon = resource .. "/icons/signal-000-025.svg" - elseif scale < 55 then - icon = resource .. "/icons/signal-025-050.svg" - elseif scale < 75 then - icon = resource .. "/icons/signal-050-075.svg" - else - icon = resource .. "/icons/signal-075-100.svg" - end - - return icon - end - - function percent_thread_signal(info) - local rssi = info.Rssi or 0 - - if rssi <= -100 then - return 0 - elseif rssi >= -50 then - return 100 - else - return math.floor(2 * (100 + rssi)) - end - end - - function scanlist() - local k, v - local l = { } - - local conn = ubus.connect() - if not conn then - error("Failed to connect to ubusd") - end - - local scanresult = conn:call("otbr", "scan", {}) - - for k, v in pairs(scanresult.scan_list) do - l[#l+1] = v - end - - return l - end --%> - -<%+header%> - -

<%:Join Network: Thread Scan%>

-
- -
-
-
-
-
<%:RSSI%>
-
<%:Channel%>
-
<%:PAN Id%>
-
<%:Lqi%>
-
 
-
- - - <% for i, net in ipairs(scanlist()) do %> -
-
- -
- <%=percent_thread_signal(net)%>% -
-
-
- <%=net.Channel%> -
-
- <%=net.PanId%> -
-
- <%=net.Lqi%> -
-
- -
- - - - -
-
-
- <% end %> - -
-
-
-
-
- -
-
- - -
-
- -<%+footer%> diff --git a/src/openwrt/view/admin_thread/thread_setting.htm b/src/openwrt/view/admin_thread/thread_setting.htm deleted file mode 100644 index 026db8bcd61..00000000000 --- a/src/openwrt/view/admin_thread/thread_setting.htm +++ /dev/null @@ -1,401 +0,0 @@ -<%- - 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 - - local state = threadget("state").State - - - - function addrlist() - local k, v - local l = { } - - local addrlist = connect_ubus("macfilteraddr").addrlist - - for k, v in pairs(addrlist) do - l[#l+1] = v - end - - return l - end - - --%> -<%+header%> - -

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

-
The Network Configuration section covers physical settings of the Thread network such as channel, PAN ID. Per interface related settings like network key or MAC-filter are grouped in the Interface Configuration.
-
- -
-

<%:Network Configuration%>

- - - - - - -
-
- -
-
- " class="cbi-input-text" /> -
-
-
-
- -
- - - PAN ID: - <%=threadget("panid").PanId%> -
- Extended PAN ID: - <%=threadget("extpanid").ExtPanId%> -
- State: - <%=state%> -
- Channel: - <%=threadget("channel").Channel%> - - -
-
-
- <% if state == "disabled" then %> - -
- -
- <% else %> - -
- -
- <% end %> -
-
- -
- -
-
-
- - - - -

<%:Interface Configuration%>

- -
- - -
-
- -
- " class="cbi-input-text" style="width:50%;" /> -
-
-
- -
- " class="cbi-input-text" style="width:50%;" /> -
-
-
- - - - -
- - - -
- -
- -<%+footer%> - - - diff --git a/src/openwrt/view/admin_thread/thread_view.htm b/src/openwrt/view/admin_thread/thread_view.htm deleted file mode 100644 index 14889ef5db7..00000000000 --- a/src/openwrt/view/admin_thread/thread_view.htm +++ /dev/null @@ -1,394 +0,0 @@ -<%- - 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%> - - - -