0
0
mirror of https://github.com/openwrt/luci.git synced 2025-01-31 13:02:35 +00:00
Jo-Philipp Wich c7b300e614 luci-lua-runtime: add compatibility template for legacy Lua status includes
Add a compatibility template containing legacy Lua logic extracted from
the luci-mod-status main status page in order to free the status module
from any explicit or implicit Lua dependencies.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 01:03:37 +02:00

19 lines
427 B
HTML

<%-
local util = require "luci.util"
local fs = require "nixio.fs"
local incdir = util.libpath() .. "/view/admin_status/index/"
if fs.access(incdir) then
local _, inc
local includes = {}
for inc in fs.dir(incdir) do
if inc:match("%.htm$") then
includes[#includes + 1] = inc:gsub("%.htm$", "")
end
end
for _, inc in luci.util.vspairs(includes) do
include("admin_status/index/" .. inc)
end
end
-%>