summaryrefslogtreecommitdiffhomepage
path: root/modules/niu/luasrc/view
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-10-28 17:38:09 +0000
committerSteven Barth <steven@midlink.org>2009-10-28 17:38:09 +0000
commit1e9b205464d0611db5fe7e036c3628ebe484c803 (patch)
treef4e02cd1907fc21b93594e0b0b077af8739e7ecf /modules/niu/luasrc/view
parent9c22efeddbc4144f1bb015fa09d2f0946dc086e5 (diff)
More NIU
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>
<%