3 local load1, load5, load15 = luci.sys.loadavg()
5 local request = require(
"luci.dispatcher").request
6 local category = request[
1]
7 local tree = luci.dispatcher.node()
8 local cattree = category and luci.dispatcher.node(category)
9 local node = luci.dispatcher.dispatched
12 for i,r in ipairs(request) do
13 if c.nodes and c.nodes[r] then
15 c._menu_selected = true
19 require(
"luci.i18n").loadc(
"default")
21 require(
"luci.http").prepare_content(
"text/html")
22 %
><?xml version=
"1.0" encoding=
"utf-8"?>
23 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
24 <html xmlns=
"http://www.w3.org/1999/xhtml">
26 <link rel=
"stylesheet" type=
"text/css" href=
"<%=media%>/cascade.css" />
27 <% if node and node.css then %
><link rel=
"stylesheet" type=
"text/css" href=
"<%=resource%>/<%=node.css%>" /><% end %
>
28 <meta http-equiv=
"content-type" content=
"text/xhtml+xml; charset=utf-8" />
29 <meta http-equiv=
"content-script-type" content=
"text/javascript" />
30 <title>LuCI - Lua Configuration Interface
</title>
34 <div class=
"headerlogo left"><img src=
"<%=media%>/logo.png" alt=
"Freifunk" /></div>
35 <div class=
"whitetext smalltext right">
36 OpenWRT Kamikaze
<br />
37 Freifunk Firmware
2.0-dev
<br />
38 <%:load Last%
>: <%=load1%
> <%=load5%
> <%=load15%
><br />
39 <%:hostname Hostname%
>: <%=luci.sys.hostname()%
>
42 <span class=
"headertitle"><%~luci.main.title%
></span><br />
43 <span class=
"whitetext bold"><%~luci.main.subtitle%
></span>
47 <div class=
"separator yellow bold">
50 local url = controller
51 for k,v in pairs(request) do
52 if c.nodes and c.nodes[v] then
55 %
><a href=
"<%=url%>"><%=c.title or v%
></a> <% if k ~= #request then %
>» <% end
61 <div id=
"columns"><div id=
"columnswrapper">
62 <div class=
"sidebar left">
64 local function submenu(prefix, node)
65 if not node._menu_selected or not node.nodes then
69 for k, n in pairs(node.nodes) do
70 table.insert(index, {name=k, order=n.order or
100})
73 table.sort(index, function(a, b) return a.order < b.order end)
76 <% for j, v in pairs(index) do
77 local nnode = node.nodes[v.name]%
>
79 <span<% if nnode._menu_selected then %
> class=
"yellowtext"<%end%
>><a href=
"<%=controller .. prefix .. v.name%>"><%=nnode.title%
></a></span>
80 <% submenu(prefix .. v.name ..
"/", nnode) %
>
87 if cattree and cattree.nodes then
89 for k, node in pairs(cattree.nodes) do
90 table.insert(index, {name=k, order=node.order or
100})
93 table.sort(index, function(a, b) return a.order < b.order end)
95 for i, k in ipairs(index) do
96 node = cattree.nodes[k.name]
98 <div<% if node._menu_selected then %
> class=
"yellowtext"<%end%
>><a href=
"<%=controller%>/<%=category%>/<%=k.name%>"><%=node.title%
></a>
99 <%submenu(
"/" .. category ..
"/" .. k.name ..
"/", node)%
>
106 <div class=
"sidebar right">
107 <div><%:webif Weboberfläche%
>
109 for k,node in pairs(tree.nodes) do
110 if node.title then %
>
111 <li<% if request[
1] == k then %
> class=
"yellowtext"<%end%
>><a href=
"<%=controller%>/<%=k%>"><%=node.title%
></a></li>
117 if
"admin" == request[
1] then
118 require(
"luci.model.uci")
119 local ucic = luci.model.uci.changes()
121 ucic = #luci.util.split(ucic)
124 <div><%:config Konfiguration%
>
127 <li><a href=
"<%=controller%>/admin/uci/changes"><%:changes Änderungen%
>: <%=ucic%
></a></li>
128 <li><a href=
"<%=controller%>/admin/uci/apply"><%:apply Anwenden%
></a></li>
129 <li><a href=
"<%=controller%>/admin/uci/revert"><%:revert Verwerfen%
></a></li>
131 <li><%:changes Änderungen%
>:
0</li>