%
--[[
Status.htm (Charging_points module)
]]--
local utl = require "luci.util"
local mUtl = require "luci.moreUtils"
local path = luci.dispatcher.context.requestpath
local status = utl.ubus("smartchargingd", "get_status")
for k, v in pairs (status) do
if type(v) == "table" then
v["title"] = translate(k)
for z , t in pairs (v) do
if type(t) == "table" then
t["title"] = translate(z)
end
end
end
end
if luci.http.formvalue("status") == "1" then
luci.http.prepare_content("application/json")
luci.http.write_json(status)
return
end
%>
<%+header%>