diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:32:09 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:32:09 +0000 |
commit | cc4fd41686f103acdc72c72a8e8295c3c169a28f (patch) | |
tree | 5135a6bfe506108edc24c3cce11cb73d4c9766ed /ipsectools-details-html.lsp | |
parent | 72c892f9d401585566ebf6e5b3dffd3c0c178165 (diff) | |
download | acf-ipsec-tools-cc4fd41686f103acdc72c72a8e8295c3c169a28f.tar.bz2 acf-ipsec-tools-cc4fd41686f103acdc72c72a8e8295c3c169a28f.tar.xz |
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
Diffstat (limited to 'ipsectools-details-html.lsp')
-rw-r--r-- | ipsectools-details-html.lsp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/ipsectools-details-html.lsp b/ipsectools-details-html.lsp index b1df6a7..1e8bfe6 100644 --- a/ipsectools-details-html.lsp +++ b/ipsectools-details-html.lsp @@ -5,33 +5,31 @@ html = require("acf.html") <% viewlibrary.dispatch_component("status") %> -<H2><%= html.html_escape(data.label) %></H2> -<DL> +<h2><%= html.html_escape(data.label) %></h2> <% if not data.value.show_isakmp or #data.value.show_isakmp.value == 0 then - io.write("No status details available") + io.write("<p>No status details available</p>") else for i,entry in pairs(data.value.show_isakmp.value) do if (type(entry) == "table") and (entry.Destination) and (entry.Destination.value) and (#entry.Destination.value > 0) then - io.write("<H3><IMG SRC='"..html.html_escape(page_info.wwwprefix..page_info.staticdir).."/tango/16x16/status/network-") + io.write("<h3><img src='"..html.html_escape(page_info.wwwprefix..page_info.staticdir).."/tango/16x16/status/network-") if (tonumber(entry.St.value) < 9) then io.write("error") else io.write("idle") end - io.write(".png' width='16' height='16'> ".. html.html_escape(entry.Destination.value) .. "</H3>") - io.write("<TABLE>\n") + io.write(".png' width='16' height='16'> ".. html.html_escape(entry.Destination.value) .. "</h3>") + io.write("<table>\n") local tags = {"Created","Source","Destination", "St", "Phase2details"} for j,tag in pairs(tags) do - io.write("<TR><TD STYLE='font-weight:bold;width:120px;border:none;'>" .. - html.html_escape(entry[tag].label) .. "</TD><TD STYLE='border:none;'>"..string.gsub(html.html_escape(entry[tag].value), "\n", "<BR>")) + io.write("<tr><td style='font-weight:bold;width:120px;border:none;'>" .. + html.html_escape(entry[tag].label) .. "</td><td style='border:none;'>"..string.gsub(html.html_escape(entry[tag].value), "\n", "<br/>")) if (entry[tag].descr) and (#entry[tag].descr > 0) then io.write(" (".. html.html_escape(entry[tag].descr) .. ")") end - io.write("</TD></TR>") + io.write("</td></tr>") end - io.write("</TABLE>") + io.write("</table>") end end end --htmlviewfunctions.displayitem(data.value.ip_xfrm_policy) %> -</DL> |