<% --[[ 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%>

<%=translate("DLM statistics")%>

<%=translate("DLM statistics for the plant")%>
<% local dev if status.role == "plant" then dev = "Plant" elseif status.role == "chargingpoint" then dev = mUtl.get_serialnumber() end%>

<%=(dev)%>

<%if status.role == "plant" then %>

<%=translate("cps_available")%>: <%=status.cps_available%>

<%=translate("Max_plant_current")%>: <%=status.max_plant_current%>

<%=translate("sessions")%>: <%=status.sessions%>

<%end%>
<%for k , v in pairs (status) do %> <%if type(v) == "table" then%>

<%=translate(k)%>

<%for z , t in pairs (v) do%> <%if type(t) == "table" then %>
<%end%> <%end%>
<%end%> <%end%> <%+footer%>