diff options
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm | 110 |
1 files changed, 55 insertions, 55 deletions
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 ced4d5f774..5d544ca60b 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 @@ -62,6 +62,7 @@ <%+header%> +<script type="text/javascript" src="<%=resource%>/cbi.js"></script> <style type="text/css"> span:target { color: blue; @@ -70,7 +71,6 @@ </style> <h2 name="content"><%:Firewall Status%></h2> -<br /> <% if has_ip6tables then %> <ul class="cbi-tabmenu"> @@ -88,69 +88,69 @@ <input type="submit" class="cbi-button" name="restart" value="<%:Restart Firewall%>" /> </form> - <fieldset class="cbi-section"> + <div class="cbi-section"> <% for _, tbl in ipairs(tables) do chaincnt = 0 %> <h3><%:Table%>: <%=tbl%></h3> - <div class="table cbi-section-table" style="font-size:90%"> - <% for _, chain in ipairs(ipt:chains(tbl)) do - rowcnt = 0 - chaincnt = chaincnt + 1 - chaininfo = ipt:chain(tbl, chain) - %> - <div class="tr cbi-section-table-titles cbi-rowstyle-<%=rowstyle()%>"> - <div class="th cbi-section-table-cell" style="text-align:left" colspan="11"> - <br /><span id="rule_<%=tbl:lower()%>_<%=chain%>"> - <%:Chain%> <em><%=chain%></em> - (<%- if chaininfo.policy then -%> - <%:Policy%>: <em><%=chaininfo.policy%></em>, <%:Packets%>: <%=chaininfo.packets%>, <%:Traffic%>: <%=wba.byte_format(chaininfo.bytes)-%> - <%- else -%> - <%:References%>: <%=chaininfo.references-%> - <%- end -%>)</span> - </div> - </div> - <div class="tr cbi-section-table-descr"> - <div class="th cbi-section-table-cell"><%:Pkts.%></div> - <div class="th cbi-section-table-cell"><%:Traffic%></div> - <div class="th cbi-section-table-cell"><%:Target%></div> - <div class="th cbi-section-table-cell"><%:Prot.%></div> - <div class="th cbi-section-table-cell"><%:In%></div> - <div class="th cbi-section-table-cell"><%:Out%></div> - <div class="th cbi-section-table-cell"><%:Source%></div> - <div class="th cbi-section-table-cell"><%:Destination%></div> - <div class="th cbi-section-table-cell" style="width:30%"><%:Options%></div> - </div> - <% for _, rule in ipairs(ipt:find({table=tbl, chain=chain})) do %> - <div class="tr cbi-section-table-row cbi-rowstyle-<%=rowstyle()%>"> - <div class="td"><%=rule.packets%></div> - <div class="td" style="white-space: nowrap"><%=wba.byte_format(rule.bytes)%></div> - <div class="td"><%=rule.target and link_target(tbl, rule.target) or "-"%></div> - <div class="td"><%=rule.protocol%></div> - <div class="td"><%=link_iface(rule.inputif)%></div> - <div class="td"><%=link_iface(rule.outputif)%></div> - <div class="td"><%=rule.source%></div> - <div class="td"><%=rule.destination%></div> - <div class="td" style="width:30%"><small><%=#rule.options > 0 and luci.util.pcdata(table.concat(rule.options, " ")) or "-"%></small></div> + <% for _, chain in ipairs(ipt:chains(tbl)) do + rowcnt = 0 + chaincnt = chaincnt + 1 + chaininfo = ipt:chain(tbl, chain) + %> + <h4 id="rule_<%=tbl:lower()%>_<%=chain%>"> + <%:Chain%> <em><%=chain%></em> + (<%- if chaininfo.policy then -%> + <%:Policy%>: <em><%=chaininfo.policy%></em>, <%:Packets%>: <%=chaininfo.packets%>, <%:Traffic%>: <%=wba.byte_format(chaininfo.bytes)-%> + <%- else -%> + <%:References%>: <%=chaininfo.references-%> + <%- end -%>) + </h4> + + <div class="cbi-section-node"> + <div class="table" style="font-size:90%"> + <div class="tr table-titles cbi-rowstyle-<%=rowstyle()%>"> + <div class="th hide-xs"><%:Pkts.%></div> + <div class="th nowrap"><%:Traffic%></div> + <div class="th col-5"><%:Target%></div> + <div class="th"><%:Prot.%></div> + <div class="th"><%:In%></div> + <div class="th"><%:Out%></div> + <div class="th"><%:Source%></div> + <div class="th"><%:Destination%></div> + <div class="th col-9 hide-xs"><%:Options%></div> </div> - <% end %> - <% if rowcnt == 1 then %> - <div class="tr cbi-section-table-titles cbi-rowstyle-<%=rowstyle()%>"> - <div class="td" colspan="9"><em><%:No rules in this chain%></em></div> - </div> - <% end %> - <% end %> - - <% if chaincnt == 0 then %> - <div class="tr cbi-section-table-titles cbi-rowstyle-<%=rowstyle()%>"> - <div class="td" colspan="9"><em><%:No chains in this table%></em></div> + <% for _, rule in ipairs(ipt:find({table=tbl, chain=chain})) do %> + <div class="tr cbi-rowstyle-<%=rowstyle()%>"> + <div class="td"><%=rule.packets%></div> + <div class="td nowrap"><%=wba.byte_format(rule.bytes)%></div> + <div class="td col-5"><%=rule.target and link_target(tbl, rule.target) or "-"%></div> + <div class="td"><%=rule.protocol%></div> + <div class="td"><%=link_iface(rule.inputif)%></div> + <div class="td"><%=link_iface(rule.outputif)%></div> + <div class="td"><%=rule.source%></div> + <div class="td"><%=rule.destination%></div> + <div class="td col-9 hide-xs"><%=#rule.options > 0 and luci.util.pcdata(table.concat(rule.options, " ")) or "-"%></div> + </div> + <% end %> + + <% if rowcnt == 1 then %> + <div class="tr cbi-rowstyle-<%=rowstyle()%>"> + <div class="td" colspan="9"><em><%:No rules in this chain%></em></div> + </div> + <% end %> </div> - <% end %> - </div> + </div> + <% end %> + + <% if chaincnt == 0 then %> + <em><%:No chains in this table%></em> + <% end %> + <br /><br /> <% end %> - </fieldset> + </div> </div> <%+footer%> |