summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-fw/luasrc/model/cbi
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-07-16 10:08:28 +0000
committerSteven Barth <steven@midlink.org>2008-07-16 10:08:28 +0000
commit429473aed896a8f038d8934c8711a29366a894c5 (patch)
tree958d0b7459f644ee5ffd996acc7f14528292749f /applications/luci-fw/luasrc/model/cbi
parent9b1ef9e2b1a9e318a2840ee4b846f7ca8d82d3bb (diff)
applications/luci-fw: Added support for luci-mini
modules/admin-mini: Added portforwarding page, and UCI changes, apply and revert pages
Diffstat (limited to 'applications/luci-fw/luasrc/model/cbi')
-rw-r--r--applications/luci-fw/luasrc/model/cbi/luci_fw/miniportfw.lua37
1 files changed, 37 insertions, 0 deletions
diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/miniportfw.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/miniportfw.lua
new file mode 100644
index 000000000..39eefa659
--- /dev/null
+++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/miniportfw.lua
@@ -0,0 +1,37 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+require("luci.sys")
+m = Map("luci_fw", translate("fw_portfw"), translate("fw_portfw1"))
+
+
+s = m:section(TypedSection, "portfw", "")
+s:depends("iface", "wan")
+s.defaults.iface = "wan"
+
+s.template = "cbi/tblsection"
+s.addremove = true
+s.anonymous = true
+
+name = s:option(Value, "_name", translate("name") .. translate("cbi_optional"))
+
+proto = s:option(ListValue, "proto", translate("protocol"))
+proto:value("tcp", "TCP")
+proto:value("udp", "UDP")
+proto:value("tcpudp", "TCP + UDP")
+
+dport = s:option(Value, "dport")
+
+to = s:option(Value, "to")
+
+return m