X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-mod-admin-full%2Fluasrc%2Fview%2Fadmin_status%2Fiptables.htm;h=f49469a5997b4a2961bf6d892ea9b35b274edb23;hp=3757388699aeed663a16fa5a8761c4ede39e7a7f;hb=d4666757b746fe88c517a605a6f3b9dbcaa0ff93;hpb=8bb749ecc3b5f7f836f744f0056e90ac78522926 diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm index 375738869..f49469a59 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm @@ -1,6 +1,6 @@ <%# Copyright 2008-2009 Steven Barth - Copyright 2008-2011 Jo-Philipp Wich + Copyright 2008-2015 Jo-Philipp Wich Licensed to the public under the Apache License 2.0. -%> @@ -37,7 +37,7 @@ local net = wba.iface_get_network(i) if net and i ~= "lo" then return '%s' %{ - luci.dispatcher.build_url("admin", "network", "network", net), i + url("admin/network/network", net), i } end @@ -60,6 +60,7 @@

<%:Firewall Status%>

+
<% if has_ip6tables then %>
    @@ -68,82 +69,78 @@
<% end %> -
-
-
-

<%:Actions%>

- -

- - <% for _, tbl in ipairs(tables) do chaincnt = 0 %> -

<%:Table%>: <%=tbl%>

- - <% for _, chain in ipairs(ipt:chains(tbl)) do - rowcnt = 0 - chaincnt = chaincnt + 1 - chaininfo = ipt:chain(tbl, chain) - %> - - +
+ + " style="position: absolute; right: 0"> + + + + + + +
+ + <% for _, tbl in ipairs(tables) do chaincnt = 0 %> +

<%:Table%>: <%=tbl%>

+
-
- <%:Chain%> <%=chain%> - (<%- if chaininfo.policy then -%> - <%:Policy%>: <%=chaininfo.policy%>, <%:Packets%>: <%=chaininfo.packets%>, <%:Traffic%>: <%=wba.byte_format(chaininfo.bytes)-%> - <%- else -%> - <%:References%>: <%=chaininfo.references-%> - <%- end -%>) -
+ <% for _, chain in ipairs(ipt:chains(tbl)) do + rowcnt = 0 + chaincnt = chaincnt + 1 + chaininfo = ipt:chain(tbl, chain) + %> + + + + + + + + + + + + + + + + <% for _, rule in ipairs(ipt:find({table=tbl, chain=chain})) do %> + + + + + + + + + + - - - - - - - - - - - - - - - <% for _, rule in ipairs(ipt:find({table=tbl, chain=chain})) do %> - - - - - - - - - - - - - - <% end %> - - <% if rowcnt == 1 then %> - - - - <% end %> <% end %> - <% if chaincnt == 0 then %> + <% if rowcnt == 1 then %> - + <% end %> -
+
+ <%:Chain%> <%=chain%> + (<%- if chaininfo.policy then -%> + <%:Policy%>: <%=chaininfo.policy%>, <%:Packets%>: <%=chaininfo.packets%>, <%:Traffic%>: <%=wba.byte_format(chaininfo.bytes)-%> + <%- else -%> + <%:References%>: <%=chaininfo.references-%> + <%- end -%>) +
<%:Pkts.%><%:Traffic%><%:Target%><%:Prot.%><%:In%><%:Out%><%:Source%><%:Destination%><%:Options%>
<%=rule.packets%><%=wba.byte_format(rule.bytes)%><%=rule.target and link_target(tbl, rule.target) or "-"%><%=rule.protocol%><%=link_iface(rule.inputif)%><%=link_iface(rule.outputif)%><%=rule.source%><%=rule.destination%><%=#rule.options > 0 and luci.util.pcdata(table.concat(rule.options, " ")) or "-"%>
<%:Rule #%><%:Pkts.%><%:Traffic%><%:Target%><%:Prot.%><%:Flags%><%:In%><%:Out%><%:Source%><%:Destination%><%:Options%>
<%=rule.index%><%=rule.packets%><%=wba.byte_format(rule.bytes)%><%=rule.target and link_target(tbl, rule.target) or "-"%><%=rule.protocol%><%=rule.flags%><%=link_iface(rule.inputif)%><%=link_iface(rule.outputif)%><%=rule.source%><%=rule.destination%><%=#rule.options > 0 and luci.util.pcdata(table.concat(rule.options, " ")) or "-"%>
<%:No rules in this chain%>
<%:No chains in this table%><%:No rules in this chain%>
-

- <% end %> -
-
- + <% end %> + + <% if chaincnt == 0 then %> + + <%:No chains in this table%> + + <% end %> + +

+ <% end %> + + <%+footer%>