% local data, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> <% htmlviewfunctions.displaycommandresults({"enable","config","expert","startstopinterface"}, session) %> <% viewlibrary.dispatch_component("status") %> <% local header_level = htmlviewfunctions.displaysectionstart(data, page_info) %>
Action | Interface | Status | |
---|---|---|---|
<% if intf.enabled then %> <% htmlviewfunctions.displayitem(cfe({type="link", value={DEV=cfe({type="hidden", value=intf.interface}), redir=redir}, label="", option="Edit", action="config"}), page_info, -1) %> <% htmlviewfunctions.displayitem(cfe({type="link", value={filename=cfe({type="hidden", value=intf.filename}), redir=redir}, label="", option="Expert", action="expert"}), page_info, -1) %> <% htmlviewfunctions.displayitem(cfe({type="link", value={servicename=cfe({type="hidden", value=intf.init}), redir=redir}, label="", option="Autostart", action=page_info.script.."/alpine-baselayout/rc/edit"}), page_info, -1) %> <% else %> <% htmlviewfunctions.displayitem(cfe({type="form", value={interface=cfe({type="hidden", value=intf.interface})}, label="", option="Enable", action="enable"}), page_info, -1) %> <% end %> | <%= html.html_escape(intf.interface) %> | <%= html.html_escape(intf.status) %> | <% if intf.enabled then %><% htmlviewfunctions.displayitem(cfe({type="form", value={init=cfe({type="hidden", value=intf.init})}, label="", option={"Start", "Stop", "Restart"}, action="startstopinterface"}), page_info, -1) %> | <% end %>