forked from OpenPDU/acf-openpdu
make use of openpdu binary, renamed socket into outlet
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %>
|
||||
<table id="list" class="tablesorter"><thead>
|
||||
<tr>
|
||||
<th>Socket #</th>
|
||||
<th>Outlet #</th>
|
||||
<th>Status</th>
|
||||
<th>Description</th>
|
||||
<% if viewlibrary.check_permission("edit") or viewlibrary.check_permission("power") then %>
|
||||
@@ -37,18 +37,18 @@
|
||||
local redir = cfe({type="hidden", value=page_info.orig_action})
|
||||
for i,item in ipairs(view.value) do %>
|
||||
<tr>
|
||||
<td><%= html.html_escape(item.socket) %></td>
|
||||
<td><%= html.html_escape(item.outlet) %></td>
|
||||
<td><%= html.html_escape(item.status) %></td>
|
||||
<td><%= html.html_escape(item.description) %></td>
|
||||
<% if viewlibrary.check_permission("edit") or viewlibrary.check_permission("power") then %>
|
||||
<td>
|
||||
<% local socket = cfe({type="hidden", value=item.socket}) %>
|
||||
<% local outlet = cfe({type="hidden", value=item.outlet}) %>
|
||||
<% if viewlibrary.check_permission("edit") then
|
||||
htmlviewfunctions.displayitem(cfe({type="link", value={socket=socket, redir=redir}, label="", option="Edit", action="edit" }), page_info, -1)
|
||||
htmlviewfunctions.displayitem(cfe({type="link", value={outlet=outlet, redir=redir}, label="", option="Edit", action="edit" }), page_info, -1)
|
||||
end %>
|
||||
<% if viewlibrary.check_permission("poweron") or viewlibrary.check_permission("poweroff") then
|
||||
htmlviewfunctions.displayitem(cfe({type="form", value={socket=socket, redir=redir}, label="", option="Power ON", action="poweron" }), page_info, -1)
|
||||
htmlviewfunctions.displayitem(cfe({type="form", value={socket=socket, redir=redir}, label="", option="Power OFF", action="poweroff" }), page_info, -1)
|
||||
htmlviewfunctions.displayitem(cfe({type="form", value={outlet=outlet, redir=redir}, label="", option="Power ON", action="poweron" }), page_info, -1)
|
||||
htmlviewfunctions.displayitem(cfe({type="form", value={outlet=outlet, redir=redir}, label="", option="Power OFF", action="poweroff" }), page_info, -1)
|
||||
end %>
|
||||
</td>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user