summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-firewall
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-08-21 12:48:50 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-10 15:28:16 +0200
commitb9d378b17d65dd59345c30925459db1dde8ec567 (patch)
tree5c10c6271e420fece99c00320f76d441c6b9dd3a /applications/luci-app-firewall
parent42bc712e2c2f3f5081aebbf13bde51159bf0dab0 (diff)
luci-app-fireall: remove unused templates
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-firewall')
-rw-r--r--applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm90
-rw-r--r--applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm89
-rw-r--r--applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm59
3 files changed, 0 insertions, 238 deletions
diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm
deleted file mode 100644
index 38f36b49c..000000000
--- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm
+++ /dev/null
@@ -1,90 +0,0 @@
-<%-
- local fw = require "luci.model.firewall".init()
- local izl = { }
- local ezl = { }
- local _, z
- for _, z in ipairs(fw:get_zones()) do
- if z:name() ~= "wan" then
- izl[#izl+1] = z
- end
- if z:name() ~= "lan" then
- ezl[#ezl+1] = z
- end
- end
-
- local keys, vals = { }, { }
- luci.sys.net.ipv4_hints(function(ip, name)
- keys[#keys+1] = ip
- vals[#vals+1] = '%s (%s)' %{ ip, name }
- end)
--%>
-
-<h4><%:New port forward%></h4>
-<div class="table">
- <div class="tr table-titles">
- <div class="th"><%:Name%></div>
- <div class="th"><%:Protocol%></div>
- <div class="th"><%:External zone%></div>
- <div class="th"><%:External port%></div>
- <div class="th"><%:Internal zone%></div>
- <div class="th"><%:Internal IP address%></div>
- <div class="th"><%:Internal port%></div>
- <div class="th"></div>
- </div>
- <div class="tr">
- <div class="td">
- <input type="text" class="cbi-input-text" id="_newfwd.name" name="_newfwd.name" placeholder="<%:New port forward%>" />
- </div>
- <div class="td">
- <select class="cbi-input-select" id="_newfwd.proto" name="_newfwd.proto">
- <option value="tcp udp">TCP+UDP</option>
- <option value="tcp">TCP</option>
- <option value="udp">UDP</option>
- <option value="other"><%:Other...%></option>
- </select>
- </div>
- <div class="td">
- <select class="cbi-input-select" id="_newfwd.extzone" name="_newfwd.extzone">
- <% for _, z in ipairs(ezl) do -%><option value="<%=z:name()%>"><%=z:name()%></option><%- end %>
- </select>
- </div>
- <div class="td">
- <input type="text" class="cbi-input-text" id="_newfwd.extport" name="_newfwd.extport" data-type="portrange" data-optional="true" />
- </div>
- <div class="td">
- <select class="cbi-input-select" id="_newfwd.intzone" name="_newfwd.intzone">
- <% for _, z in ipairs(izl) do -%><option value="<%=z:name()%>"><%=z:name()%></option><%- end %>
- </select>
- </div>
- <div class="td">
- <input type="text" class="cbi-input-text" id="_newfwd.intaddr" name="_newfwd.intaddr" data-type="host" data-optional="true"<%=
- ifattr(#keys > 0, "data-choices", {keys, vals})
- %>/>
- </div>
- <div class="td">
- <input type="text" class="cbi-input-text" id="_newfwd.intport" name="_newfwd.intport" data-type="portrange" data-optional="true" />
- </div>
- <div class="td bottom">
- <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" value="<%:Add%>" />
- </div>
- </div>
-</div>
-
-<script type="text/javascript">//<![CDATA[
- document.getElementById('_newfwd.extport').addEventListener('blur',
- function() {
- var n = document.getElementById('_newfwd.name');
- var p = document.getElementById('_newfwd.proto');
- var i = document.getElementById('_newfwd.intport');
-
- if (!this.className.match(/invalid/))
- {
- if (!i.value) i.value = this.value;
-
- if (!n.value)
- {
- n.value = 'Forward' + this.value;
- }
- }
- });
-//]]></script>
diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm
deleted file mode 100644
index e0092a7a5..000000000
--- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm
+++ /dev/null
@@ -1,89 +0,0 @@
-<%
- local fw = require "luci.model.firewall".init()
- local zones = fw:get_zones()
-%>
-
-<% if #zones > 0 then %>
- <h4><%:Open ports on router%></h4>
- <div class="table">
- <div class="tr cbi-section-table-titles">
- <div class="th"><%:Name%></div>
- <div class="th"><%:Protocol%></div>
- <div class="th"><%:External port%></div>
- <div class="th"></div>
- </div>
- <div class="tr">
- <div class="td">
- <input type="text" class="cbi-input-text" id="_newopen.name" name="_newopen.name" placeholder="<%:New input rule%>" />
- </div>
- <div class="td">
- <select class="cbi-input-select" id="_newopen.proto" name="_newopen.proto">
- <option value="tcp udp">TCP+UDP</option>
- <option value="tcp">TCP</option>
- <option value="udp">UDP</option>
- <option value="other"><%:Other...%></option>
- </select>
- </div>
- <div class="td">
- <input type="text" class="cbi-input-text" id="_newopen.extport" name="_newopen.extport" />
- </div>
- <div class="td bottom">
- <input type="submit" class="cbi-button cbi-button-add" name="_newopen.submit" value="<%:Add%>" />
- </div>
- </div>
- </div>
-<% end %>
-<% if #zones > 1 then %>
- <h4><%:New forward rule%></h4>
- <div class="table">
- <div class="tr cbi-section-table-titles">
- <div class="th"><%:Name%></div>
- <div class="th"><%:Source zone%></div>
- <div class="th"><%:Destination zone%></div>
- <div class="th"></div>
- </div>
- <div class="tr">
- <div class="td">
- <input type="text" class="cbi-input-text" id="_newfwd.name" name="_newfwd.name" placeholder="<%:New forward rule%>" />
- </div>
- <div class="td">
- <select class="cbi-input-text" id="_newfwd.src" name="_newfwd.src">
- <% local k, v; for k, v in ipairs(fw:get_zones()) do -%>
- <option<%=ifattr(v:name() == "wan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option>
- <%- end %>
- </select>
- </div>
- <div class="td">
- <select class="cbi-input-text" id="_newfwd.dest" name="_newfwd.dest">
- <% local k, v; for k, v in ipairs(fw:get_zones()) do -%>
- <option<%=ifattr(v:name() == "lan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option>
- <%- end %>
- </select>
- </div>
- <div class="td bottom">
- <input type="submit" class="cbi-button cbi-button-link" name="_newfwd.submit" value="<%:Add and edit...%>" />
- </div>
- </div>
- </div>
-<% else %>
- <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" value="<%:Add%>" />
-<% end %>
-
-<% if #zones > 0 then %>
- <script type="text/javascript">//<![CDATA[
- cbi_validate_field('_newopen.extport', true, 'list(neg(portrange))');
- document.getElementById('_newopen.extport').addEventListener('blur',
- function() {
- var n = document.getElementById('_newopen.name');
- var p = document.getElementById('_newopen.proto');
-
- if (!this.className.match(/invalid/))
- {
- if (!n.value && this.value)
- {
- n.value = 'Open' + this.value;
- }
- }
- });
- //]]></script>
-<% end %>
diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm
deleted file mode 100644
index 0b4774ccc..000000000
--- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm
+++ /dev/null
@@ -1,59 +0,0 @@
-<%
- local fw = require "luci.model.firewall".init()
- local nw = require "luci.model.network".init()
- local zones = fw:get_zones()
-
- local keys, vals, a, k, v = {}, {}
- for k, v in ipairs(nw:get_interfaces()) do
- for k, a in ipairs(v:ipaddrs()) do
- keys[#keys+1] = a:host():string()
- vals[#vals+1] = '%s (%s)' %{ a:host(), v:shortname() }
- end
- end
-%>
-
-<% if #zones > 1 then %>
- <h4><%:New source NAT%></h4>
- <div class="table">
- <div class="tr cbi-section-table-titles">
- <div class="th"><%:Name%></div>
- <div class="th"><%:Source zone%></div>
- <div class="th"><%:Destination zone%></div>
- <div class="th"><%:To source IP%></div>
- <div class="th"><%:To source port%></div>
- <div class="th"></div>
- </div>
- <div class="tr">
- <div class="td">
- <input type="text" class="cbi-input-text" id="_newsnat.name" name="_newsnat.name" placeholder="<%:New SNAT rule%>" />
- </div>
- <div class="td">
- <select class="cbi-input-text" id="_newsnat.src" name="_newsnat.src">
- <% local k, v; for k, v in ipairs(fw:get_zones()) do -%>
- <option<%=ifattr(v:name() == "lan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option>
- <%- end %>
- </select>
- </div>
- <div class="td">
- <select class="cbi-input-text" id="_newsnat.dest" name="_newsnat.dest">
- <% local k, v; for k, v in ipairs(fw:get_zones()) do -%>
- <option<%=ifattr(v:name() == "wan", "selected", "selected")%> value="<%=v:name()%>"><%=v:name()%></option>
- <%- end %>
- </select>
- </div>
- <div class="td">
- <input type="text" class="cbi-input-text" id="_newsnat.dip" name="_newsnat.dip" placeholder="<%:Do not rewrite%>" data-type="ip4addr" data-optional="true"<%=
- ifattr(#keys > 0, "data-choices", { keys, vals })
- %> />
- </div>
- <div class="td">
- <input type="text" class="cbi-input-text" id="_newsnat.dport" name="_newsnat.dport" placeholder="<%:Do not rewrite%>" data-type="portrange" data-optional="true" />
- </div>
- <div class="td bottom">
- <input type="submit" class="cbi-button cbi-button-link" name="_newsnat.submit" value="<%:Add and edit...%>" />
- </div>
- </div>
- </div>
-<% else %>
- <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>" value="<%:Add%>" />
-<% end %>