summaryrefslogtreecommitdiffhomepage
path: root/src/ffluci/model/cbi
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-04-10 18:36:34 +0000
committerSteven Barth <steven@midlink.org>2008-04-10 18:36:34 +0000
commitb864e2933ddab6bb40868cd878c9b89f9073ad12 (patch)
treedac1372defc3f2e72cbb3b57cb94d6fc2e71bf5d /src/ffluci/model/cbi
parent338f4598eb9c11efd62d77651673f4b179401868 (diff)
* Added DHCP page
* Prepared Status section * Minor changes
Diffstat (limited to 'src/ffluci/model/cbi')
-rw-r--r--src/ffluci/model/cbi/admin_network/dhcp.lua37
-rw-r--r--src/ffluci/model/cbi/admin_network/firewall.lua1
-rw-r--r--src/ffluci/model/cbi/admin_wifi/networks.lua2
3 files changed, 39 insertions, 1 deletions
diff --git a/src/ffluci/model/cbi/admin_network/dhcp.lua b/src/ffluci/model/cbi/admin_network/dhcp.lua
new file mode 100644
index 0000000000..83ba196418
--- /dev/null
+++ b/src/ffluci/model/cbi/admin_network/dhcp.lua
@@ -0,0 +1,37 @@
+-- ToDo: Translate, Add descriptions and help texts
+require("ffluci.model.uci")
+require("ffluci.sys")
+
+m = Map("dhcp", "DHCP")
+
+s = m:section(TypedSection, "dhcp")
+s.addremove = true
+s.anonymous = true
+
+iface = s:option(ListValue, "interface", "Schnittstelle")
+for k, v in pairs(ffluci.model.uci.show("network").network) do
+ if v[".type"] == "interface" and k ~= "loopback" then
+ iface:value(k)
+ end
+end
+
+s:option(Value, "start", "Start").rmempty = true
+
+s:option(Value, "limit", "Limit").rmempty = true
+
+s:option(Flag, "dynamicdhcp", "Dynamisches DHCP").rmempty = true
+
+s:option(Value, "name", "Name").optional = true
+
+s:option(Flag, "ignore", "Schnittstelle ignorieren").optional = true
+
+s:option(Value, "netmask", "Netzmaske").optional = true
+
+s:option(Flag, "force", "Start erzwingen").optional = true
+
+for i, line in pairs(ffluci.sys.execl("dnsmasq --help dhcp")) do
+ k, v = line:match("([^ ]+) +([^ ]+)")
+ s:option(Value, "dhcp"..k, v).optional = true
+end
+
+return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_network/firewall.lua b/src/ffluci/model/cbi/admin_network/firewall.lua
index aa56328a0b..cf7018e996 100644
--- a/src/ffluci/model/cbi/admin_network/firewall.lua
+++ b/src/ffluci/model/cbi/admin_network/firewall.lua
@@ -3,6 +3,7 @@ m = Map("luci_fw", "Firewall")
s = m:section(TypedSection, "rule")
s.addremove = true
+s.anonymous = true
chain = s:option(ListValue, "chain", "Kette")
chain:value("forward", "Forward")
diff --git a/src/ffluci/model/cbi/admin_wifi/networks.lua b/src/ffluci/model/cbi/admin_wifi/networks.lua
index c7a1b407d4..20342ffb03 100644
--- a/src/ffluci/model/cbi/admin_wifi/networks.lua
+++ b/src/ffluci/model/cbi/admin_wifi/networks.lua
@@ -20,7 +20,7 @@ end
network = s:option(ListValue, "network", "Netzwerk")
network:value("")
for k, v in pairs(ffluci.model.uci.show("network").network) do
- if v[".type"] == "interface" then
+ if v[".type"] == "interface" and k ~= "loopback" then
network:value(k)
end
end