diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-05-26 16:03:44 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-05-26 16:03:44 +0000 |
commit | 4943770cd49f3fae629b91913c54cdecad0ae398 (patch) | |
tree | d6458db03096fc0558f2eb1d7fb71f6201d45294 /rc-status-html.lsp | |
parent | d8908e9f9821a8b979a65b216da95889dd1f23e6 (diff) | |
download | acf-alpine-baselayout-4943770cd49f3fae629b91913c54cdecad0ae398.tar.bz2 acf-alpine-baselayout-4943770cd49f3fae629b91913c54cdecad0ae398.tar.xz |
Update for alpine 1.9 openrc and minor changes for RAM disk and modules.
Diffstat (limited to 'rc-status-html.lsp')
-rw-r--r-- | rc-status-html.lsp | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/rc-status-html.lsp b/rc-status-html.lsp index a234798..b366c07 100644 --- a/rc-status-html.lsp +++ b/rc-status-html.lsp @@ -1,41 +1,23 @@ <% local view, viewlibrary, page_info, session = ... %> <% require("viewfunctions") %> -<% if session.editresult then %> - <H1>Command Result</H1> - <% if session.editresult.errtxt then io.write('<P CLASS="error">' .. string.gsub(html.html_escape(session.editresult.errtxt), "\n", "<BR>") .. "</P>\n") end - if session.editresult.descr then io.write('<P CLASS="descr">' .. string.gsub(html.html_escape(session.editresult.descr), "\n", "<BR>") .. "</P>\n") end - for name,val in pairs(session.editresult.value) do - if val.errtxt then io.write('<P CLASS="error">' .. string.gsub(html.html_escape(val.errtxt), "\n", "<BR>") .. "</P>\n") end - end - session.editresult = nil -end %> +<% displaycommandresults({"edit"}, session) %> <H1><%= html.html_escape(view.label) %></H1> <TABLE> <TR> <% if session.permissions.rc.edit then %> -<TD class='header'>Update</TD> +<TD class='header'>Action</TD> <% end %> -<TD class='header'>Service Name</TD><TD class='header'>Sequence</TD> -<TD class='header'>Kill on shutdown</TD><TD class='header'>System init service</TD> +<TD class='header'>Service Name</TD><TD class='header'>Runlevels</TD> </TR> <% for i,item in ipairs(view.value) do %> <TR> - <% if session.permissions[page_info.controller].edit then - local result = viewlibrary.dispatch_component(page_info.controller.."/edit", {servicename=item.servicename}, true) - for name,val in pairs(result.value) do val.name=name end - if result.value.kill.value then result.value.kill.checked = "" end - if result.value.system.value then result.value.system.checked = "" end %> - <form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/edit") %>" method="POST"> - <TD><input class="submit" type="submit" name="<%= html.html_escape(result.option) %>" value="<%= html.html_escape(result.submit or result.option) %>"></TD> - <TD><%= html.html_escape(item.servicename) %><%= html.form.hidden(result.value.servicename) %></TD><TD><%= html.form.text(result.value.sequence) %></TD> - <TD><%= html.form.checkbox(result.value.kill) %></TD><TD><%= html.form.checkbox(result.value.system) %></TD> - </form></TR> - <% else %> - <TD><%= html.html_escape(item.servicename) %></TD><TD><%= html.html_escape(item.sequence) %></TD> - <TD><%= html.html_escape(item.kill) %></TD><TD><%= html.html_escape(item.system) %></TD></TR> + <% if session.permissions.rc.edit then %> + <TD><%= html.link{value="edit?servicename="..item.servicename.."&redir="..page_info.orig_action, label="Edit " } %> <% end %> + <TD><%= html.html_escape(item.servicename) %></TD><TD><%= html.html_escape(table.concat(item.runlevels, ", ")) %></TD> + </TR> <% end %> </TABLE> |