summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qos-details-html.lsp23
1 files changed, 11 insertions, 12 deletions
diff --git a/qos-details-html.lsp b/qos-details-html.lsp
index 8592ff8..7b5f9ff 100644
--- a/qos-details-html.lsp
+++ b/qos-details-html.lsp
@@ -17,7 +17,7 @@ html = require("acf.html")
<script type="text/javascript">
$(document).ready(function() {
- $("#list").tablesorter({widgets: ['zebra']});
+ $("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']});
});
</script>
@@ -25,7 +25,7 @@ html = require("acf.html")
<% viewlibrary.dispatch_component("status") %>
-<h2><%= html.html_escape(data.label) %></h2>
+<% local header_level = htmlviewfunctions.displaysectionstart(data, page_info) %>
<table id="list" class="tablesorter"><thead>
<tr>
<th>Action</th>
@@ -33,27 +33,26 @@ html = require("acf.html")
<th>Status</th>
</tr>
</thead><tbody>
+<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %>
<% for i,intf in ipairs(data.value) do %>
<tr>
<td>
<% if intf.enabled then %>
- <% io.write(html.link{value = "config?DEV="..intf.interface.."&redir="..page_info.orig_action, label="Edit " }) %>
- <% io.write(html.link{value = "expert?filename="..intf.filename.."&redir="..page_info.orig_action, label="Expert " }) %>
- <% io.write(html.link{value = page_info.script .. "/alpine-baselayout/rc/edit?servicename="..intf.init.."&redir=".. page_info.orig_action, label="Autostart " }) %>
+ <% 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 %>
- <% io.write(html.link{value = "enable?submit=true&interface="..intf.interface, label="Enable " }) %>
+ <% htmlviewfunctions.displayitem(cfe({type="form", value={interface=cfe({type="hidden", value=intf.interface})}, label="", option="Enable", action="enable"}), page_info, -1) %>
<% end %>
</td>
<td><%= html.html_escape(intf.interface) %></td>
<td><%= html.html_escape(intf.status) %></td>
<% if intf.enabled then %>
- <td><form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/startstopinterface") %>" method="post">
- <input type="hidden" name="init" value="<%= intf.init %>">
- <input class="submit" type="submit" name="submit" value="Start">
- <input class="submit" type="submit" name="submit" value="Stop">
- <input class="submit" type="submit" name="submit" value="Restart">
- </form></td>
+ <td>
+ <% htmlviewfunctions.displayitem(cfe({type="form", value={init=cfe({type="hidden", value=intf.init})}, label="", option={"Start", "Stop", "Restart"}, action="startstopinterface"}), page_info, -1) %>
+ </td>
<% end %>
</tr>
<% end %>
</tbody></table>
+<% htmlviewfunctions.displaysectionend(header_level) %>