<% --[[ backend_local.htm (Charging_points module) ]]-- local fs = require "nixio.fs" local utl = require "luci.util" local mUtl = require "luci.moreUtils" local path = luci.dispatcher.context.requestpath local sn = mUtl.get_serialnumber() local master = mUtl.identify_pseudo_maestre(path[4] or sn) local method , wizard if master == true then method = "localbackend" wizard = "wizard" else method = path[4].."/localbackend" wizard = path[4].."/wizard" end local list = utl.ubus(method, "show_uid_list") local cl = path[1] local active = utl.ubus(wizard, "active_service", {service = "localbackend"}) local button, val if active and active.enabled and active.enabled == "true" then active = true button = "reset" val = "Disable" elseif active and active.enabled and active.enabled == "false" then active = false button = "enable" val = "Enable" end %> <%+header%>

<%:Local Backend%> - <%=path[4] or sn %>


" /> <%if master == true then %>
<%end%> <%if active == true then %>
<%=Legend%> <%if type(list) == "table" then %> <%for name , tbl in pairs (list) do %>

<%=translate(name)%>


<%if master == true then %> <%end%>
<%if master == true then %> <%end%> <%if type(tbl) == "table" then %> <%for i, uid in pairs (tbl) do %> <%end%> <%end%>
<%:uid%>
<%=uid%>
<%end%> <%end%> <%end%>
<%+footer%>