summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-11-16 22:45:10 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-11-16 22:45:10 +0000
commitcbed72fb47c8c0eda6322574c678389b795cd23c (patch)
treed6c2798764c258017c14e5ef375f62bba49a7e45 /modules/admin-full
parent8b8d9030357e739eb1ae1a6b52a723c8fee8c4a6 (diff)
* luci/themes: fix log pages
* luci/modules/admin-full: add dmesg page * luci/i18n: add "dmesg" translations * luci/libs/util: add cmatch(), register string functions in string class * luci/libs/sys: add dmesg()
Diffstat (limited to 'modules/admin-full')
-rw-r--r--modules/admin-full/luasrc/controller/admin/status.lua10
-rw-r--r--modules/admin-full/luasrc/view/admin_status/dmesg.htm20
-rw-r--r--modules/admin-full/luasrc/view/admin_status/syslog.htm5
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 addc3ca743..09e7766c1f 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 0000000000..4fa867397c
--- /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 d5bf5d65a1..2e172cfbf9 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%>