From ecf0912ff51a14d36612a827c4ecf33c9b5f6947 Mon Sep 17 00:00:00 2001 From: Bart Van Der Meerssche Date: Wed, 20 Apr 2011 12:47:06 +0200 Subject: [PATCH] [luci] add syslog and sensor dash icons to the web interface --- .../luasrc/controller/mini/status.lua | 33 ++++++++++++++++++ .../admin-mini/luasrc/view/mini/dmesg.htm | 20 +++++++++++ .../admin-mini/luasrc/view/mini/syslog.htm | 20 +++++++++++ .../htdocs/luci-static/oxygen/dashboard.css | 8 +++++ .../luci-static/oxygen/icons/sensor.png | Bin 0 -> 4823 bytes .../luci-static/oxygen/icons/syslog.png | Bin 0 -> 4481 bytes .../luasrc/view/themes/oxygen/header.htm | 8 +++++ 7 files changed, 89 insertions(+) create mode 100644 mote/v2/openwrt/package/luci/modules/admin-mini/luasrc/controller/mini/status.lua create mode 100644 mote/v2/openwrt/package/luci/modules/admin-mini/luasrc/view/mini/dmesg.htm create mode 100644 mote/v2/openwrt/package/luci/modules/admin-mini/luasrc/view/mini/syslog.htm create mode 100644 mote/v2/openwrt/package/luci/themes/oxygen/htdocs/luci-static/oxygen/icons/sensor.png create mode 100644 mote/v2/openwrt/package/luci/themes/oxygen/htdocs/luci-static/oxygen/icons/syslog.png diff --git a/mote/v2/openwrt/package/luci/modules/admin-mini/luasrc/controller/mini/status.lua b/mote/v2/openwrt/package/luci/modules/admin-mini/luasrc/controller/mini/status.lua new file mode 100644 index 0000000..719a37b --- /dev/null +++ b/mote/v2/openwrt/package/luci/modules/admin-mini/luasrc/controller/mini/status.lua @@ -0,0 +1,33 @@ +--[[ +LuCI - Lua Configuration Interface + +Copyright 2008 Steven Barth + +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 diff --git a/mote/v2/openwrt/package/luci/modules/admin-mini/luasrc/view/mini/dmesg.htm b/mote/v2/openwrt/package/luci/modules/admin-mini/luasrc/view/mini/dmesg.htm new file mode 100644 index 0000000..4fa8673 --- /dev/null +++ b/mote/v2/openwrt/package/luci/modules/admin-mini/luasrc/view/mini/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/mote/v2/openwrt/package/luci/modules/admin-mini/luasrc/view/mini/syslog.htm b/mote/v2/openwrt/package/luci/modules/admin-mini/luasrc/view/mini/syslog.htm new file mode 100644 index 0000000..10b3ecd --- /dev/null +++ b/mote/v2/openwrt/package/luci/modules/admin-mini/luasrc/view/mini/syslog.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 3791 2008-11-16 22:45:10Z jow $ + +-%> +<%+header%> +

<%:syslog%>

+
+ +
+<%+footer%> diff --git a/mote/v2/openwrt/package/luci/themes/oxygen/htdocs/luci-static/oxygen/dashboard.css b/mote/v2/openwrt/package/luci/themes/oxygen/htdocs/luci-static/oxygen/dashboard.css index 184afe7..5aa9cb9 100644 --- a/mote/v2/openwrt/package/luci/themes/oxygen/htdocs/luci-static/oxygen/dashboard.css +++ b/mote/v2/openwrt/package/luci/themes/oxygen/htdocs/luci-static/oxygen/dashboard.css @@ -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); +} + } diff --git a/mote/v2/openwrt/package/luci/themes/oxygen/htdocs/luci-static/oxygen/icons/sensor.png b/mote/v2/openwrt/package/luci/themes/oxygen/htdocs/luci-static/oxygen/icons/sensor.png new file mode 100644 index 0000000000000000000000000000000000000000..8c004b76cfddc6670be441001c2107ed5b5fcfed GIT binary patch literal 4823 zcmV;|5-9D7P)F59e5@bn4 zK~#9!?OF?vmeqNF&iO9?ZI|6;7nVCLAmJj&9SVqe!FY-BlF_lv1&vLcj_E`*Nje%c zb~?3`@EO)pT(!^|M_A#4NGi9icE9lSv4ZCIj>FUShD^&<~`KUYOfUk z=LiU%!YscFmx+L_gq5C)fi zod6>Oz`1@=1P}ofeF(n@cqNFS2vO>R=zI&J`)!Zc)cmJ2|Hk{RaZ42uXCeXK&#p6QDB?}v=?1W*a-QU^qHpQwGX^0Eh(ba@j!P0s01+X)LVPVs-H6&Z z0onI^tWh)Wb60-%KL8w-sc}XSKv4(D{Wk9?yO)hvWl5oPJTBB5LW`~srRw~2^nh|s!UI?Hdro7atNBN9rVC;{X= zFYd>K-ckMyYvM}S;}&Y?hl8btfx9U!c^mYf1~&jBXsfA^Y7j9I9uXl)C=&8OIghCO zJwzYz#zrNLqDD!54I#h0bxr2SzYMKPAaSX}64puq|p0L1d z0k9B&FP%|{Pne?Ww8z127tmeU9BmcbkjDCdpSD(ae$hyYatxkGRj zn1n+(F%(6bq_Tujg9x-50A@P`A|aIlOD4e_2RPpPov@>IBB`L}v=ZR`9IJwUT*vDh zDe4?N>4OJ*!8nm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 diff --git a/mote/v2/openwrt/package/luci/themes/oxygen/luasrc/view/themes/oxygen/header.htm b/mote/v2/openwrt/package/luci/themes/oxygen/luasrc/view/themes/oxygen/header.htm index b6057fe..979723e 100644 --- a/mote/v2/openwrt/package/luci/themes/oxygen/luasrc/view/themes/oxygen/header.htm +++ b/mote/v2/openwrt/package/luci/themes/oxygen/luasrc/view/themes/oxygen/header.htm @@ -110,6 +110,10 @@ ucimenu("/" .. category .. "/uci/", tree.nodes[category].nodes["uci"], "changes"