diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:32:53 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-02-03 21:32:53 +0000 |
commit | 8483bc397f2e6adb2befa2153b8c375684bae441 (patch) | |
tree | fe0d9cdf63c5212088c76a461280a00d08f45d63 | |
parent | 5ec957f05aa963f3b90d9e96e7dcef039d55c553 (diff) | |
download | acf-iptables-8483bc397f2e6adb2befa2153b8c375684bae441.tar.bz2 acf-iptables-8483bc397f2e6adb2befa2153b8c375684bae441.tar.xz |
Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags
-rw-r--r-- | iptables-details-html.lsp | 12 | ||||
-rw-r--r-- | iptables-editrule-html.lsp | 13 | ||||
-rw-r--r-- | iptables-filterrules-html.lsp | 48 |
3 files changed, 34 insertions, 39 deletions
diff --git a/iptables-details-html.lsp b/iptables-details-html.lsp index 3f6e1e5..8b6fbe0 100644 --- a/iptables-details-html.lsp +++ b/iptables-details-html.lsp @@ -4,11 +4,11 @@ html = require("acf.html") <% viewlibrary.dispatch_component("status") %> -<H2><%= html.html_escape(data.label) %></H2> +<h2><%= html.html_escape(data.label) %></h2> <% for i,tab in ipairs({"filter", "nat", "mangle"}) do %> - <H3><%= html.html_escape(tab) %></H3> - <DL><TABLE> - <TR><TD><%= html.html_escape(data.value[tab].chains) %> Chains</TD></TR> - <TR><TD><%= html.html_escape(data.value[tab].rules) %> Rules</TD></TR> - </TABLE></DL> + <h3><%= html.html_escape(tab) %></h3> + <table> + <tr><td><%= html.html_escape(data.value[tab].chains) %> Chains</td></tr> + <tr><td><%= html.html_escape(data.value[tab].rules) %> Rules</td></tr> + </table> <% end %> diff --git a/iptables-editrule-html.lsp b/iptables-editrule-html.lsp index 905980a..42f64df 100644 --- a/iptables-editrule-html.lsp +++ b/iptables-editrule-html.lsp @@ -3,7 +3,7 @@ htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> -<H1><%= html.html_escape(form.label) %></H1> +<h1><%= html.html_escape(form.label) %></h1> <% for name,val in pairs(form.value) do val.name = name end form.value.table.readonly = true @@ -14,13 +14,13 @@ form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/ htmlviewfunctions.displayformstart(form) %> -<H2>Rule Identification</H2><DL> +<h2>Rule Identification</h2> <% htmlviewfunctions.displayformitem(form.value.table) htmlviewfunctions.displayformitem(form.value.chain) htmlviewfunctions.displayformitem(form.value.position) %> -</DL><H2>Basic Parameters</H2><DL> +<h2>Basic Parameters</h2> <% htmlviewfunctions.displayformitem(form.value.jump) htmlviewfunctions.displayformitem(form.value.protocol) @@ -28,14 +28,11 @@ htmlviewfunctions.displayformitem(form.value.in_interface) htmlviewfunctions.displayformitem(form.value.out_interface) htmlviewfunctions.displayformitem(form.value.source) htmlviewfunctions.displayformitem(form.value.destination) -%> -</DL><DL id="details"> -<% htmlviewfunctions.displayformitem(form.value.goto) htmlviewfunctions.displayformitem(form.value.fragment) htmlviewfunctions.displayformitem(form.value.set_counters) %> -</DL><H2>Extended Parameters</H2><DL> +<h2>Extended Parameters</h2> <% htmlviewfunctions.displayformitem(form.value.comment) htmlviewfunctions.displayformitem(form.value.addrtype_src_type) @@ -53,5 +50,5 @@ htmlviewfunctions.displayformitem(form.value.tcp_dport) htmlviewfunctions.displayformitem(form.value.udp_sport) htmlviewfunctions.displayformitem(form.value.udp_dport) %> -</DL><H2><%= html.html_escape(form.option) %></H2> +<h2><%= html.html_escape(form.option) %></h2> <% htmlviewfunctions.displayformend(form) %> diff --git a/iptables-filterrules-html.lsp b/iptables-filterrules-html.lsp index c51328e..ce84799 100644 --- a/iptables-filterrules-html.lsp +++ b/iptables-filterrules-html.lsp @@ -4,39 +4,37 @@ <% htmlviewfunctions.displaycommandresults({"editchain", "deletechain", "createrule", "deleterule", "editrule", "createchain"}, session) %> -<H1><%= html.html_escape(data.label) %></H1> -<DL> - <TABLE> +<h1><%= html.html_escape(data.label) %></h1> + <table> <% local tab = data.value.table %> <% for j,chain in ipairs(data.value) do %> - <TR><TD> + <tr><td> <% if chain.policy then %> - <a href="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/editchain?chain="..chain.name.."&table="..tab.."&redir="..page_info.orig_action) %>"><IMG SRC='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/document-properties.png' width='16' height='16' title="Edit Chain"></a> + <a href="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/editchain?chain="..chain.name.."&table="..tab.."&redir="..page_info.orig_action) %>"><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/document-properties.png' width='16' height='16' title="Edit Chain"></a> <% else %> - <a href="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/deletechain?submit=true&chain="..chain.name.."&table="..tab.."&redir="..page_info.orig_action) %>"><IMG SRC='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/list-remove.png' width='16' height='16' title="Delete Chain"></a> + <a href="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/deletechain?submit=true&chain="..chain.name.."&table="..tab.."&redir="..page_info.orig_action) %>"><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/list-remove.png' width='16' height='16' title="Delete Chain"></a> <% end %> <%= html.html_escape(chain.name) %> <% if chain.policy then io.write(" ("..html.html_escape(chain.policy)..")\n") end %> <% if chain.references then io.write(" ("..html.html_escape(chain.references).." references)\n") end %> - </TD></TR> + </td></tr> <% for j,line in ipairs(chain) do %> - <TABLE> - <TR><TD WIDTH='80px' STYLE='padding-left:40px'> - <a href="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/createrule?table="..tab.."&chain="..chain.name.."&position="..j.."&redir="..page_info.orig_action) %>"><IMG SRC='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/list-add.png' width='16' height='16' title="Insert Rule"></a> - <a href="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/deleterule?submit=true&table="..tab.."&chain="..chain.name.."&position="..j.."&redir="..page_info.orig_action) %>"><IMG SRC='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/list-remove.png' width='16' height='16' title="Delete Rule"></a> - <a href="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/editrule?table="..tab.."&chain="..chain.name.."&position="..j.."&redir="..page_info.orig_action) %>"><IMG SRC='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/document-properties.png' width='16' height='16' title="Edit Rule"></a> - </TD> - <TD WIDTH='50px'><%= html.html_escape(line.packets) %></TD><TD WIDTH='50px'><%= html.html_escape(line.bytes) %></TD> - <TD><%= html.html_escape(line.rule) %></TD> - </TR> - </TABLE> + <table> + <tr><td width='80px' style='padding-left:40px'> + <a href="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/createrule?table="..tab.."&chain="..chain.name.."&position="..j.."&redir="..page_info.orig_action) %>"><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/list-add.png' width='16' height='16' title="Insert Rule"></a> + <a href="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/deleterule?submit=true&table="..tab.."&chain="..chain.name.."&position="..j.."&redir="..page_info.orig_action) %>"><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/list-remove.png' width='16' height='16' title="Delete Rule"></a> + <a href="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/editrule?table="..tab.."&chain="..chain.name.."&position="..j.."&redir="..page_info.orig_action) %>"><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/document-properties.png' width='16' height='16' title="Edit Rule"></a> + </td> + <td width='50px'><%= html.html_escape(line.packets) %></td><td width='50px'><%= html.html_escape(line.bytes) %></td> + <td><%= html.html_escape(line.rule) %></td> + </tr> + </table> <% end %> - <TABLE> - <TR><TD WIDTH='80px' STYLE='padding-left:40px'> - <a href="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/createrule?table="..tab.."&chain="..chain.name.."&redir="..page_info.orig_action) %>"><IMG SRC='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/list-add.png' width='16' height='16' title="Append Rule"></a> - </TD></TR> - </TABLE> + <table> + <tr><td width='80px' style='padding-left:40px'> + <a href="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/createrule?table="..tab.."&chain="..chain.name.."&redir="..page_info.orig_action) %>"><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/list-add.png' width='16' height='16' title="Append Rule"></a> + </td></tr> + </table> <% end %> - <TR><TD><a href="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/createchain?table="..tab.."&redir="..page_info.orig_action) %>"><IMG SRC='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/list-add.png' width='16' height='16' title="Create Chain"></a></TD></TR> - </TABLE> -</DL> + <tr><td><a href="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/createchain?table="..tab.."&redir="..page_info.orig_action) %>"><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/list-add.png' width='16' height='16' title="Create Chain"></a></td></tr> + </table> |