diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-07-30 23:38:57 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-07-30 23:38:57 +0000 |
commit | 69bf33f5228291767ad9042b7eedd3f2190d6bd2 (patch) | |
tree | fd7d978043ab6f6aa4f4cec46cfb8d72c819a32c /iptables-filterrules-html.lsp | |
parent | f24fa679e99dfb4f1e1e9f5b2d5e19a979055b25 (diff) | |
download | acf-iptables-69bf33f5228291767ad9042b7eedd3f2190d6bd2.tar.bz2 acf-iptables-69bf33f5228291767ad9042b7eedd3f2190d6bd2.tar.xz |
Removed redirect_to_referrer, fixed startstop by moving iptables-html.lsp file, fixed status to use modelfunctions library
Diffstat (limited to 'iptables-filterrules-html.lsp')
-rw-r--r-- | iptables-filterrules-html.lsp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/iptables-filterrules-html.lsp b/iptables-filterrules-html.lsp new file mode 100644 index 0000000..7011016 --- /dev/null +++ b/iptables-filterrules-html.lsp @@ -0,0 +1,41 @@ +<% local data, viewlibrary, page_info, session = ... %> +<% require("htmlviewfunctions") %> + +<% htmlviewfunctions.displaycommandresults({"editchain", "deletechain", "createrule", "deleterule", "editrule", "createchain"}, session) %> + +<H1><%= html.html_escape(data.label) %></H1> +<DL> + <TABLE> + <% local tab = data.value.table %> + <% for j,chain in ipairs(data.value) do %> + <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> + <% 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> + <% 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> + <% 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> + <% 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> + <% 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> |