From e50021f77fbc593cee841a02ad66c4bfea072f9e Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Sat, 10 Nov 2018 11:19:50 +0100 Subject: luci-app-banip: new package for details & LuCI screenshots see base package desprition/PR: https://github.com/openwrt/packages/pull/7373 Signed-off-by: Dirk Brenken --- .../luci-app-banip/luasrc/view/banip/banip_css.htm | 91 +++++++++++++++ .../luci-app-banip/luasrc/view/banip/ipsetview.htm | 66 +++++++++++ .../luci-app-banip/luasrc/view/banip/logview.htm | 36 ++++++ .../luci-app-banip/luasrc/view/banip/ripeview.htm | 105 +++++++++++++++++ .../luci-app-banip/luasrc/view/banip/runtime.htm | 130 +++++++++++++++++++++ .../luasrc/view/banip/sourcelist.htm | 47 ++++++++ 6 files changed, 475 insertions(+) create mode 100644 applications/luci-app-banip/luasrc/view/banip/banip_css.htm create mode 100644 applications/luci-app-banip/luasrc/view/banip/ipsetview.htm create mode 100644 applications/luci-app-banip/luasrc/view/banip/logview.htm create mode 100644 applications/luci-app-banip/luasrc/view/banip/ripeview.htm create mode 100644 applications/luci-app-banip/luasrc/view/banip/runtime.htm create mode 100644 applications/luci-app-banip/luasrc/view/banip/sourcelist.htm (limited to 'applications/luci-app-banip/luasrc/view/banip') diff --git a/applications/luci-app-banip/luasrc/view/banip/banip_css.htm b/applications/luci-app-banip/luasrc/view/banip/banip_css.htm new file mode 100644 index 0000000000..807102452c --- /dev/null +++ b/applications/luci-app-banip/luasrc/view/banip/banip_css.htm @@ -0,0 +1,91 @@ + diff --git a/applications/luci-app-banip/luasrc/view/banip/ipsetview.htm b/applications/luci-app-banip/luasrc/view/banip/ipsetview.htm new file mode 100644 index 0000000000..14932ffaef --- /dev/null +++ b/applications/luci-app-banip/luasrc/view/banip/ipsetview.htm @@ -0,0 +1,66 @@ +<%# +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 new file mode 100644 index 0000000000..d298b24de1 --- /dev/null +++ b/applications/luci-app-banip/luasrc/view/banip/logview.htm @@ -0,0 +1,36 @@ +<%# +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 new file mode 100644 index 0000000000..118504fd65 --- /dev/null +++ b/applications/luci-app-banip/luasrc/view/banip/ripeview.htm @@ -0,0 +1,105 @@ +<%# +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 new file mode 100644 index 0000000000..041fcb143c --- /dev/null +++ b/applications/luci-app-banip/luasrc/view/banip/runtime.htm @@ -0,0 +1,130 @@ +<%# +Copyright 2018 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 new file mode 100644 index 0000000000..743886f884 --- /dev/null +++ b/applications/luci-app-banip/luasrc/view/banip/sourcelist.htm @@ -0,0 +1,47 @@ +<%# +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) + 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