diff options
Diffstat (limited to 'modules/niu/luasrc/view')
-rw-r--r-- | modules/niu/luasrc/view/niu/dashboard.htm | 22 | ||||
-rw-r--r-- | modules/niu/luasrc/view/niu/network.htm | 32 | ||||
-rw-r--r-- | modules/niu/luasrc/view/niu/null.htm | 1 |
3 files changed, 55 insertions, 0 deletions
diff --git a/modules/niu/luasrc/view/niu/dashboard.htm b/modules/niu/luasrc/view/niu/dashboard.htm new file mode 100644 index 000000000..cdd65663f --- /dev/null +++ b/modules/niu/luasrc/view/niu/dashboard.htm @@ -0,0 +1,22 @@ +<%+header%> + +<% +local function cmp(a, b) + return (a.order or 100) < (b.order or 100) +end +for k, v in utl.spairs(nodes, cmp) do + if v.dbtemplate then + %> + <fieldset style="float: left; margin: 1em; padding: 0.5em"> + <legend><%=v.title%></legend> + <% + tpl.render(v.dbtemplate) + %> + </fieldset> + <% + end +end + +%> + +<%+footer%>
\ No newline at end of file diff --git a/modules/niu/luasrc/view/niu/network.htm b/modules/niu/luasrc/view/niu/network.htm new file mode 100644 index 000000000..71296371f --- /dev/null +++ b/modules/niu/luasrc/view/niu/network.htm @@ -0,0 +1,32 @@ +<% +local dsp = require "luci.dispatcher" +local utl = require "luci.util" +local str = require "luci.store" + +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> +<% +for _, v in ipairs(nws) do if v[".name"] ~= "loopback" then +%> +<tr><td><%=v[".name"]%></td><td><%=v.ipaddr%></td></tr> +<% end end %> +</table> +<br /> +<ul> +<% +for k, v in utl.spairs(dsp.node("niu", "network").nodes, cmp) do +%> +<li><a href="<%=dsp.build_url("niu", "network", k)%>"><%=v.title%></a></li> +<% +end +%> +</ul>
\ No newline at end of file diff --git a/modules/niu/luasrc/view/niu/null.htm b/modules/niu/luasrc/view/niu/null.htm new file mode 100644 index 000000000..fe3a0735d --- /dev/null +++ b/modules/niu/luasrc/view/niu/null.htm @@ -0,0 +1 @@ +NULL
\ No newline at end of file |