luaindex.htm 427 B

123456789101112131415161718
  1. <%-
  2. local util = require "luci.util"
  3. local fs = require "nixio.fs"
  4. local incdir = util.libpath() .. "/view/admin_status/index/"
  5. if fs.access(incdir) then
  6. local _, inc
  7. local includes = {}
  8. for inc in fs.dir(incdir) do
  9. if inc:match("%.htm$") then
  10. includes[#includes + 1] = inc:gsub("%.htm$", "")
  11. end
  12. end
  13. for _, inc in luci.util.vspairs(includes) do
  14. include("admin_status/index/" .. inc)
  15. end
  16. end
  17. -%>