From 8483bc397f2e6adb2befa2153b8c375684bae441 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 3 Feb 2014 21:32:53 +0000 Subject: Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags --- iptables-details-html.lsp | 12 +++++------ iptables-editrule-html.lsp | 13 +++++------- 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") %> -

<%= html.html_escape(data.label) %>

+

<%= html.html_escape(data.label) %>

<% for i,tab in ipairs({"filter", "nat", "mangle"}) do %> -

<%= html.html_escape(tab) %>

-
- - -
<%= html.html_escape(data.value[tab].chains) %> Chains
<%= html.html_escape(data.value[tab].rules) %> Rules
+

<%= html.html_escape(tab) %>

+ + + +
<%= html.html_escape(data.value[tab].chains) %> Chains
<%= html.html_escape(data.value[tab].rules) %> Rules
<% 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") %> -

<%= html.html_escape(form.label) %>

+

<%= html.html_escape(form.label) %>

<% 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) %> -

Rule Identification

+

Rule Identification

<% htmlviewfunctions.displayformitem(form.value.table) htmlviewfunctions.displayformitem(form.value.chain) htmlviewfunctions.displayformitem(form.value.position) %> -

Basic Parameters

+

Basic Parameters

<% 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) -%> -
-<% htmlviewfunctions.displayformitem(form.value.goto) htmlviewfunctions.displayformitem(form.value.fragment) htmlviewfunctions.displayformitem(form.value.set_counters) %> -

Extended Parameters

+

Extended Parameters

<% 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) %> -

<%= html.html_escape(form.option) %>

+

<%= html.html_escape(form.option) %>

<% 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) %> -

<%= html.html_escape(data.label) %>

-
- +

<%= html.html_escape(data.label) %>

+
<% local tab = data.value.table %> <% for j,chain in ipairs(data.value) do %> - + <% for j,line in ipairs(chain) do %> -
+
<% if chain.policy then %> - + <% else %> - "> + "> <% 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 %> -
- - - - -
- - "> - - <%= html.html_escape(line.packets) %><%= html.html_escape(line.bytes) %><%= html.html_escape(line.rule) %>
+ + + + + +
+ + "> + + <%= html.html_escape(line.packets) %><%= html.html_escape(line.bytes) %><%= html.html_escape(line.rule) %>
<% end %> - - -
- -
+ + +
+ +
<% end %> - - -
+ + -- cgit v1.2.3