From 2e913fd28fd85daebd37347fd5677211a7cb0ea6 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 8 Feb 2009 20:20:42 +0000 Subject: [PATCH] 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 --- .../luasrc/controller/admin/status.lua | 4 +- .../luasrc/view/admin_status/interfaces.htm | 4 +- .../luasrc/view/admin_status/iptables.htm | 139 +++++++++--------- 3 files changed, 71 insertions(+), 76 deletions(-) diff --git a/modules/admin-full/luasrc/controller/admin/status.lua b/modules/admin-full/luasrc/controller/admin/status.lua index abfc9d69c..feb0802e5 100644 --- a/modules/admin-full/luasrc/controller/admin/status.lua +++ b/modules/admin-full/luasrc/controller/admin/status.lua @@ -20,8 +20,8 @@ function index() 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", "iptables"}, call("action_iptables"), i18n("a_s_ipt", "Firewall"), 2) - entry({"admin", "status", "syslog"}, call("action_syslog"), i18n("syslog", "Systemprotokoll"), 3) - entry({"admin", "status", "dmesg"}, call("action_dmesg"), i18n("dmesg", "Kernelprotokoll"), 4) + entry({"admin", "status", "syslog"}, call("action_syslog"), i18n("syslog", "System Log"), 3) + entry({"admin", "status", "dmesg"}, call("action_dmesg"), i18n("dmesg", "Kernel Log"), 4) end diff --git a/modules/admin-full/luasrc/view/admin_status/interfaces.htm b/modules/admin-full/luasrc/view/admin_status/interfaces.htm index 562b1e675..abcf6f5dc 100644 --- a/modules/admin-full/luasrc/view/admin_status/interfaces.htm +++ b/modules/admin-full/luasrc/view/admin_status/interfaces.htm @@ -1,7 +1,7 @@ <%# LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich +Copyright 2008-2009 Steven Barth +Copyright 2008-2009 Jo-Philipp Wich Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/modules/admin-full/luasrc/view/admin_status/iptables.htm b/modules/admin-full/luasrc/view/admin_status/iptables.htm index da0a994d9..b0153b7aa 100644 --- a/modules/admin-full/luasrc/view/admin_status/iptables.htm +++ b/modules/admin-full/luasrc/view/admin_status/iptables.htm @@ -1,7 +1,7 @@ <%# LuCI - Lua Configuration Interface -Copyright 2009 Steven Barth -Copyright 2009 Jo-Philipp Wich +Copyright 2008-2009 Steven Barth +Copyright 2008-2009 Jo-Philipp Wich Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -54,84 +54,79 @@ $Id$
-
-

<%:a_s_ipt_actions Actions%>

- -
-
- -
- <% for _, tbl in ipairs({"Filter", "NAT", "Mangle"}) do chaincnt = 0 %> -

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

- - <% for _, chain in ipairs(ipt:chains(tbl)) do - rowcnt = 0 - chaincnt = chaincnt + 1 - chaininfo = ipt:chain(tbl, chain) - %> - - - - - - - - - - - - - - - +

<%:a_s_ipt_actions Actions%>

+ +

+ + <% for _, tbl in ipairs({"Filter", "NAT", "Mangle"}) do chaincnt = 0 %> +

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

+
-
- <%:a_s_ipt_chain Chain%> <%=chain%> - (<%- if chaininfo.policy then -%> - <%:a_s_ipt_policy Policy%>: <%=chaininfo.policy%>, <%:a_s_ipt_packets Packets%>: <%=chaininfo.packets%>, <%:a_s_ipt_bytes Traffic%>: <%=wba.byte_format(chaininfo.bytes)-%> - <%- else -%> - <%:a_s_ipt_references References%>: <%=chaininfo.references-%> - <%- end -%>) -
<%:a_s_ipt_rulenum Rule #%><%:a_s_ipt_packets Pkts.%><%:a_s_ipt_bytes Traffic%><%:a_s_ipt_target Target%><%:a_s_ipt_proto Prot.%><%:a_s_ipt_flags Flags%><%:a_s_ipt_inputif In%><%:a_s_ipt_outputif Out%><%:a_s_ipt_source Source%><%:a_s_ipt_destination Destination%><%:a_s_ipt_options Options%>
+ <% 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 %> -
+
+ <%:a_s_ipt_chain Chain%> <%=chain%> + (<%- if chaininfo.policy then -%> + <%:a_s_ipt_policy Policy%>: <%=chaininfo.policy%>, <%:a_s_ipt_packets Packets%>: <%=chaininfo.packets%>, <%:a_s_ipt_bytes Traffic%>: <%=wba.byte_format(chaininfo.bytes)-%> + <%- else -%> + <%:a_s_ipt_references References%>: <%=chaininfo.references-%> + <%- end -%>) +
<%:a_s_ipt_rulenum Rule #%><%:a_s_ipt_packets Pkts.%><%:a_s_ipt_bytes Traffic%><%:a_s_ipt_target Target%><%:a_s_ipt_proto Prot.%><%:a_s_ipt_flags Flags%><%:a_s_ipt_inputif In%><%:a_s_ipt_outputif Out%><%:a_s_ipt_source Source%><%:a_s_ipt_destination Destination%><%:a_s_ipt_options Options%>
<%=rule.index%><%=rule.packets%><%=wba.byte_format(rule.bytes)%><%=link_target(tbl, rule.target)%><%=rule.protocol%><%=rule.flags%><%=link_iface(rule.inputif)%><%=link_iface(rule.outputif)%><%=rule.source%><%=rule.destination%><%=#rule.options > 0 and table.concat(rule.options, " ") or "-"%>
<%=rule.index%><%=rule.packets%><%=wba.byte_format(rule.bytes)%><%=link_target(tbl, rule.target)%><%=rule.protocol%><%=rule.flags%><%=link_iface(rule.inputif)%><%=link_iface(rule.outputif)%><%=rule.source%><%=rule.destination%><%=#rule.options > 0 and table.concat(rule.options, " ") or "-"%>
<%:a_s_ipt_norules No rules in this chain%>
<%:a_s_ipt_nochains No chains in this table%><%:a_s_ipt_norules No rules in this chain%>
-

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

+ <% end %>
<%+footer%> -<% if ret == 0 then luci.sys.reboot() end %> -- 2.25.1