summaryrefslogtreecommitdiffhomepage
path: root/modules/niu/luasrc/view
diff options
context:
space:
mode:
Diffstat (limited to 'modules/niu/luasrc/view')
-rw-r--r--modules/niu/luasrc/view/niu/network.htm10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/niu/luasrc/view/niu/network.htm b/modules/niu/luasrc/view/niu/network.htm
index 71296371fd..a022b0af83 100644
--- a/modules/niu/luasrc/view/niu/network.htm
+++ b/modules/niu/luasrc/view/niu/network.htm
@@ -7,10 +7,6 @@ local nws = {}
str.uci_state:foreach("network", "interface", function(s)
nws[#nws+1] = s
end)
-
-local function cmp(a, b)
- return (a.order or 100) < (b.order or 100)
-end
%>
<div>Status:</div>
<table>
@@ -23,7 +19,11 @@ for _, v in ipairs(nws) do if v[".name"] ~= "loopback" then
<br />
<ul>
<%
-for k, v in utl.spairs(dsp.node("niu", "network").nodes, cmp) do
+local nodes = dsp.node("niu", "network").nodes
+local function cmp(a, b)
+ return (nodes[a].order or 100) < (nodes[b].order or 100)
+end
+for k, v in utl.spairs(nodes, cmp) do
%>
<li><a href="<%=dsp.build_url("niu", "network", k)%>"><%=v.title%></a></li>
<%