From cbed72fb47c8c0eda6322574c678389b795cd23c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 16 Nov 2008 22:45:10 +0000 Subject: * 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() --- .../admin-full/luasrc/controller/admin/status.lua | 10 ++++++++-- .../admin-full/luasrc/view/admin_status/dmesg.htm | 20 ++++++++++++++++++++ .../admin-full/luasrc/view/admin_status/syslog.htm | 5 ++--- 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 modules/admin-full/luasrc/view/admin_status/dmesg.htm (limited to 'modules/admin-full') 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 +Copyright 2008 Jo-Philipp Wich + +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%> +

<%:dmesg%>

+
+ +
+<%+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%> -

<%:status%>

-

<%:syslog%>

+

<%:syslog%>

- +
<%+footer%> -- cgit v1.2.3