<% local view, viewlibrary, page_info, session = ... %> <% require("viewfunctions") %> <% displaycommandresults({"edit", "startstop"}, session) %>

<%= html.html_escape(view.label) %>

<% if viewlibrary.check_permission("edit") then %> <% end %> <% for i,item in ipairs(view.value) do %> <% if viewlibrary.check_permission("edit") then %> <% end %>
ActionService Name Status Runlevels Description
<%= html.link{value="edit?servicename="..item.servicename.."&redir="..page_info.orig_action, label="Edit " } %> <% end %> <% if viewlibrary.check_permission("startstop") and item.actions then for i,a in ipairs(item.actions) do print(html.link{value="startstop?servicename="..item.servicename.."&redir=status&submit=true&action="..a, label=a:gsub("^%l", string.upper).." " }) end end %> <%= html.html_escape(item.servicename) %> <%= html.html_escape(item.status) %> <%= html.html_escape(table.concat(item.runlevels, ", ")) %>  <%= html.html_escape(item.description) %>