* modules/admin-core: Reintroduced ffluci.controller.admin.status
authorSteven Barth <steven@midlink.org>
Tue, 13 May 2008 17:32:11 +0000 (17:32 +0000)
committerSteven Barth <steven@midlink.org>
Tue, 13 May 2008 17:32:11 +0000 (17:32 +0000)
* modules/admin-core: Added Syslog status page

core/src/sys.lua
modules/admin-core/src/controller/admin/status.lua [new file with mode: 0644]
modules/admin-core/src/model/menu/00admin.lua
modules/admin-core/src/view/admin_status/index.htm [new file with mode: 0644]
modules/admin-core/src/view/admin_status/syslog.htm [new file with mode: 0644]
modules/admin-core/src/view/admin_uci/changes.htm

index 376654893286daf319d670baccc8518be24c4f19..debd8e94c79ec5801413b23d50ee22da66d3db3f 100644 (file)
@@ -122,6 +122,11 @@ function sysinfo()
        return s, m, r
 end
 
+-- Reads the syslog
+function syslog()
+       return exec("logread")
+end
+
 
 group = {}
 group.getgroup = posix.getgroup
diff --git a/modules/admin-core/src/controller/admin/status.lua b/modules/admin-core/src/controller/admin/status.lua
new file mode 100644 (file)
index 0000000..fa9fe65
--- /dev/null
@@ -0,0 +1,6 @@
+module("ffluci.controller.admin.status", package.seeall)
+
+function action_syslog()
+       local syslog = ffluci.sys.syslog()
+       ffluci.template.render("admin_status/syslog", {syslog=syslog})
+end
\ No newline at end of file
index c48db19bd614fdf773fec20e9a9ddd70bd7ca4b2..b21e5e338e4fc248d64a8844c97bc62768c1b8bc 100644 (file)
@@ -1,6 +1,9 @@
 add("admin", "index", "Übersicht", 10)
 act("luci", "Oberfläche")
 
+add("admin", "status", "Status", 20)
+act("syslog", "Systemprotokoll")
+
 add("admin", "system", "System", 30)
 act("packages", "Paketverwaltung")
 act("passwd", "Passwort ändern")
diff --git a/modules/admin-core/src/view/admin_status/index.htm b/modules/admin-core/src/view/admin_status/index.htm
new file mode 100644 (file)
index 0000000..9840936
--- /dev/null
@@ -0,0 +1,7 @@
+<%+header%>
+<h1><%:status Status%></h1>
+<p><%:status1 Hier finden sich Informationen über den aktuellen Status des Systems, beispielsweise
+Prozessortakt, Speicherauslastung und Netzwerkschnittstellen.%></p>
+<p><%:status2 Zusätzlich können hier Protokolldaten, des Kernels und diverser Systemdienste eingesehen werden,
+um deren Zustand zu kontrollieren.%></p> 
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/src/view/admin_status/syslog.htm b/modules/admin-core/src/view/admin_status/syslog.htm
new file mode 100644 (file)
index 0000000..905161b
--- /dev/null
@@ -0,0 +1,5 @@
+<%+header%>
+<h1><%:status Status%></h1>
+<h2><%:syslog Systemprotokoll%></h2>
+<code><%=syslog%></code>
+<%+footer%>
\ No newline at end of file
index 3bbcd0e5fb81c32d7e16ac1d362fa9712ddfc98f..52efb4589081666532a63055ae23ff249669ad85 100644 (file)
@@ -1,7 +1,7 @@
 <%+header%>
 <h1><%:config Konfiguration%></h1>
 <h2><%:changes Änderungen%></h2>
-<code><%=(ffluci.model.uci.changes() or "-")%></code>
+<code><%=ffluci.model.uci.changes()%></code>
 <form class="inline" method="get" action="<%=controller%>/admin/uci/apply">
        <input type="submit" value="<%:apply Anwenden%>" />
 </form>