[luci] add syslog and sensor dash icons to the web interface
This commit is contained in:
parent
1665567b1f
commit
ecf0912ff5
|
@ -0,0 +1,33 @@
|
|||
--[[
|
||||
LuCI - Lua Configuration Interface
|
||||
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
$Id: status.lua 5118 2009-07-23 03:32:30Z jow $
|
||||
]]--
|
||||
module("luci.controller.mini.status", package.seeall)
|
||||
|
||||
function index()
|
||||
luci.i18n.loadc("admin-core")
|
||||
local i18n = luci.i18n.translate
|
||||
|
||||
entry({"syslog"}, call("action_syslog"), i18n("syslog", "System Log"), 5)
|
||||
entry({"dmesg"}, call("action_dmesg"), i18n("dmesg", "Kernel Log"), 6)
|
||||
|
||||
end
|
||||
|
||||
function action_syslog()
|
||||
local syslog = luci.sys.syslog()
|
||||
luci.template.render("mini/syslog", {syslog=syslog})
|
||||
end
|
||||
|
||||
function action_dmesg()
|
||||
local dmesg = luci.sys.dmesg()
|
||||
luci.template.render("mini/dmesg", {dmesg=dmesg})
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
<%#
|
||||
LuCI - Lua Configuration Interface
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
$Id: syslog.htm 3622 2008-10-23 16:05:55Z jow $
|
||||
|
||||
-%>
|
||||
<%+header%>
|
||||
<h2><a id="content" name="content"><%:dmesg%></a></h2>
|
||||
<div id="content_syslog">
|
||||
<textarea readonly="readonly" wrap="off" rows="<%=dmesg:cmatch("\n")+2%>" id="syslog"><%=dmesg:pcdata()%></textarea>
|
||||
</div>
|
||||
<%+footer%>
|
|
@ -0,0 +1,20 @@
|
|||
<%#
|
||||
LuCI - Lua Configuration Interface
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
$Id: syslog.htm 3791 2008-11-16 22:45:10Z jow $
|
||||
|
||||
-%>
|
||||
<%+header%>
|
||||
<h2><a id="content" name="content"><%:syslog%></a></h2>
|
||||
<div id="content_syslog">
|
||||
<textarea readonly="readonly" wrap="off" rows="<%=syslog:cmatch("\n")+2%>" id="syslog"><%=syslog:pcdata()%></textarea>
|
||||
</div>
|
||||
<%+footer%>
|
|
@ -32,4 +32,12 @@ div.di_wifi a {
|
|||
background-image: url(icons/wifi.png);
|
||||
}
|
||||
|
||||
div.di_syslog a {
|
||||
background-image: url(icons/syslog.png);
|
||||
}
|
||||
|
||||
div.di_sensor a {
|
||||
background-image: url(icons/sensor.png);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
|
@ -110,6 +110,10 @@ ucimenu("/" .. category .. "/uci/", tree.nodes[category].nodes["uci"], "changes"
|
|||
|
||||
<div class="menubar">
|
||||
<div class="dashboard">
|
||||
<div class="dashicon di_sensor">
|
||||
<a href="/cgi-bin/luci/sensor">Sensor</a>
|
||||
</div>
|
||||
|
||||
<div class="dashicon di_wifi">
|
||||
<a href="/cgi-bin/luci/wifi">Wifi</a>
|
||||
</div>
|
||||
|
@ -121,6 +125,10 @@ ucimenu("/" .. category .. "/uci/", tree.nodes[category].nodes["uci"], "changes"
|
|||
<div class="dashicon di_system">
|
||||
<a href="/cgi-bin/luci/system">System</a>
|
||||
</div>
|
||||
|
||||
<div class="dashicon di_syslog">
|
||||
<a href="/cgi-bin/luci/syslog">Syslog</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
|
Loading…
Reference in New Issue