modules/admin-full: add a simple plugin mechanism to status page
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 4 May 2011 21:04:31 +0000 (21:04 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 4 May 2011 21:04:31 +0000 (21:04 +0000)
modules/admin-full/luasrc/view/admin_status/index.htm

index ea4ec3f5f0ef2ab669c6759a095afe89369639cf..f6432ef6f922c4720005409d3e8c419e18854555 100644 (file)
@@ -562,4 +562,19 @@ $Id$
 </fieldset>
 <% end %>
 
+<%-
+       require "luci.util"
+       require "nixio.fs"
+
+       local plugins = nixio.fs.dir(luci.util.libpath() .. "/view/admin_status/index")
+       if plugins then
+               local inc
+               for inc in plugins do
+                       if inc:match("%.htm$") then
+                               include("admin_status/index/" .. inc:gsub("%.htm$", ""))
+                       end
+               end
+       end
+-%>
+
 <%+footer%>