modules/admin-full:

- translate i18n fallbacks to english in status controller
	- bump copyright year in iptables and interfaces templates
	- remove redundant fieldsets from iptables page and nuke a left-over code
This commit is contained in:
Jo-Philipp Wich 2009-02-08 20:20:42 +00:00
parent 2c73c95055
commit 2e913fd28f
3 changed files with 73 additions and 78 deletions

View file

@ -20,8 +20,8 @@ function index()
entry({"admin", "status"}, template("admin_status/index"), i18n("status", "Status"), 20).index = true entry({"admin", "status"}, template("admin_status/index"), i18n("status", "Status"), 20).index = true
entry({"admin", "status", "interfaces"}, template("admin_status/interfaces"), i18n("interfaces", "Interfaces"), 1) entry({"admin", "status", "interfaces"}, template("admin_status/interfaces"), i18n("interfaces", "Interfaces"), 1)
entry({"admin", "status", "iptables"}, call("action_iptables"), i18n("a_s_ipt", "Firewall"), 2) entry({"admin", "status", "iptables"}, call("action_iptables"), i18n("a_s_ipt", "Firewall"), 2)
entry({"admin", "status", "syslog"}, call("action_syslog"), i18n("syslog", "Systemprotokoll"), 3) entry({"admin", "status", "syslog"}, call("action_syslog"), i18n("syslog", "System Log"), 3)
entry({"admin", "status", "dmesg"}, call("action_dmesg"), i18n("dmesg", "Kernelprotokoll"), 4) entry({"admin", "status", "dmesg"}, call("action_dmesg"), i18n("dmesg", "Kernel Log"), 4)
end end

View file

@ -1,7 +1,7 @@
<%# <%#
LuCI - Lua Configuration Interface LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2008-2009 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net> Copyright 2008-2009 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,7 +1,7 @@
<%# <%#
LuCI - Lua Configuration Interface LuCI - Lua Configuration Interface
Copyright 2009 Steven Barth <steven@midlink.org> Copyright 2008-2009 Steven Barth <steven@midlink.org>
Copyright 2009 Jo-Philipp Wich <xm@leipzig.freifunk.net> Copyright 2008-2009 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@ -54,84 +54,79 @@ $Id$
<form method="post" action="<%=REQUEST_URI%>"> <form method="post" action="<%=REQUEST_URI%>">
<div class="cbi-map"> <div class="cbi-map">
<fieldset class="cbi-section"> <fieldset class="cbi-section">
<fieldset class="cbi-section-node"> <h3><%:a_s_ipt_actions Actions%></h3>
<h3><%:a_s_ipt_actions Actions%></h3> <ul>
<ul> <li><a href="<%=REQUEST_URI%>?zero=1"><%:a_s_ipt_reset Reset Counters%></a></li>
<li><a href="<%=REQUEST_URI%>?zero=1"><%:a_s_ipt_reset Reset Counters%></a></li> <li><a href="<%=REQUEST_URI%>?restart=1"><%:a_s_ipt_restart Restart Firewall%></a></li>
<li><a href="<%=REQUEST_URI%>?restart=1"><%:a_s_ipt_restart Restart Firewall%></a></li> </ul>
</ul> <br /><br />
</fieldset>
<br />
<fieldset class="cbi-section-node"> <% for _, tbl in ipairs({"Filter", "NAT", "Mangle"}) do chaincnt = 0 %>
<% for _, tbl in ipairs({"Filter", "NAT", "Mangle"}) do chaincnt = 0 %> <h3><%:a_s_ipt_table Table%>: <%=tbl%></h3>
<h3><%:a_s_ipt_table Table%>: <%=tbl%></h3> <table class="cbi-section-table" style="font-size:90%">
<table class="cbi-section-table" style="font-size:90%"> <% for _, chain in ipairs(ipt:chains(tbl)) do
<% for _, chain in ipairs(ipt:chains(tbl)) do rowcnt = 0
rowcnt = 0 chaincnt = chaincnt + 1
chaincnt = chaincnt + 1 chaininfo = ipt:chain(tbl, chain)
chaininfo = ipt:chain(tbl, chain) %>
%> <tr class="cbi-section-table-titles cbi-rowstyle-<%=rowstyle()%>">
<tr class="cbi-section-table-titles cbi-rowstyle-<%=rowstyle()%>"> <th class="cbi-section-table-cell" style="text-align:left" colspan="11">
<th class="cbi-section-table-cell" style="text-align:left" colspan="11"> <br /><a name="rule_<%=tbl:lower()%>_<%=chain%>"></a>
<br /><a name="rule_<%=tbl:lower()%>_<%=chain%>"></a> <%:a_s_ipt_chain Chain%> <em><%=chain%></em>
<%:a_s_ipt_chain Chain%> <em><%=chain%></em> (<%- if chaininfo.policy then -%>
(<%- if chaininfo.policy then -%> <%:a_s_ipt_policy Policy%>: <em><%=chaininfo.policy%></em>, <%:a_s_ipt_packets Packets%>: <%=chaininfo.packets%>, <%:a_s_ipt_bytes Traffic%>: <%=wba.byte_format(chaininfo.bytes)-%>
<%:a_s_ipt_policy Policy%>: <em><%=chaininfo.policy%></em>, <%:a_s_ipt_packets Packets%>: <%=chaininfo.packets%>, <%:a_s_ipt_bytes Traffic%>: <%=wba.byte_format(chaininfo.bytes)-%> <%- else -%>
<%- else -%> <%:a_s_ipt_references References%>: <%=chaininfo.references-%>
<%:a_s_ipt_references References%>: <%=chaininfo.references-%> <%- end -%>)
<%- end -%>) </th>
</th> </tr>
</tr> <tr class="cbi-section-table-descr">
<tr class="cbi-section-table-descr"> <th class="cbi-section-table-cell"><%:a_s_ipt_rulenum Rule #%></th>
<th class="cbi-section-table-cell"><%:a_s_ipt_rulenum Rule #%></th> <th class="cbi-section-table-cell"><%:a_s_ipt_packets Pkts.%></th>
<th class="cbi-section-table-cell"><%:a_s_ipt_packets Pkts.%></th> <th class="cbi-section-table-cell"><%:a_s_ipt_bytes Traffic%></th>
<th class="cbi-section-table-cell"><%:a_s_ipt_bytes Traffic%></th> <th class="cbi-section-table-cell"><%:a_s_ipt_target Target%></th>
<th class="cbi-section-table-cell"><%:a_s_ipt_target Target%></th> <th class="cbi-section-table-cell"><%:a_s_ipt_proto Prot.%></th>
<th class="cbi-section-table-cell"><%:a_s_ipt_proto Prot.%></th> <th class="cbi-section-table-cell"><%:a_s_ipt_flags Flags%></th>
<th class="cbi-section-table-cell"><%:a_s_ipt_flags Flags%></th> <th class="cbi-section-table-cell"><%:a_s_ipt_inputif In%></th>
<th class="cbi-section-table-cell"><%:a_s_ipt_inputif In%></th> <th class="cbi-section-table-cell"><%:a_s_ipt_outputif Out%></th>
<th class="cbi-section-table-cell"><%:a_s_ipt_outputif Out%></th> <th class="cbi-section-table-cell"><%:a_s_ipt_source Source%></th>
<th class="cbi-section-table-cell"><%:a_s_ipt_source Source%></th> <th class="cbi-section-table-cell"><%:a_s_ipt_destination Destination%></th>
<th class="cbi-section-table-cell"><%:a_s_ipt_destination Destination%></th> <th class="cbi-section-table-cell"><%:a_s_ipt_options Options%></th>
<th class="cbi-section-table-cell"><%:a_s_ipt_options Options%></th> </tr>
</tr>
<% for _, rule in ipairs(ipt:find({table=tbl, chain=chain})) do %> <% for _, rule in ipairs(ipt:find({table=tbl, chain=chain})) do %>
<tr class="cbi-section-table-row cbi-rowstyle-<%=rowstyle()%>"> <tr class="cbi-section-table-row cbi-rowstyle-<%=rowstyle()%>">
<td><%=rule.index%></td> <td><%=rule.index%></td>
<td><%=rule.packets%></td> <td><%=rule.packets%></td>
<td><%=wba.byte_format(rule.bytes)%></td> <td><%=wba.byte_format(rule.bytes)%></td>
<td><%=link_target(tbl, rule.target)%></td> <td><%=link_target(tbl, rule.target)%></td>
<td><%=rule.protocol%></td> <td><%=rule.protocol%></td>
<td><%=rule.flags%></td> <td><%=rule.flags%></td>
<td><%=link_iface(rule.inputif)%></td> <td><%=link_iface(rule.inputif)%></td>
<td><%=link_iface(rule.outputif)%></td> <td><%=link_iface(rule.outputif)%></td>
<td><%=rule.source%></td> <td><%=rule.source%></td>
<td><%=rule.destination%></td> <td><%=rule.destination%></td>
<td><small><%=#rule.options > 0 and table.concat(rule.options, " ") or "-"%></small></td> <td><small><%=#rule.options > 0 and table.concat(rule.options, " ") or "-"%></small></td>
</tr>
<% end %>
<% if rowcnt == 1 then %>
<tr class="cbi-section-table-titles cbi-rowstyle-<%=rowstyle()%>">
<td colspan="11"><em><%:a_s_ipt_norules No rules in this chain%></em></td>
</tr>
<% end %>
<% end %>
<% if chaincnt == 0 then %>
<tr class="cbi-section-table-titles cbi-rowstyle-<%=rowstyle()%>">
<td colspan="11"><em><%:a_s_ipt_nochains No chains in this table%></em></td>
</tr> </tr>
<% end %> <% end %>
</table>
<br /><br /> <% if rowcnt == 1 then %>
<% end %> <tr class="cbi-section-table-titles cbi-rowstyle-<%=rowstyle()%>">
</fieldset> <td colspan="11"><em><%:a_s_ipt_norules No rules in this chain%></em></td>
</tr>
<% end %>
<% end %>
<% if chaincnt == 0 then %>
<tr class="cbi-section-table-titles cbi-rowstyle-<%=rowstyle()%>">
<td colspan="11"><em><%:a_s_ipt_nochains No chains in this table%></em></td>
</tr>
<% end %>
</table>
<br /><br />
<% end %>
</fieldset> </fieldset>
</div> </div>
</form> </form>
<%+footer%> <%+footer%>
<% if ret == 0 then luci.sys.reboot() end %>