From f89450fd3e5f336397401db2f369ee9bbd587daa Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Thu, 4 Feb 2021 16:05:54 +0100 Subject: luci-app-banip: sync with banIP 0.7.0 * sync with current banIP release * move app to client side JS * tested with all standard themes Signed-off-by: Dirk Brenken --- .../luci-app-banip/luasrc/controller/banip.lua | 103 +--------- .../luasrc/model/cbi/banip/blacklist_tab.lua | 55 ------ .../luasrc/model/cbi/banip/configuration_tab.lua | 52 ----- .../luasrc/model/cbi/banip/overview_tab.lua | 215 --------------------- .../luasrc/model/cbi/banip/whitelist_tab.lua | 55 ------ .../luci-app-banip/luasrc/view/banip/banip_css.htm | 95 --------- .../luci-app-banip/luasrc/view/banip/ipsetview.htm | 67 ------- .../luci-app-banip/luasrc/view/banip/logview.htm | 36 ---- .../luci-app-banip/luasrc/view/banip/ripeview.htm | 107 ---------- .../luci-app-banip/luasrc/view/banip/runtime.htm | 164 ---------------- .../luasrc/view/banip/sourcelist.htm | 47 ----- 11 files changed, 8 insertions(+), 988 deletions(-) delete mode 100644 applications/luci-app-banip/luasrc/model/cbi/banip/blacklist_tab.lua delete mode 100644 applications/luci-app-banip/luasrc/model/cbi/banip/configuration_tab.lua delete mode 100644 applications/luci-app-banip/luasrc/model/cbi/banip/overview_tab.lua delete mode 100644 applications/luci-app-banip/luasrc/model/cbi/banip/whitelist_tab.lua delete mode 100644 applications/luci-app-banip/luasrc/view/banip/banip_css.htm delete mode 100644 applications/luci-app-banip/luasrc/view/banip/ipsetview.htm delete mode 100644 applications/luci-app-banip/luasrc/view/banip/logview.htm delete mode 100644 applications/luci-app-banip/luasrc/view/banip/ripeview.htm delete mode 100644 applications/luci-app-banip/luasrc/view/banip/runtime.htm delete mode 100644 applications/luci-app-banip/luasrc/view/banip/sourcelist.htm (limited to 'applications/luci-app-banip/luasrc') diff --git a/applications/luci-app-banip/luasrc/controller/banip.lua b/applications/luci-app-banip/luasrc/controller/banip.lua index 1befbe9867..7993bbfe9d 100644 --- a/applications/luci-app-banip/luasrc/controller/banip.lua +++ b/applications/luci-app-banip/luasrc/controller/banip.lua @@ -1,100 +1,13 @@ --- Copyright 2018-2019 Dirk Brenken (dev@brenken.org) --- This is free software, licensed under the Apache License, Version 2.0 +-- stub lua controller for 19.07 backward compatibility module("luci.controller.banip", package.seeall) -local util = require("luci.util") -local http = require("luci.http") -local i18n = require("luci.i18n") -local json = require("luci.jsonc") -local uci = require("luci.model.uci").cursor() - function index() - if not nixio.fs.access("/etc/config/banip") then - return - end - - local e = entry({"admin", "services", "banip"}, firstchild(), _("banIP"), 40) - e.dependent = false - e.acl_depends = { "luci-app-banip" } - - entry({"admin", "services", "banip", "tab_from_cbi"}, cbi("banip/overview_tab", {hideresetbtn=true, hidesavebtn=true}), _("Overview"), 10).leaf = true - entry({"admin", "services", "banip", "ipset"}, template("banip/ipsetview"), _("IPSet-Lookup"), 20).leaf = true - entry({"admin", "services", "banip", "ripe"}, template("banip/ripeview"), _("RIPE-Lookup"), 30).leaf = true - entry({"admin", "services", "banip", "log"}, template("banip/logview"), _("View Logfile"), 40).leaf = true - entry({"admin", "services", "banip", "advanced"}, firstchild(), _("Advanced"), 100) - entry({"admin", "services", "banip", "advanced", "blacklist"}, form("banip/blacklist_tab"), _("Edit Blacklist"), 110).leaf = true - entry({"admin", "services", "banip", "advanced", "whitelist"}, form("banip/whitelist_tab"), _("Edit Whitelist"), 120).leaf = true - entry({"admin", "services", "banip", "advanced", "configuration"}, form("banip/configuration_tab"), _("Edit Configuration"), 130).leaf = true - entry({"admin", "services", "banip", "ipsetview"}, call("ipset_view"), nil).leaf = true - entry({"admin", "services", "banip", "ripeview"}, call("ripe_view"), nil).leaf = true - entry({"admin", "services", "banip", "logview"}, call("log_view"), nil).leaf = true - entry({"admin", "services", "banip", "status"}, call("status_update"), nil).leaf = true - entry({"admin", "services", "banip", "action"}, call("ban_action"), nil).leaf = true -end - -function ban_action(name) - if name == "do_refresh" then - luci.sys.call("/etc/init.d/banip refresh >/dev/null 2>&1") - elseif name == "do_reload" then - luci.sys.call("/etc/init.d/banip reload >/dev/null 2>&1") - end - luci.http.prepare_content("text/plain") - luci.http.write("0") -end - -function status_update() - local rt_file - local content - - rt_file = uci:get("banip", "global", "ban_rtfile") or "/tmp/ban_runtime.json" - - if nixio.fs.access(rt_file) then - content = json.parse(nixio.fs.readfile(rt_file) or "") - http.prepare_content("application/json") - http.write_json(content) - end -end - -function log_view() - local content = util.trim(util.exec("logread -e 'banIP-' 2>/dev/null")) or "" - - if content == "" then - content = "No banIP related logs yet!" - end - http.write(content) -end - -function ipset_view(ipset, filter) - local content - - if not (ipset or filter) then - return - end - - if filter == "false" then - content = util.trim(util.exec("ipset -L " .. ipset .. " 2>/dev/null")) - else - content = util.trim(util.exec("ipset -L " .. ipset .. " 2>/dev/null | grep -e 'packets [1-9]\\|^[A-Z]'")) - end - - if content == "" then - content = "IPSet is empty!" - end - http.write(content) -end - -function ripe_view(query, input) - local content - - if not (query or input) then - return - end - - content = util.trim(util.exec("uclient-fetch --no-check-certificate -O- https://stat.ripe.net/data/" ..query.. "/data.json?resource=" ..input.. " 2>/dev/null")) - - if content == "" then - content = "No response!" - end - http.write(content) + entry({"admin", "services", "banip"}, firstchild(), _("banIP"), 60).acl_depends = { "luci-app-banip" } + entry({"admin", "services", "banip", "overview"}, view("banip/overview"), _("Overview"), 10) + entry({"admin", "services", "banip", "ipsetreport"}, view("banip/ipsetreport"), _("IPSet Report"), 20) + entry({"admin", "services", "banip", "blacklist"}, view("banip/blacklist"), _("Edit Blacklist"), 30) + entry({"admin", "services", "banip", "whitelist"}, view("banip/whitelist"), _("Edit Whitelist"), 40) + entry({"admin", "services", "banip", "maclist"}, view("banip/maclist"), _("Edit Maclist"), 50) + entry({"admin", "services", "banip", "logread"}, view("banip/logread"), _("Log View"), 60) end diff --git a/applications/luci-app-banip/luasrc/model/cbi/banip/blacklist_tab.lua b/applications/luci-app-banip/luasrc/model/cbi/banip/blacklist_tab.lua deleted file mode 100644 index 422182f4f6..0000000000 --- a/applications/luci-app-banip/luasrc/model/cbi/banip/blacklist_tab.lua +++ /dev/null @@ -1,55 +0,0 @@ --- Copyright 2018 Dirk Brenken (dev@brenken.org) --- This is free software, licensed under the Apache License, Version 2.0 - -local fs = require("nixio.fs") -local util = require("luci.util") -local uci = require("luci.model.uci").cursor() -local input = uci:get("banip", "blacklist", "ban_src") or uci:get("banip", "blacklist", "ban_src_6") or "/etc/banip/adblock.blacklist" - -if not fs.access(input) then - m = SimpleForm("error", nil, translate("Input file not found, please check your configuration.")) - m.reset = false - m.submit = false - return m -end - -if fs.stat(input).size >= 102400 then - m = SimpleForm("error", nil, - translate("The file size is too large for online editing in LuCI (≥ 100 KB). ") - .. translate("Please edit this file directly in a terminal session.")) - m.reset = false - m.submit = false - return m -end - -m = SimpleForm("edit", nil) -m:append(Template("banip/banip_css")) -m.submit = translate("Save") -m.reset = false - -s = m:section(SimpleSection, nil, - translatef("This form allows you to modify the content of the banIP blacklist (%s).
", input) - .. translate("Please add only one IPv4 or IPv6 address per line. IP ranges in CIDR notation and comments introduced with '#' are allowed.")) - -f = s:option(TextValue, "data") -f.datatype = "string" -f.rows = 20 -f.rmempty = true - -function f.cfgvalue() - return fs.readfile(input) or "" -end - -function f.write(self, section, data) - return fs.writefile(input, "\n" .. util.trim(data:gsub("\r\n", "\n")) .. "\n") -end - -function f.remove(self, section, value) - return fs.writefile(input, "") -end - -function s.handle(self, state, data) - return true -end - -return m diff --git a/applications/luci-app-banip/luasrc/model/cbi/banip/configuration_tab.lua b/applications/luci-app-banip/luasrc/model/cbi/banip/configuration_tab.lua deleted file mode 100644 index f90b11be01..0000000000 --- a/applications/luci-app-banip/luasrc/model/cbi/banip/configuration_tab.lua +++ /dev/null @@ -1,52 +0,0 @@ --- Copyright 2018 Dirk Brenken (dev@brenken.org) --- This is free software, licensed under the Apache License, Version 2.0 - -local fs = require("nixio.fs") -local util = require("luci.util") -local input = "/etc/config/banip" - -if not fs.access(input) then - m = SimpleForm("error", nil, translate("Input file not found, please check your configuration.")) - m.reset = false - m.submit = false - return m -end - -if fs.stat(input).size >= 102400 then - m = SimpleForm("error", nil, - translate("The file size is too large for online editing in LuCI (≥ 100 KB). ") - .. translate("Please edit this file directly in a terminal session.")) - m.reset = false - m.submit = false - return m -end - -m = SimpleForm("edit", nil) -m:append(Template("banip/banip_css")) -m.submit = translate("Save") -m.reset = false - -s = m:section(SimpleSection, nil, - translate("This form allows you to modify the content of the main banIP configuration file (/etc/config/banip).")) - -f = s:option(TextValue, "data") -f.rows = 20 -f.rmempty = true - -function f.cfgvalue() - return fs.readfile(input) or "" -end - -function f.write(self, section, data) - return fs.writefile(input, "\n" .. util.trim(data:gsub("\r\n", "\n")) .. "\n") -end - -function f.remove(self, section, value) - return fs.writefile(input, "") -end - -function s.handle(self, state, data) - return true -end - -return m diff --git a/applications/luci-app-banip/luasrc/model/cbi/banip/overview_tab.lua b/applications/luci-app-banip/luasrc/model/cbi/banip/overview_tab.lua deleted file mode 100644 index d418ad32af..0000000000 --- a/applications/luci-app-banip/luasrc/model/cbi/banip/overview_tab.lua +++ /dev/null @@ -1,215 +0,0 @@ --- Copyright 2018-2019 Dirk Brenken (dev@brenken.org) --- This is free software, licensed under the Apache License, Version 2.0 - -local fs = require("nixio.fs") -local uci = require("luci.model.uci").cursor() -local net = require "luci.model.network".init() -local util = require("luci.util") -local dump = util.ubus("network.interface", "dump", {}) - -m = Map("banip", translate("banIP"), - translate("Configuration of the banIP package to block ip adresses/subnets via IPSet. ") - ..translatef("For further information " - .. "" - .. "check the online documentation", "https://github.com/openwrt/packages/blob/master/net/banip/files/README.md")) - --- Main banIP Options - -s = m:section(NamedSection, "global", "banip") - -o1 = s:option(Flag, "ban_enabled", translate("Enable banIP")) -o1.default = o1.disabled -o1.rmempty = false - -o2 = s:option(Flag, "ban_automatic", translate("Automatic WAN Interface Detection")) -o2.default = o2.enabled -o2.rmempty = false - -o3 = s:option(MultiValue, "ban_iface", translate("Manual WAN Interface Selection"), - translate("Select your preferred interface(s) manually.")) -if dump then - local i, v - for i, v in ipairs(dump.interface) do - if v.interface ~= "loopback" then - local device = v.l3_device or v.device or "-" - o3:value(v.interface, " " .. v.interface .. " (" .. device .. ") ") - end - end -end -o3:depends("ban_automatic", 0) -o3.widget = "checkbox" -o3.rmempty = true - -o4 = s:option(Flag, "ban_realtime", translate("SSH/LuCI RT Monitor"), - translate("Starts a small log/banIP monitor in the background to block SSH/LuCI brute force attacks in realtime.")) -o4.enabled = "true" -o4.default = o4.disabled -o4.rmempty = false - --- Runtime Information - -ds = s:option(DummyValue, "_dummy") -ds.template = "banip/runtime" - --- Source Table - -bl = m:section(TypedSection, "source", translate("IPSet Sources")) -bl.template = "banip/sourcelist" - -name_4 = bl:option(Flag, "ban_src_on", translate("enable IPv4")) -name_4.rmempty = false - -name_6 = bl:option(Flag, "ban_src_on_6", translate("enable IPv6")) -name_6.rmempty = false - -type = bl:option(ListValue, "ban_src_ruletype", translate("SRC/DST")) -type:value("src") -type:value("dst") -type:value("src+dst") -type.default = "src" -type.rmempty = false - -des = bl:option(DummyValue, "ban_src_desc", translate("Description")) - -cat = bl:option(DynamicList, "ban_src_cat", translate("ASN/Country")) -cat.datatype = "uciname" -cat.optional = true - --- Extra options - -e = m:section(NamedSection, "extra", "banip", translate("Extra Options"), - translate("Options for further tweaking in case the defaults are not suitable for you.")) - -e1 = e:option(Flag, "ban_debug", translate("Verbose Debug Logging"), - translate("Enable verbose debug logging in case of any processing error.")) -e1.rmempty = false - -e2 = e:option(Flag, "ban_nice", translate("Low Priority Service"), - translate("Set the nice level to 'low priority' and banIP background processing will take less resources from the system. ") - ..translate("This change requires a manual service stop/re-start to take effect.")) -e2.disabled = "0" -e2.enabled = "10" -e2.rmempty = false - -e3 = e:option(Value, "ban_backupdir", translate("Backup Directory"), - translate("Target directory for banIP backups. Default is '/tmp', please use preferably a non-volatile disk if available.")) -e3.datatype = "directory" -e3.default = "/tmp" -e3.rmempty = true - -e4 = e:option(Value, "ban_maxqueue", translate("Max. Download Queue"), - translate("Size of the download queue to handle downloads & IPset processing in parallel (default '4'). ") - .. translate("For further performance improvements you can raise this value, e.g. '8' or '16' should be safe.")) -e4.default = 4 -e4.datatype = "range(1,32)" -e4.rmempty = false - -e5 = e:option(ListValue, "ban_sshdaemon", translate("SSH Daemon"), - translate("Select the SSH daemon for logfile parsing, to detect break-in events.")) -e5:value("dropbear") -e5:value("sshd") -e5.default = "dropbear" -e5.rmempty = true - -e6 = e:option(Flag, "ban_autoblacklist", translate("Local Save Blacklist Addons"), - translate("Blacklist auto addons are stored temporary in the IPSet and saved permanently in the local blacklist. Disable this option to prevent the local save.")) -e6.default = e6.enabled -e6.rmempty = true - -e7 = e:option(Flag, "ban_autowhitelist", translate("Local Save Whitelist Addons"), - translate("Whitelist auto addons are stored temporary in the IPSet and saved permanently in the local whitelist. Disable this option to prevent the local save.")) -e7.default = e7.enabled -e7.rmempty = true - --- Optional Extra Options - -e20 = e:option(ListValue, "ban_fetchutil", translate("Download Utility"), - translate("Select your preferred download utility.")) -e20:value("uclient-fetch") -e20:value("wget") -e20:value("curl") -e20:value("aria2c") -e20.optional = true - -e21 = e:option(Value, "ban_fetchparm", translate("Download Options"), - translate("Special options for the selected download utility, e.g. '--timeout=20 -O'.")) -e21.optional = true - -e22 = e:option(Value, "ban_triggerdelay", translate("Trigger Delay"), - translate("Additional trigger delay in seconds before banIP processing begins.")) -e22.default = 2 -e22.datatype = "range(1,60)" -e22.optional = true - -e23 = e:option(ListValue, "ban_starttype", translate("Start Type"), - translate("Select the used start type during boot.")) -e23:value("start") -e23:value("reload") -e23.default = "start" -e23.optional = true - -e30 = e:option(Value, "ban_wan_input_chain", translate("WAN Input Chain IPv4")) -e30.default = "input_wan_rule" -e30.datatype = "uciname" -e30.optional = true - -e31 = e:option(Value, "ban_wan_forward_chain", translate("WAN Forward Chain IPv4")) -e31.default = "forwarding_wan_rule" -e31.datatype = "uciname" -e31.optional = true - -e32 = e:option(Value, "ban_lan_input_chain", translate("LAN Input Chain IPv4")) -e32.default = "input_lan_rule" -e32.datatype = "uciname" -e32.optional = true - -e33 = e:option(Value, "ban_lan_forward_chain", translate("LAN Forward Chain IPv4")) -e33.default = "forwarding_lan_rule" -e33.datatype = "uciname" -e33.optional = true - -e34 = e:option(ListValue, "ban_target_src", translate("SRC Target IPv4")) -e34:value("REJECT") -e34:value("DROP") -e34.default = "DROP" -e34.optional = true - -e35 = e:option(ListValue, "ban_target_dst", translate("DST Target IPv4")) -e35:value("REJECT") -e35:value("DROP") -e35.default = "REJECT" -e35.optional = true - -e36 = e:option(Value, "ban_wan_input_chain_6", translate("WAN Input Chain IPv6")) -e36.default = "input_wan_rule" -e36.datatype = "uciname" -e36.optional = true - -e37 = e:option(Value, "ban_wan_forward_chain_6", translate("WAN Forward Chain IPv6")) -e37.default = "forwarding_wan_rule" -e37.datatype = "uciname" -e37.optional = true - -e38 = e:option(Value, "ban_lan_input_chain_6", translate("LAN Input Chain IPv6")) -e38.default = "input_lan_rule" -e38.datatype = "uciname" -e38.optional = true - -e39 = e:option(Value, "ban_lan_forward_chain_6", translate("LAN Forward Chain IPv6")) -e39.default = "forwarding_lan_rule" -e39.datatype = "uciname" -e39.optional = true - -e40 = e:option(ListValue, "ban_target_src_6", translate("SRC Target IPv6")) -e40:value("REJECT") -e40:value("DROP") -e40.default = "DROP" -e40.optional = true - -e41 = e:option(ListValue, "ban_target_dst_6", translate("DST Target IPv6")) -e41:value("REJECT") -e41:value("DROP") -e41.default = "REJECT" -e41.optional = true - -return m diff --git a/applications/luci-app-banip/luasrc/model/cbi/banip/whitelist_tab.lua b/applications/luci-app-banip/luasrc/model/cbi/banip/whitelist_tab.lua deleted file mode 100644 index c56e40f112..0000000000 --- a/applications/luci-app-banip/luasrc/model/cbi/banip/whitelist_tab.lua +++ /dev/null @@ -1,55 +0,0 @@ --- Copyright 2018 Dirk Brenken (dev@brenken.org) --- This is free software, licensed under the Apache License, Version 2.0 - -local fs = require("nixio.fs") -local util = require("luci.util") -local uci = require("luci.model.uci").cursor() -local input = uci:get("banip", "whitelist", "ban_src") or uci:get("banip", "whitelist", "ban_src_6") or "/etc/banip/adblock.whitelist" - -if not fs.access(input) then - m = SimpleForm("error", nil, translate("Input file not found, please check your configuration.")) - m.reset = false - m.submit = false - return m -end - -if fs.stat(input).size >= 102400 then - m = SimpleForm("error", nil, - translate("The file size is too large for online editing in LuCI (≥ 100 KB). ") - .. translate("Please edit this file directly in a terminal session.")) - m.reset = false - m.submit = false - return m -end - -m = SimpleForm("edit", nil) -m:append(Template("banip/banip_css")) -m.submit = translate("Save") -m.reset = false - -s = m:section(SimpleSection, nil, - translatef("This form allows you to modify the content of the banIP whitelist (%s).
", input) - .. translate("Please add only one IPv4 or IPv6 address per line. IP ranges in CIDR notation and comments introduced with '#' are allowed.")) - -f = s:option(TextValue, "data") -f.datatype = "string" -f.rows = 20 -f.rmempty = true - -function f.cfgvalue() - return fs.readfile(input) or "" -end - -function f.write(self, section, data) - return fs.writefile(input, "\n" .. util.trim(data:gsub("\r\n", "\n")) .. "\n") -end - -function f.remove(self, section, value) - return fs.writefile(input, "") -end - -function s.handle(self, state, data) - return true -end - -return m diff --git a/applications/luci-app-banip/luasrc/view/banip/banip_css.htm b/applications/luci-app-banip/luasrc/view/banip/banip_css.htm deleted file mode 100644 index 2fd4109e90..0000000000 --- a/applications/luci-app-banip/luasrc/view/banip/banip_css.htm +++ /dev/null @@ -1,95 +0,0 @@ - diff --git a/applications/luci-app-banip/luasrc/view/banip/ipsetview.htm b/applications/luci-app-banip/luasrc/view/banip/ipsetview.htm deleted file mode 100644 index 22c1312a8f..0000000000 --- a/applications/luci-app-banip/luasrc/view/banip/ipsetview.htm +++ /dev/null @@ -1,67 +0,0 @@ -<%# -Copyright 2018 Dirk Brenken (dev@brenken.org) -This is free software, licensed under the Apache License, Version 2.0 --%> - -<%- - local util = require("luci.util") - local ipsets = util.split(util.trim(util.exec("ipset -n -L 2>/dev/null | sort")), "\n", nil, true) or {} --%> - -<%+header%> -<%+banip/banip_css%> - - - -
-
-
<%:Check the current available IPSets.%>
-
-
-
-
- - -
-
-
-
- - -
-
-
-
- -
-
-<%+footer%> diff --git a/applications/luci-app-banip/luasrc/view/banip/logview.htm b/applications/luci-app-banip/luasrc/view/banip/logview.htm deleted file mode 100644 index 86f1ea64fa..0000000000 --- a/applications/luci-app-banip/luasrc/view/banip/logview.htm +++ /dev/null @@ -1,36 +0,0 @@ -<%# -Copyright 2018 Dirk Brenken (dev@brenken.org) -This is free software, licensed under the Apache License, Version 2.0 --%> - -<%+header%> -<%+banip/banip_css%> - - - -
-
-
<%:The syslog output, pre-filtered for banIP related messages only.%>
- -
-
- -<%+footer%> diff --git a/applications/luci-app-banip/luasrc/view/banip/ripeview.htm b/applications/luci-app-banip/luasrc/view/banip/ripeview.htm deleted file mode 100644 index 5d26ce95f1..0000000000 --- a/applications/luci-app-banip/luasrc/view/banip/ripeview.htm +++ /dev/null @@ -1,107 +0,0 @@ -<%# -Copyright 2018 Dirk Brenken (dev@brenken.org) -This is free software, licensed under the Apache License, Version 2.0 --%> - -<%+header%> -<%+banip/banip_css%> - - - -
-
-
<%_The RIPEstat Data API is the public data interface provided by RIPE NCC, for details look here.%>
-
-
-
-
- -
-
-
-
- -

- -
-
-
-
- -
-
- -<%+footer%> \ No newline at end of file diff --git a/applications/luci-app-banip/luasrc/view/banip/runtime.htm b/applications/luci-app-banip/luasrc/view/banip/runtime.htm deleted file mode 100644 index f96b23dc80..0000000000 --- a/applications/luci-app-banip/luasrc/view/banip/runtime.htm +++ /dev/null @@ -1,164 +0,0 @@ -<%# -Copyright 2018-2019 Dirk Brenken (dev@brenken.org) -This is free software, licensed under the Apache License, Version 2.0 --%> - -<%+banip/banip_css%> - - -

<%:Runtime Information%>

-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
-
-
- -
- - -
-
-
- -
- - -
-
- diff --git a/applications/luci-app-banip/luasrc/view/banip/sourcelist.htm b/applications/luci-app-banip/luasrc/view/banip/sourcelist.htm deleted file mode 100644 index 12240e5ae4..0000000000 --- a/applications/luci-app-banip/luasrc/view/banip/sourcelist.htm +++ /dev/null @@ -1,47 +0,0 @@ -<%# -Copyright 2018 Dirk Brenken (dev@brenken.org) -This is free software, licensed under the Apache License, Version 2.0 --%> - -<%- -local anonclass = (not self.anonymous or self.sectiontitle) and "named" or "anonymous" --%> - -<%+banip/banip_css%> - -
- <% if self.title then -%> -

<%=self.title%>

- <%- end %> -
<%=self.description%>
-
-
-
- <%- for i, k in pairs(self.children) do -%> -
- <%-=k.title-%> -
- <%- end -%> -
- <%- local section, scope, isempty = true - for i, k in ipairs(self:cfgsections()) do - section = k - local sectionname = striptags((type(self.sectiontitle) == "function") and self:sectiontitle(section) or k) - local sectiontitle = ifattr(sectionname and (not self.anonymous or self.sectiontitle), "data-title", sectionname, true) - isempty = false - scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" } - -%> -
> - <%- - for k, node in ipairs(self.children) do - node:render(section, scope or {}) - end - if not scope.cbid:match("ban_src_cat") then - -%> -
 
- <%- end -%> -
- <%- end -%> -
-
-
-- cgit v1.2.3