diff options
-rwxr-xr-x | contrib/index.cgi | 2 | ||||
-rw-r--r-- | src/ffluci/controller/admin/status.lua | 1 | ||||
-rw-r--r-- | src/ffluci/model/cbi/admin_network/dhcp.lua | 37 | ||||
-rw-r--r-- | src/ffluci/model/cbi/admin_network/firewall.lua | 1 | ||||
-rw-r--r-- | src/ffluci/model/cbi/admin_wifi/networks.lua | 2 | ||||
-rw-r--r-- | src/ffluci/model/menu/00main.lua | 12 | ||||
-rw-r--r-- | src/ffluci/view/admin_status/index.htm | 2 | ||||
-rw-r--r-- | src/ffluci/view/admin_status/system.htm | 2 |
8 files changed, 53 insertions, 6 deletions
diff --git a/contrib/index.cgi b/contrib/index.cgi index 31705ccf2..c9c98b0b2 100755 --- a/contrib/index.cgi +++ b/contrib/index.cgi @@ -1,3 +1,3 @@ #!/usr/bin/haserl --shell=luac print("Status: 302 Found") -print("Location: ffluci\n") +print("Location: ffluci/admin\n") diff --git a/src/ffluci/controller/admin/status.lua b/src/ffluci/controller/admin/status.lua new file mode 100644 index 000000000..bdd51d462 --- /dev/null +++ b/src/ffluci/controller/admin/status.lua @@ -0,0 +1 @@ +module("ffluci.controller.admin.status", package.seeall)
\ No newline at end of file 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 000000000..83ba19641 --- /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 aa56328a0..cf7018e99 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 c7a1b407d..20342ffb0 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 diff --git a/src/ffluci/model/menu/00main.lua b/src/ffluci/model/menu/00main.lua index 0877b8fe6..09c5dbf0d 100644 --- a/src/ffluci/model/menu/00main.lua +++ b/src/ffluci/model/menu/00main.lua @@ -7,7 +7,10 @@ add("admin", "index", "Übersicht", 10) act("contact", "Kontakt") act("luci", "FFLuCI") -add("admin", "system", "System", 20) +add("admin", "status", "Status", 20) +act("system", "System") + +add("admin", "system", "System", 30) act("packages", "Paketverwaltung") act("passwd", "Passwort ändern") act("sshkeys", "SSH-Schlüssel") @@ -15,20 +18,21 @@ act("fstab", "Einhängepunkte") act("upgrade", "Firmwareupgrade") act("reboot", "Neu starten") -add("admin", "services", "Dienste", 30) +add("admin", "services", "Dienste", 40) act("olsrd", "OLSR") act("httpd", "HTTP-Server") act("dropbear", "SSH-Server") act("dnsmasq", "Dnsmasq") -add("admin", "network", "Netzwerk", 40) +add("admin", "network", "Netzwerk", 50) act("vlan", "Switch") act("ifaces", "Schnittstellen") +act("dhcp", "DHCP-Server") act("ptp", "PPPoE / PPTP") act("routes", "Statische Routen") act("portfw", "Portweiterleitung") act("firewall", "Firewall") -add("admin", "wifi", "Drahtlos", 50) +add("admin", "wifi", "Drahtlos", 60) act("devices", "Geräte") act("networks", "Netze")
\ No newline at end of file diff --git a/src/ffluci/view/admin_status/index.htm b/src/ffluci/view/admin_status/index.htm new file mode 100644 index 000000000..75aa02658 --- /dev/null +++ b/src/ffluci/view/admin_status/index.htm @@ -0,0 +1,2 @@ +<%+header%> +<%+footer%>
\ No newline at end of file diff --git a/src/ffluci/view/admin_status/system.htm b/src/ffluci/view/admin_status/system.htm new file mode 100644 index 000000000..75aa02658 --- /dev/null +++ b/src/ffluci/view/admin_status/system.htm @@ -0,0 +1,2 @@ +<%+header%> +<%+footer%>
\ No newline at end of file |