diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:44:54 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:44:54 +0000 |
commit | 07f78a295b50630bdc0b6981e6a72c32e3f49185 (patch) | |
tree | ce019102434c904c0393a31c227530ebdde08d5e /openvpn-statusinfo-html.lsp | |
parent | e06ce8a37282eed0251698fb2037d65004f7d317 (diff) | |
download | acf-openvpn-07f78a295b50630bdc0b6981e6a72c32e3f49185.tar.bz2 acf-openvpn-07f78a295b50630bdc0b6981e6a72c32e3f49185.tar.xz |
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
Diffstat (limited to 'openvpn-statusinfo-html.lsp')
-rw-r--r-- | openvpn-statusinfo-html.lsp | 60 |
1 files changed, 39 insertions, 21 deletions
diff --git a/openvpn-statusinfo-html.lsp b/openvpn-statusinfo-html.lsp index 2167893..ba9881e 100644 --- a/openvpn-statusinfo-html.lsp +++ b/openvpn-statusinfo-html.lsp @@ -1,32 +1,50 @@ -<% local view, viewlibrary = ... %> +<% local view, viewlibrary, page_info, session = ... %> <% 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> + <% viewlibrary.dispatch_component("status") %> <% viewlibrary.dispatch_component("viewconfig") %> <h1>Status</h1> <h2>Connected clients</h2> - -<DL><TABLE> - <TR style="background:#eee;font-weight:bold;vertical-align:top;"> - <TD WIDTH=140>Common Name<BR>Connected at</TD> - <TD WIDTH=130>Virtual Address</TD> - <TD WIDTH=130>Real Address</TD> - <TD>Bytes<BR>Received</TD> - <TD>Bytes<BR>Sent</TD> - </TR> +<table id="list" class="tablesorter"><thead> + <tr> + <th>Common Name<br/>Connected at</th> + <th>Virtual Address</th> + <th>Real Address</th> + <th>Bytes<br/>Received</th> + <th>Bytes<br/>Sent</th> + </tr> +</thead><tbody> <% for i in ipairs(view.value) do %> - <TR> - <TD><%= html.html_escape(view.value[i].CN) %></TD> - <TD><%= html.html_escape(view.value[i].VIRTADDR) %></TD> - <TD><%= html.html_escape(view.value[i].REALADDR) %></TD> - <TD><%= html.html_escape(view.value[i].BYTESRCV) %></TD> - <TD><%= html.html_escape(view.value[i].BYTESSND) %></TD> - </TR> - <TR> - <TD COLSPAN=5 style="border-bottom: 1px solid #ccc;"><%= html.html_escape(view.value[i].CONN) %></TD> - </TR> + <tr> + <td><%= html.html_escape(view.value[i].CN) %></td> + <td><%= html.html_escape(view.value[i].VIRTADDR) %></td> + <td><%= html.html_escape(view.value[i].REALADDR) %></td> + <td><%= html.html_escape(view.value[i].BYTEsrcV) %></td> + <td><%= html.html_escape(view.value[i].BYTESSND) %></td> + </tr> + <tr> + <td colspan=5><%= html.html_escape(view.value[i].CONN) %></td> + </tr> <% end %> -</TABLE></DL> +</tbody></table> |