<% --[[ 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 mod = require "luci.model.visa_variables" if params and params.pdr then params = params.pdr end local master = mUtl.identify_pseudo_maestre(path[4] or params or sn) local slave = path[4] or params local wizard, uci_method if master == true then wizard = "wizard" uci_method = "uci" else wizard = slave.."/wizard" uci_method = slave.."/uci" end local cl = path[1] local active = utl.ubus(wizard, "active_service", {service = "visad"}) 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 local opts = utl.ubus(uci_method, "get", {config = "visad", section = "internal"}) if opts and opts.values then opts = opts.values end %> <%+header%>

<%:Visa%> - <%=path[4] or params or sn %>

" /> <%if opts then%> <%=translate("Configuration")%> <%if mod then for k , v in pairs (mod.textValues) do %>
<%end end%> <%end%>
<%+footer%>