summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qos-details-html.lsp52
1 files changed, 35 insertions, 17 deletions
diff --git a/qos-details-html.lsp b/qos-details-html.lsp
index 50f488b..8592ff8 100644
--- a/qos-details-html.lsp
+++ b/qos-details-html.lsp
@@ -3,21 +3,39 @@ htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html")
%>
+<script type="text/javascript">
+ if (typeof jQuery == 'undefined') {
+ document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"><\/script>');
+ }
+</script>
+
+<script type="text/javascript">
+ if (typeof $.tablesorter == 'undefined') {
+ document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.tablesorter.js"><\/script>');
+ }
+</script>
+
+<script type="text/javascript">
+ $(document).ready(function() {
+ $("#list").tablesorter({widgets: ['zebra']});
+ });
+</script>
+
<% htmlviewfunctions.displaycommandresults({"enable","config","expert","startstopinterface"}, session) %>
<% viewlibrary.dispatch_component("status") %>
-<H2><%= html.html_escape(data.label) %></H2>
-<DL><TABLE>
- <TR style="background:#eee;font-weight:bold;">
- <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Action</TD>
- <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Interface</TD>
- <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Status</TD>
- <TD style="white-space:nowrap;text-align:left;" class="header"></TD>
- </TR>
+<h2><%= html.html_escape(data.label) %></h2>
+<table id="list" class="tablesorter"><thead>
+ <tr>
+ <th>Action</th>
+ <th>Interface</th>
+ <th>Status</th>
+ </tr>
+</thead><tbody>
<% for i,intf in ipairs(data.value) do %>
- <TR>
- <TD style="padding-right:20px;white-space:nowrap;">
+ <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 " }) %>
@@ -25,17 +43,17 @@ html = require("acf.html")
<% else %>
<% io.write(html.link{value = "enable?submit=true&interface="..intf.interface, label="Enable " }) %>
<% end %>
- </TD>
- <TD style="padding-right:20px;white-space:nowrap;"><%= html.html_escape(intf.interface) %></TD>
- <TD style="white-space:nowrap;" width="90%"><%= html.html_escape(intf.status) %></TD>
+ </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">
+ <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>
+ </form></td>
<% end %>
- </TR>
+ </tr>
<% end %>
-</TABLE></DL>
+</tbody></table>