summaryrefslogtreecommitdiffstats
path: root/rc-status-html.lsp
blob: b366c07d3ec903e1a4bde2129726f2e8944113c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<% local view, viewlibrary, page_info, session = ... %>
<% require("viewfunctions") %>

<% displaycommandresults({"edit"}, session) %>

<H1><%= html.html_escape(view.label) %></H1>
<TABLE>
<TR>
<% if session.permissions.rc.edit then %>
<TD class='header'>Action</TD>
<% end %>
<TD class='header'>Service Name</TD><TD class='header'>Runlevels</TD>
</TR>
<%
for i,item in ipairs(view.value) do %>
	<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>