diff options
Diffstat (limited to 'modules/admin-full')
-rw-r--r-- | modules/admin-full/luasrc/controller/admin/status.lua | 10 | ||||
-rw-r--r-- | modules/admin-full/luasrc/view/admin_status/dmesg.htm | 20 | ||||
-rw-r--r-- | modules/admin-full/luasrc/view/admin_status/syslog.htm | 5 |
3 files changed, 30 insertions, 5 deletions
diff --git a/modules/admin-full/luasrc/controller/admin/status.lua b/modules/admin-full/luasrc/controller/admin/status.lua index addc3ca74..09e7766c1 100644 --- a/modules/admin-full/luasrc/controller/admin/status.lua +++ b/modules/admin-full/luasrc/controller/admin/status.lua @@ -18,10 +18,16 @@ function index() local i18n = luci.i18n.translate entry({"admin", "status"}, template("admin_status/index"), i18n("status", "Status"), 20).index = true - entry({"admin", "status", "syslog"}, call("action_syslog"), i18n("syslog", "Systemprotokoll")) + entry({"admin", "status", "syslog"}, call("action_syslog"), i18n("syslog", "Systemprotokoll"), 1) + entry({"admin", "status", "dmesg"}, call("action_dmesg"), i18n("dmesg", "Kernelprotokoll"), 2) end function action_syslog() local syslog = luci.sys.syslog() luci.template.render("admin_status/syslog", {syslog=syslog}) -end
\ No newline at end of file +end + +function action_dmesg() + local dmesg = luci.sys.dmesg() + luci.template.render("admin_status/dmesg", {dmesg=dmesg}) +end diff --git a/modules/admin-full/luasrc/view/admin_status/dmesg.htm b/modules/admin-full/luasrc/view/admin_status/dmesg.htm new file mode 100644 index 000000000..4fa867397 --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_status/dmesg.htm @@ -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%> diff --git a/modules/admin-full/luasrc/view/admin_status/syslog.htm b/modules/admin-full/luasrc/view/admin_status/syslog.htm index d5bf5d65a..2e172cfbf 100644 --- a/modules/admin-full/luasrc/view/admin_status/syslog.htm +++ b/modules/admin-full/luasrc/view/admin_status/syslog.htm @@ -13,9 +13,8 @@ $Id$ -%> <%+header%> -<h2><a id="content" name="content"><%:status%></a></h2> -<h3><%:syslog%></h3> +<h2><a id="content" name="content"><%:syslog%></a></h2> <div id="content_syslog"> -<textarea readonly="readonly" wrap="off" id="syslog"><%=luci.util.pcdata(syslog)%></textarea> +<textarea readonly="readonly" wrap="off" rows="<%=syslog:cmatch("\n")+2%>" id="syslog"><%=syslog:pcdata()%></textarea> </div> <%+footer%> |