diff options
Diffstat (limited to 'modules/admin-core/src')
-rw-r--r-- | modules/admin-core/src/controller/admin/index.lua | 25 | ||||
-rw-r--r-- | modules/admin-core/src/controller/admin/network.lua | 40 | ||||
-rw-r--r-- | modules/admin-core/src/controller/admin/services.lua | 30 | ||||
-rw-r--r-- | modules/admin-core/src/controller/admin/status.lua | 11 | ||||
-rw-r--r-- | modules/admin-core/src/controller/admin/system.lua | 46 | ||||
-rw-r--r-- | modules/admin-core/src/controller/admin/uci.lua | 6 | ||||
-rw-r--r-- | modules/admin-core/src/controller/admin/wifi.lua | 19 | ||||
-rw-r--r-- | modules/admin-core/src/i18n/admin_index.en | 4 | ||||
-rw-r--r-- | modules/admin-core/src/model/cbi/admin_index/luci.lua | 6 | ||||
-rw-r--r-- | modules/admin-core/src/model/menu/00admin.lua | 36 |
10 files changed, 173 insertions, 50 deletions
diff --git a/modules/admin-core/src/controller/admin/index.lua b/modules/admin-core/src/controller/admin/index.lua index b4a7720f8b..89545f1d57 100644 --- a/modules/admin-core/src/controller/admin/index.lua +++ b/modules/admin-core/src/controller/admin/index.lua @@ -1 +1,24 @@ -module("ffluci.controller.admin.index", package.seeall)
\ No newline at end of file +module("ffluci.controller.admin.index", package.seeall) + +function index() + local root = node() + if not root.target then + root.target = alias("admin") + end + + local page = node("admin") + page.target = alias("admin", "index") + page.title = "Administration" + page.order = 10 + + local page = node("admin", "index") + page.target = template("admin_index/index") + page.title = "Übersicht" + page.order = 10 + + local page = node("admin", "index", "luci") + page.target = cbi("admin_index/luci") + page.title = "Oberfläche" + + +end
\ No newline at end of file diff --git a/modules/admin-core/src/controller/admin/network.lua b/modules/admin-core/src/controller/admin/network.lua index 0e3165f085..8f11c28489 100644 --- a/modules/admin-core/src/controller/admin/network.lua +++ b/modules/admin-core/src/controller/admin/network.lua @@ -1 +1,39 @@ -module("ffluci.controller.admin.network", package.seeall)
\ No newline at end of file +module("ffluci.controller.admin.network", package.seeall) + +function index() + local page = node("admin", "network") + page.target = template("admin_network/index") + page.title = "Netzwerk" + page.order = 50 + + local page = node("admin", "network", "vlan") + page.target = cbi("admin_network/vlan") + page.title = "Switch" + page.order = 10 + + local page = node("admin", "network", "ifaces") + page.target = cbi("admin_network/ifaces") + page.title = "Schnittstellen" + page.order = 20 + + local page = node("admin", "network", "dhcp") + page.target = cbi("admin_network/dhcp") + page.title = "DHCP-Server" + page.order = 30 + + local page = node("admin", "network", "ptp") + page.target = cbi("admin_network/ptp") + page.title = "PPPoE / PPTP" + page.order = 40 + + local page = node("admin", "network", "routes") + page.target = cbi("admin_network/routes") + page.title = "Statische Routen" + page.order = 50 + + if ffluci.fs.isfile("/etc/config/qos") then + local page = node("admin", "network", "qos") + page.target = cbi("admin_network/qos") + page.title = "Quality of Service" + end +end
\ No newline at end of file diff --git a/modules/admin-core/src/controller/admin/services.lua b/modules/admin-core/src/controller/admin/services.lua index 42181212bd..cb7c170a06 100644 --- a/modules/admin-core/src/controller/admin/services.lua +++ b/modules/admin-core/src/controller/admin/services.lua @@ -1 +1,29 @@ -module("ffluci.controller.admin.services", package.seeall)
\ No newline at end of file +module("ffluci.controller.admin.services", package.seeall) + +function index() + local page = node("admin", "services") + page.target = template("admin_services/index") + page.title = "Dienste" + page.order = 40 + + local page = node("admin", "services", "httpd") + page.target = cbi("admin_services/httpd") + page.title = "HTTP-Server" + page.order = 10 + + local page = node("admin", "services", "dropbear") + page.target = cbi("admin_services/dropbear") + page.title = "SSH-Server" + page.order = 20 + + local page = node("admin", "services", "dnsmasq") + page.target = cbi("admin_services/dnsmasq") + page.title = "Dnsmasq" + page.order = 30 + + if ffluci.fs.isfile("/etc/config/olsr") then + local page = node("admin", "services", "olsr") + page.target = cbi("admin_services/olsrd") + page.title = "OLSR" + end +end
\ No newline at end of file diff --git a/modules/admin-core/src/controller/admin/status.lua b/modules/admin-core/src/controller/admin/status.lua index fa9fe65bde..1c26257e98 100644 --- a/modules/admin-core/src/controller/admin/status.lua +++ b/modules/admin-core/src/controller/admin/status.lua @@ -1,5 +1,16 @@ module("ffluci.controller.admin.status", package.seeall) +function index() + local page = node("admin", "status") + page.target = template("admin_status/index") + page.title = "Status" + page.order = 20 + + local page = node("admin", "status", "syslog") + page.target = action_syslog + page.title = "Systemprotokoll" +end + function action_syslog() local syslog = ffluci.sys.syslog() ffluci.template.render("admin_status/syslog", {syslog=syslog}) diff --git a/modules/admin-core/src/controller/admin/system.lua b/modules/admin-core/src/controller/admin/system.lua index a612660092..fb108c90ae 100644 --- a/modules/admin-core/src/controller/admin/system.lua +++ b/modules/admin-core/src/controller/admin/system.lua @@ -7,6 +7,52 @@ require("ffluci.fs") require("ffluci.model.ipkg") require("ffluci.model.uci") +function index() + local page = node("admin", "system") + page.target = template("admin_system/index") + page.title = "System" + page.order = 30 + + local page = node("admin", "system", "packages") + page.target = action_packages + page.title = "Paketverwaltung" + page.order = 10 + + local page = node("admin", "system", "packages", "ipkg") + page.target = action_ipkg + page.title = "IPKG-Konfiguration" + + local page = node("admin", "system", "passwd") + page.target = action_passwd + page.title = "Passwort ändern" + page.order = 20 + + local page = node("admin", "system", "sshkeys") + page.target = action_sshkeys + page.title = "SSH-Schlüssel" + page.order = 30 + + local page = node("admin", "system", "hostname") + page.target = cbi("admin_system/hostname") + page.title = "Hostname" + page.order = 40 + + local page = node("admin", "system", "fstab") + page.target = cbi("admin_system/fstab") + page.title = "Einhängepunkte" + page.order = 50 + + local page = node("admin", "system", "upgrade") + page.target = action_upgrade + page.title = "Firmwareupgrade" + page.order = 60 + + local page = node("admin", "system", "reboot") + page.target = action_reboot + page.title = "Neu starten" + page.order = 70 +end + function action_editor() local file = ffluci.http.formvalue("file", "") local data = ffluci.http.formvalue("data") diff --git a/modules/admin-core/src/controller/admin/uci.lua b/modules/admin-core/src/controller/admin/uci.lua index cb4a95ba5c..7443a16b0b 100644 --- a/modules/admin-core/src/controller/admin/uci.lua +++ b/modules/admin-core/src/controller/admin/uci.lua @@ -2,6 +2,12 @@ module("ffluci.controller.admin.uci", package.seeall) require("ffluci.util") require("ffluci.sys") +function index() + node("admin", "uci", "changes").target = template("admin_uci/changes") + node("admin", "uci", "revert").target = action_revert + node("admin", "uci", "apply").target = action_apply +end + -- This function has a higher priority than the admin_uci/apply template function action_apply() local changes = ffluci.model.uci.changes() diff --git a/modules/admin-core/src/controller/admin/wifi.lua b/modules/admin-core/src/controller/admin/wifi.lua index bc1040c715..922366c543 100644 --- a/modules/admin-core/src/controller/admin/wifi.lua +++ b/modules/admin-core/src/controller/admin/wifi.lua @@ -1 +1,18 @@ -module("ffluci.controller.admin.wifi", package.seeall)
\ No newline at end of file +module("ffluci.controller.admin.wifi", package.seeall) + +function index() + local page = node("admin", "wifi") + page.target = template("admin_wifi/index") + page.title = "Drahtlos" + page.order = 60 + + local page = node("admin", "wifi", "devices") + page.target = cbi("admin_wifi/devices") + page.title = "Geräte" + page.order = 10 + + local page = node("admin", "wifi", "networks") + page.target = cbi("admin_wifi/networks") + page.title = "Netze" + page.order = 20 +end
\ No newline at end of file diff --git a/modules/admin-core/src/i18n/admin_index.en b/modules/admin-core/src/i18n/admin_index.en index 6a48775233..e146644113 100644 --- a/modules/admin-core/src/i18n/admin_index.en +++ b/modules/admin-core/src/i18n/admin_index.en @@ -13,10 +13,6 @@ team = "The FFLuCI Team" luci1 = "Here you can customize the settings and the functionality of FFLuCI." language = "Language" general = "General" -catpriv = "Category Privileges" -catpriv1 = [[To secure FFLuCI even further the user and group privileges of -each category can be decreased. Therefore an attacker cannot takeover the whole system -when a security exploit for any publicly available page is found.]] ucicommit = "Post-commit actions" ucicommit1 = [[These commands will be executed automatically when a given UCI configuration is committed allowing changes to be applied instantly.]] diff --git a/modules/admin-core/src/model/cbi/admin_index/luci.lua b/modules/admin-core/src/model/cbi/admin_index/luci.lua index 4f6910eeec..e541d4ec87 100644 --- a/modules/admin-core/src/model/cbi/admin_index/luci.lua +++ b/modules/admin-core/src/model/cbi/admin_index/luci.lua @@ -19,12 +19,6 @@ for k, v in pairs(ffluci.config.themes) do end end -p = m:section(NamedSection, "category_privileges", "core", translate("catpriv", "Kategorieprivilegien"), - translate("catpriv1", [[Zur zusätzlichen Sicherung der Oberfläche gegen Angreifer, können hier die -Ausführungsrechte der Seiten für einzelne Kategorien reduziert werden. So können z.B. Sicherheitslücken im -ungeschützten Bereich der Oberfläche nicht mehr zur Übernahme des Routers genutzt werden.]])) -p.dynamic = true - u = m:section(NamedSection, "uci_oncommit", "event", translate("ucicommit", "UCI-Befehle beim Anwenden"), translate("ucicommit1", [[Beim Anwenden der Konfiguration aus der Oberflächliche heraus können automatisch die relevanten Dienste neugestart werden, diff --git a/modules/admin-core/src/model/menu/00admin.lua b/modules/admin-core/src/model/menu/00admin.lua deleted file mode 100644 index b21e5e338e..0000000000 --- a/modules/admin-core/src/model/menu/00admin.lua +++ /dev/null @@ -1,36 +0,0 @@ -add("admin", "index", "Übersicht", 10) -act("luci", "Oberfläche") - -add("admin", "status", "Status", 20) -act("syslog", "Systemprotokoll") - -add("admin", "system", "System", 30) -act("packages", "Paketverwaltung") -act("passwd", "Passwort ändern") -act("sshkeys", "SSH-Schlüssel") -act("hostname", "Hostname") -act("fstab", "Einhängepunkte") -act("upgrade", "Firmwareupgrade") -act("reboot", "Neu starten") - -add("admin", "services", "Dienste", 40) -if isfile("/etc/config/olsr") then - act("olsrd", "OLSR") -end -act("httpd", "HTTP-Server") -act("dropbear", "SSH-Server") -act("dnsmasq", "Dnsmasq") - -add("admin", "network", "Netzwerk", 50) -act("vlan", "Switch") -act("ifaces", "Schnittstellen") -act("dhcp", "DHCP-Server") -act("ptp", "PPPoE / PPTP") -act("routes", "Statische Routen") -if isfile("/etc/config/qos") then - act("qos", "Quality of Service") -end - -add("admin", "wifi", "Drahtlos", 60) -act("devices", "Geräte") -act("networks", "Netze")
\ No newline at end of file |