From: Jo-Philipp Wich Date: Wed, 5 Feb 2020 15:51:19 +0000 (+0100) Subject: treewide: convert simple Lua controllers to declarative JSON X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=625abbfdbe94dada023ebd8ea69778173d1a7351;p=oweals%2Fluci.git treewide: convert simple Lua controllers to declarative JSON Signed-off-by: Jo-Philipp Wich --- diff --git a/applications/luci-app-attendedsysupgrade/luasrc/controller/attendedsysupgrade.lua b/applications/luci-app-attendedsysupgrade/luasrc/controller/attendedsysupgrade.lua deleted file mode 100644 index 1bd050af6..000000000 --- a/applications/luci-app-attendedsysupgrade/luasrc/controller/attendedsysupgrade.lua +++ /dev/null @@ -1,5 +0,0 @@ -module("luci.controller.attendedsysupgrade", package.seeall) - -function index() - entry({"admin", "system", "attended_sysupgrade"}, template("attendedsysupgrade"), _("Attended Sysupgrade"), 1) -end diff --git a/applications/luci-app-attendedsysupgrade/root/usr/share/luci/menu.d/luci-app-attendedsysupgrade.json b/applications/luci-app-attendedsysupgrade/root/usr/share/luci/menu.d/luci-app-attendedsysupgrade.json new file mode 100644 index 000000000..2cb7cb965 --- /dev/null +++ b/applications/luci-app-attendedsysupgrade/root/usr/share/luci/menu.d/luci-app-attendedsysupgrade.json @@ -0,0 +1,10 @@ +{ + "admin/system/attended_sysupgrade": { + "title": "Attended Sysupgrade", + "order": 1, + "action": { + "type": "template", + "path": "attendedsysupgrade" + } + } +} diff --git a/applications/luci-app-bcp38/luasrc/controller/bcp38.lua b/applications/luci-app-bcp38/luasrc/controller/bcp38.lua deleted file mode 100644 index 7ea22835d..000000000 --- a/applications/luci-app-bcp38/luasrc/controller/bcp38.lua +++ /dev/null @@ -1,7 +0,0 @@ -module("luci.controller.bcp38", package.seeall) - -function index() - entry({"admin", "network", "firewall", "bcp38"}, - cbi("bcp38"), - _("BCP38"), 50).dependent = false -end diff --git a/applications/luci-app-bcp38/root/usr/share/luci/menu.d/luci-app-bcp38.json b/applications/luci-app-bcp38/root/usr/share/luci/menu.d/luci-app-bcp38.json new file mode 100644 index 000000000..f85d69d48 --- /dev/null +++ b/applications/luci-app-bcp38/root/usr/share/luci/menu.d/luci-app-bcp38.json @@ -0,0 +1,11 @@ +{ + "admin/network/firewall/bcp38": { + "title": "BCP38", + "order": 50, + "action": { + "type": "cbi", + "path": "bcp38", + "post": { "cbi.submit": true } + } + } +} diff --git a/applications/luci-app-clamav/luasrc/controller/clamav.lua b/applications/luci-app-clamav/luasrc/controller/clamav.lua deleted file mode 100644 index 02f3bfc4b..000000000 --- a/applications/luci-app-clamav/luasrc/controller/clamav.lua +++ /dev/null @@ -1,22 +0,0 @@ ---[[ - -LuCI ClamAV module - -Copyright (C) 2015, Itus Networks, Inc. - -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 - -Author: Marko Ratkaj - Luka Perkov - -]]-- - -module("luci.controller.clamav", package.seeall) - -function index() - entry({"admin", "services", "clamav"}, cbi("clamav"), _("ClamAV")) -end diff --git a/applications/luci-app-clamav/root/usr/share/luci/menu.d/luci-app-clamav.json b/applications/luci-app-clamav/root/usr/share/luci/menu.d/luci-app-clamav.json new file mode 100644 index 000000000..351701a7f --- /dev/null +++ b/applications/luci-app-clamav/root/usr/share/luci/menu.d/luci-app-clamav.json @@ -0,0 +1,10 @@ +{ + "admin/services/clamav": { + "title": "ClamAV", + "action": { + "type": "cbi", + "path": "clamav", + "post": { "cbi.submit": true } + } + } +} diff --git a/applications/luci-app-coovachilli/luasrc/controller/coovachilli.lua b/applications/luci-app-coovachilli/luasrc/controller/coovachilli.lua deleted file mode 100644 index f962b9bbb..000000000 --- a/applications/luci-app-coovachilli/luasrc/controller/coovachilli.lua +++ /dev/null @@ -1,15 +0,0 @@ --- Copyright 2008 Steven Barth --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.coovachilli", package.seeall) - -function index() - local cc - - cc = entry( { "admin", "services", "coovachilli" }, cbi("coovachilli"), _("CoovaChilli"), 90) - cc.subindex = true - - entry( { "admin", "services", "coovachilli", "network" }, cbi("coovachilli_network"), _("Network Configuration"), 10) - entry( { "admin", "services", "coovachilli", "radius" }, cbi("coovachilli_radius"), _("RADIUS configuration"), 20) - entry( { "admin", "services", "coovachilli", "auth" }, cbi("coovachilli_auth"), _("UAM and MAC Authentication"), 30) -end diff --git a/applications/luci-app-coovachilli/root/usr/share/luci/menu.d/luci-app-coovachilli.json b/applications/luci-app-coovachilli/root/usr/share/luci/menu.d/luci-app-coovachilli.json new file mode 100644 index 000000000..d7da7cad1 --- /dev/null +++ b/applications/luci-app-coovachilli/root/usr/share/luci/menu.d/luci-app-coovachilli.json @@ -0,0 +1,41 @@ +{ + "admin/services/coovachilli": { + "title": "CoovaChilli", + "order": 90, + "action": { + "type": "cbi", + "path": "coovachilli", + "post": { "cbi.submit": true } + } + }, + + "admin/services/coovachilli/network": { + "title": "Network Configuration", + "order": 1, + "action": { + "type": "cbi", + "path": "coovachilli_network", + "post": { "cbi.submit": true } + } + }, + + "admin/services/coovachilli/radius": { + "title": "RADIUS configuration", + "order": 2, + "action": { + "type": "cbi", + "path": "coovachilli_radius", + "post": { "cbi.submit": true } + } + }, + + "admin/services/coovachilli/auth": { + "title": "UAM and MAC Authentication", + "order": 3, + "action": { + "type": "cbi", + "path": "coovachilli_auth", + "post": { "cbi.submit": true } + } + } +} diff --git a/applications/luci-app-dcwapd/luasrc/controller/dcwapd.lua b/applications/luci-app-dcwapd/luasrc/controller/dcwapd.lua deleted file mode 100644 index f13c42200..000000000 --- a/applications/luci-app-dcwapd/luasrc/controller/dcwapd.lua +++ /dev/null @@ -1,13 +0,0 @@ --- Copyright 2019 EWSI --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.dcwapd", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/dcwapd") then - return - end - local page - page = entry({"admin", "network", "dcwapd"}, cbi("dcwapd/dcwapd"), _("Dual Channel WiFi")) - page.dependent = true -end diff --git a/applications/luci-app-dcwapd/root/usr/share/luci/menu.d/luci-app-dcwapd.json b/applications/luci-app-dcwapd/root/usr/share/luci/menu.d/luci-app-dcwapd.json new file mode 100644 index 000000000..30ed4c5d9 --- /dev/null +++ b/applications/luci-app-dcwapd/root/usr/share/luci/menu.d/luci-app-dcwapd.json @@ -0,0 +1,13 @@ +{ + "admin/network/dcwapd": { + "title": "Dual Channel WiFi", + "action": { + "type": "cbi", + "path": "dcwapd/dcwapd", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "dcwapd": true } + } + } +} diff --git a/applications/luci-app-ddns/luasrc/controller/ddns.lua b/applications/luci-app-ddns/luasrc/controller/ddns.lua deleted file mode 100755 index 247edef32..000000000 --- a/applications/luci-app-ddns/luasrc/controller/ddns.lua +++ /dev/null @@ -1,11 +0,0 @@ --- Copyright 2008 Steven Barth --- Copyright 2008 Jo-Philipp Wich --- Copyright 2013 Manuel Munz --- Copyright 2014-2018 Christian Schoenebeck --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.ddns", package.seeall) - -function index() - entry( {"admin", "services", "ddns"}, view("ddns/overview"), _("Dynamic DNS"), 59) -end diff --git a/applications/luci-app-ddns/root/usr/share/luci/menu.d/luci-app-ddns.json b/applications/luci-app-ddns/root/usr/share/luci/menu.d/luci-app-ddns.json new file mode 100644 index 000000000..ec6d46f8b --- /dev/null +++ b/applications/luci-app-ddns/root/usr/share/luci/menu.d/luci-app-ddns.json @@ -0,0 +1,10 @@ +{ + "admin/services/ddns": { + "title": "Dynamic DNS", + "order": 59, + "action": { + "type": "view", + "path": "ddns/overview" + } + } +} diff --git a/applications/luci-app-diag-core/luasrc/controller/luci_diag.lua b/applications/luci-app-diag-core/luasrc/controller/luci_diag.lua deleted file mode 100644 index b662d7fb3..000000000 --- a/applications/luci-app-diag-core/luasrc/controller/luci_diag.lua +++ /dev/null @@ -1,16 +0,0 @@ --- Copyright 2009 Daniel Dickinson --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.luci_diag", package.seeall) - -function index() - local e - - e = entry({"admin", "network", "diag_config"}, template("diag/network_config_index") , _("Configure Diagnostics"), 120) - e.index = true - e.dependent = true - - e = entry({"mini", "diag"}, template("diag/index"), _("Diagnostics"), 120) - e.index = true - e.dependent = true -end diff --git a/applications/luci-app-diag-core/root/usr/share/luci/menu.d/luci-app-diag-core.json b/applications/luci-app-diag-core/root/usr/share/luci/menu.d/luci-app-diag-core.json new file mode 100644 index 000000000..2fe2a267f --- /dev/null +++ b/applications/luci-app-diag-core/root/usr/share/luci/menu.d/luci-app-diag-core.json @@ -0,0 +1,10 @@ +{ + "admin/network/diag_config": { + "title": "Configure Diagnostics", + "order": 120, + "action": { + "type": "template", + "path": "diag/network_config_index" + } + } +} diff --git a/applications/luci-app-dump1090/luasrc/controller/dump1090.lua b/applications/luci-app-dump1090/luasrc/controller/dump1090.lua deleted file mode 100644 index bc2b36dc3..000000000 --- a/applications/luci-app-dump1090/luasrc/controller/dump1090.lua +++ /dev/null @@ -1,14 +0,0 @@ --- Copyright 2014 Álvaro Fernández Rojas --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.dump1090", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/dump1090") then - return - end - - local page = entry({"admin", "services", "dump1090"}, cbi("dump1090"), _("dump1090")) - page.dependent = true - -end diff --git a/applications/luci-app-dump1090/root/usr/share/luci/menu.d/luci-app-dump1090.json b/applications/luci-app-dump1090/root/usr/share/luci/menu.d/luci-app-dump1090.json new file mode 100644 index 000000000..4e68dde1c --- /dev/null +++ b/applications/luci-app-dump1090/root/usr/share/luci/menu.d/luci-app-dump1090.json @@ -0,0 +1,13 @@ +{ + "admin/services/dump1090": { + "title": "dump1090", + "action": { + "type": "cbi", + "path": "dump1090", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "dump1090": true } + } + } +} diff --git a/applications/luci-app-dynapoint/luasrc/controller/dynapoint.lua b/applications/luci-app-dynapoint/luasrc/controller/dynapoint.lua deleted file mode 100644 index 65348632e..000000000 --- a/applications/luci-app-dynapoint/luasrc/controller/dynapoint.lua +++ /dev/null @@ -1,9 +0,0 @@ -module("luci.controller.dynapoint", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/dynapoint") then - return - end - entry({"admin", "services", "dynapoint"}, cbi("dynapoint"), _("DynaPoint")) -end - diff --git a/applications/luci-app-dynapoint/root/usr/share/luci/menu.d/luci-app-dynapoint.json b/applications/luci-app-dynapoint/root/usr/share/luci/menu.d/luci-app-dynapoint.json new file mode 100644 index 000000000..ed19ba682 --- /dev/null +++ b/applications/luci-app-dynapoint/root/usr/share/luci/menu.d/luci-app-dynapoint.json @@ -0,0 +1,13 @@ +{ + "admin/services/dynapoint": { + "title": "DynaPoint", + "action": { + "type": "cbi", + "path": "dynapoint", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "dynapoint": true } + } + } +} diff --git a/applications/luci-app-fwknopd/luasrc/controller/fwknopd.lua b/applications/luci-app-fwknopd/luasrc/controller/fwknopd.lua deleted file mode 100644 index 069a77ea3..000000000 --- a/applications/luci-app-fwknopd/luasrc/controller/fwknopd.lua +++ /dev/null @@ -1,15 +0,0 @@ --- Copyright 2015 Jonathan Bennett --- Licensed to the public under the GNU General Public License v2. - -module("luci.controller.fwknopd", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/fwknopd") then - return - end - - local page - - page = entry({"admin", "services", "fwknopd"}, cbi("fwknopd"), _("Firewall Knock Daemon")) - page.dependent = true -end diff --git a/applications/luci-app-fwknopd/root/usr/share/luci/menu.d/luci-app-fwknopd.json b/applications/luci-app-fwknopd/root/usr/share/luci/menu.d/luci-app-fwknopd.json new file mode 100644 index 000000000..6dd26b9ac --- /dev/null +++ b/applications/luci-app-fwknopd/root/usr/share/luci/menu.d/luci-app-fwknopd.json @@ -0,0 +1,13 @@ +{ + "admin/services/fwknopd": { + "title": "Firewall Knock Daemon", + "action": { + "type": "cbi", + "path": "fwknopd", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "fwknopd": true } + } + } +} diff --git a/applications/luci-app-hd-idle/luasrc/controller/hd_idle.lua b/applications/luci-app-hd-idle/luasrc/controller/hd_idle.lua deleted file mode 100644 index 9a981acac..000000000 --- a/applications/luci-app-hd-idle/luasrc/controller/hd_idle.lua +++ /dev/null @@ -1,15 +0,0 @@ --- Copyright 2008 Yanira --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.hd_idle", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/hd-idle") then - return - end - - local page - - page = entry({"admin", "services", "hd_idle"}, cbi("hd_idle"), _("HDD Idle"), 60) - page.dependent = true -end diff --git a/applications/luci-app-hd-idle/root/usr/share/luci/menu.d/luci-app-hd-idle.json b/applications/luci-app-hd-idle/root/usr/share/luci/menu.d/luci-app-hd-idle.json new file mode 100644 index 000000000..5e6961fab --- /dev/null +++ b/applications/luci-app-hd-idle/root/usr/share/luci/menu.d/luci-app-hd-idle.json @@ -0,0 +1,14 @@ +{ + "admin/services/hd_idle": { + "title": "HDD Idle", + "order": 60, + "action": { + "type": "cbi", + "path": "hd_idle", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "hd_idle": true } + } + } +} diff --git a/applications/luci-app-ksmbd/luasrc/controller/ksmbd.lua b/applications/luci-app-ksmbd/luasrc/controller/ksmbd.lua deleted file mode 100644 index a3301d484..000000000 --- a/applications/luci-app-ksmbd/luasrc/controller/ksmbd.lua +++ /dev/null @@ -1,11 +0,0 @@ --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.ksmbd", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/ksmbd") then - return - end - - entry({"admin", "services", "ksmbd"}, view("ksmbd"), _("Network Shares")).dependent = true -end diff --git a/applications/luci-app-ksmbd/root/usr/share/luci/menu.d/luci-app-ksmbd.json b/applications/luci-app-ksmbd/root/usr/share/luci/menu.d/luci-app-ksmbd.json new file mode 100644 index 000000000..46202c22e --- /dev/null +++ b/applications/luci-app-ksmbd/root/usr/share/luci/menu.d/luci-app-ksmbd.json @@ -0,0 +1,12 @@ +{ + "admin/services/ksmbd": { + "title": "Network Shares", + "action": { + "type": "view", + "path": "ksmbd" + }, + "depends": { + "uci": { "ksmbd": true } + } + } +} diff --git a/applications/luci-app-mjpg-streamer/luasrc/controller/mjpg-streamer.lua b/applications/luci-app-mjpg-streamer/luasrc/controller/mjpg-streamer.lua deleted file mode 100644 index c5cf6ec2f..000000000 --- a/applications/luci-app-mjpg-streamer/luasrc/controller/mjpg-streamer.lua +++ /dev/null @@ -1,16 +0,0 @@ --- Copyright 2014 Roger D --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.mjpg-streamer", package.seeall) - -function index() - require("luci.i18n") - if not nixio.fs.access("/etc/config/mjpg-streamer") then - return - end - - local page = entry({"admin", "services", "mjpg-streamer"}, cbi("mjpg-streamer"), _("MJPG-streamer")) - page.i18n = "mjpg-streamer" - page.dependent = true - -end diff --git a/applications/luci-app-mjpg-streamer/root/usr/share/luci/menu.d/luci-app-mjpg-streamer.json b/applications/luci-app-mjpg-streamer/root/usr/share/luci/menu.d/luci-app-mjpg-streamer.json new file mode 100644 index 000000000..1e7c5e80d --- /dev/null +++ b/applications/luci-app-mjpg-streamer/root/usr/share/luci/menu.d/luci-app-mjpg-streamer.json @@ -0,0 +1,13 @@ +{ + "admin/services/mjpg-streamer": { + "title": "MJPG-streamer", + "action": { + "type": "cbi", + "path": "mjpg-streamer", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "mjpg-streamer": true } + } + } +} diff --git a/applications/luci-app-mosquitto/luasrc/controller/mosquitto.lua b/applications/luci-app-mosquitto/luasrc/controller/mosquitto.lua deleted file mode 100644 index 587054eb1..000000000 --- a/applications/luci-app-mosquitto/luasrc/controller/mosquitto.lua +++ /dev/null @@ -1,16 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface for mosquitto - -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 - -]]-- - -module("luci.controller.mosquitto", package.seeall) - -function index() - entry({"admin", "services", "mosquitto"}, cbi("mosquitto"), _("Mosquitto")) -end diff --git a/applications/luci-app-mosquitto/root/usr/share/luci/menu.d/luci-app-mosquitto.json b/applications/luci-app-mosquitto/root/usr/share/luci/menu.d/luci-app-mosquitto.json new file mode 100644 index 000000000..37870b379 --- /dev/null +++ b/applications/luci-app-mosquitto/root/usr/share/luci/menu.d/luci-app-mosquitto.json @@ -0,0 +1,10 @@ +{ + "admin/services/mosquitto": { + "title": "Mosquitto", + "action": { + "type": "cbi", + "path": "mosquitto", + "post": { "cbi.submit": true } + } + } +} diff --git a/applications/luci-app-nextdns/luasrc/controller/nextdns.lua b/applications/luci-app-nextdns/luasrc/controller/nextdns.lua deleted file mode 100644 index bfa4887b0..000000000 --- a/applications/luci-app-nextdns/luasrc/controller/nextdns.lua +++ /dev/null @@ -1,14 +0,0 @@ --- Copyright 2019 Olivier Poitrey (rs@nextdns.io) --- This is free software, licensed under the Apache License, Version 2.0 - -module("luci.controller.nextdns", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/nextdns") then - return - end - - entry({"admin", "services", "nextdns"}, firstchild(), _("NextDNS"), 60).dependent = false - entry({"admin", "services", "nextdns", "overview"}, view("nextdns/overview"), _("Overview"), 10).leaf = true - entry({"admin", "services", "nextdns", "log"}, view("nextdns/logread"), _("Logs"), 30).leaf = true -end diff --git a/applications/luci-app-nextdns/root/usr/share/luci/menu.d/luci-app-nextdns.json b/applications/luci-app-nextdns/root/usr/share/luci/menu.d/luci-app-nextdns.json new file mode 100644 index 000000000..18255ced9 --- /dev/null +++ b/applications/luci-app-nextdns/root/usr/share/luci/menu.d/luci-app-nextdns.json @@ -0,0 +1,30 @@ +{ + "admin/services/nextdns": { + "title": "NextDNS", + "order": 60, + "action": { + "type": "firstchild" + }, + "depends": { + "uci": { "nextdns": true } + } + }, + + "admin/services/nextdns/overview": { + "title": "Overview", + "order": 1, + "action": { + "type": "view", + "path": "nextdns/overview" + } + }, + + "admin/services/nextdns/log": { + "title": "Configuration", + "order": 2, + "action": { + "type": "view", + "path": "nextdns/logread" + } + } +} diff --git a/applications/luci-app-noddos/luasrc/controller/noddos.lua b/applications/luci-app-noddos/luasrc/controller/noddos.lua deleted file mode 100644 index c45e24bc9..000000000 --- a/applications/luci-app-noddos/luasrc/controller/noddos.lua +++ /dev/null @@ -1,10 +0,0 @@ --- Copyright 2017 Steven Hessing (steven.hessing@gmail.com) --- This is free software, licensed under the GNU General Public License v3. --- /usr/lib/lua/luci/controller/noddos.lua - -module("luci.controller.noddos", package.seeall) -function index() - entry({"admin", "status", "noddos"}, template("noddos/clients"), _("Noddos Clients"), 3) - entry({"admin", "network", "noddos"}, cbi("noddos"), _("Noddos Client Tracking"), 55) -end - diff --git a/applications/luci-app-noddos/root/usr/share/luci/menu.d/luci-app-noddos.json b/applications/luci-app-noddos/root/usr/share/luci/menu.d/luci-app-noddos.json new file mode 100644 index 000000000..05052f5e0 --- /dev/null +++ b/applications/luci-app-noddos/root/usr/share/luci/menu.d/luci-app-noddos.json @@ -0,0 +1,20 @@ +{ + "admin/status/noddos": { + "title": "Noddos Clients", + "order": 3, + "action": { + "type": "template", + "path": "noddos/clients" + } + }, + + "admin/network/noddos": { + "title": "Noddos Client Tracking", + "order": 55, + "action": { + "type": "cbi", + "path": "noddos", + "post": { "cbi.submit": true } + } + } +} diff --git a/applications/luci-app-ntpc/luasrc/controller/ntpc.lua b/applications/luci-app-ntpc/luasrc/controller/ntpc.lua deleted file mode 100644 index c21d4eaa7..000000000 --- a/applications/luci-app-ntpc/luasrc/controller/ntpc.lua +++ /dev/null @@ -1,19 +0,0 @@ --- Copyright 2008 Steven Barth --- Copyright 2008 Jo-Philipp Wich --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.ntpc", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/ntpclient") then - return - end - - local page - - page = entry({"admin", "system", "ntpc"}, cbi("ntpc/ntpc"), _("Time Synchronisation"), 50) - page.dependent = true - - page = entry({"mini", "system", "ntpc"}, cbi("ntpc/ntpcmini", {autoapply=true}), _("Time Synchronisation"), 50) - page.dependent = true -end diff --git a/applications/luci-app-ntpc/root/usr/share/luci/menu.d/luci-app-ntpc.json b/applications/luci-app-ntpc/root/usr/share/luci/menu.d/luci-app-ntpc.json new file mode 100644 index 000000000..360d72159 --- /dev/null +++ b/applications/luci-app-ntpc/root/usr/share/luci/menu.d/luci-app-ntpc.json @@ -0,0 +1,14 @@ +{ + "admin/system/ntpc": { + "title": "Time Synchronisation", + "order": 50, + "action": { + "type": "cbi", + "path": "ntpc/ntpc", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "ntpclient": true } + } + } +} diff --git a/applications/luci-app-nut/luasrc/controller/nut.lua b/applications/luci-app-nut/luasrc/controller/nut.lua deleted file mode 100644 index 5598451d6..000000000 --- a/applications/luci-app-nut/luasrc/controller/nut.lua +++ /dev/null @@ -1,25 +0,0 @@ --- Copyright 2015 Daniel Dickinson --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.nut", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/nut_server") and not nixio.fs.access("/etc/config/nut_monitor") and not nixio.fs.access("/etc/config/nut_cgi") then - return - end - - entry({"admin", "services", "nut"}, firstchild(), _("Network UPS Tools")) - - if nixio.fs.access("/etc/config/nut_server") then - entry({"admin", "services", "nut", "server"}, cbi("nut_server"), _("Network UPS Tools (Server)"), 20) - end - - if nixio.fs.access("/etc/config/nut_monitor") then - entry({"admin", "services", "nut", "monitor"}, cbi("nut_monitor"), _("Network UPS Tools (Monitor)"), 30) - end - - if nixio.fs.access("/etc/config/nut_cgi") then - entry({"admin", "services", "nut", "cgi"}, cbi("nut_cgi"), _("Network UPS Tools (CGI)"), 40) - end -end - diff --git a/applications/luci-app-nut/root/usr/share/luci/menu.d/luci-app-nut.json b/applications/luci-app-nut/root/usr/share/luci/menu.d/luci-app-nut.json new file mode 100644 index 000000000..f2cd6e785 --- /dev/null +++ b/applications/luci-app-nut/root/usr/share/luci/menu.d/luci-app-nut.json @@ -0,0 +1,54 @@ +{ + "admin/services/nut": { + "title": "Network UPS Tools", + "action": { + "type": "firstchild" + }, + "depends": { + "uci": [ + { "nut_server": true }, + { "nut_monitor": true }, + { "nut_cgi": true } + ] + } + }, + + "admin/services/nut/server": { + "title": "Network UPS Tools (Server)", + "order": 1, + "action": { + "type": "cbi", + "path": "nut_server", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "nut_server": true } + } + }, + + "admin/services/nut/monitor": { + "title": "Network UPS Tools (Monitor)", + "order": 2, + "action": { + "type": "cbi", + "path": "nut_monitor", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "nut_monitor": true } + } + }, + + "admin/services/nut/cgi": { + "title": "Network UPS Tools (CGI)", + "order": 3, + "action": { + "type": "cbi", + "path": "nut_cgi", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "nut_cgi": true } + } + } +} diff --git a/applications/luci-app-olsr-viz/luasrc/controller/olsr-viz.lua b/applications/luci-app-olsr-viz/luasrc/controller/olsr-viz.lua deleted file mode 100644 index 672486c53..000000000 --- a/applications/luci-app-olsr-viz/luasrc/controller/olsr-viz.lua +++ /dev/null @@ -1,5 +0,0 @@ -module "luci.controller.olsr-viz" - -function index() - entry({"admin", "status", "olsr", "olsr-viz"}, template("olsr-viz/olsr-viz"), _("OLSR-Viz"), 90) -end diff --git a/applications/luci-app-olsr-viz/root/usr/share/luci/menu.d/luci-app-olsr-viz.json b/applications/luci-app-olsr-viz/root/usr/share/luci/menu.d/luci-app-olsr-viz.json new file mode 100644 index 000000000..02cfd6b64 --- /dev/null +++ b/applications/luci-app-olsr-viz/root/usr/share/luci/menu.d/luci-app-olsr-viz.json @@ -0,0 +1,10 @@ +{ + "admin/status/olsr/olsr-viz": { + "title": "OLSR-Viz", + "order": 90, + "action": { + "type": "template", + "path": "olsr-viz/olsr-viz" + } + } +} diff --git a/applications/luci-app-omcproxy/luasrc/controller/omcproxy.lua b/applications/luci-app-omcproxy/luasrc/controller/omcproxy.lua deleted file mode 100644 index 6842a2097..000000000 --- a/applications/luci-app-omcproxy/luasrc/controller/omcproxy.lua +++ /dev/null @@ -1,13 +0,0 @@ --- Copyright 2019 Shun Li --- This is free software, licensed under the Apache License, Version 2.0 - -module("luci.controller.omcproxy", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/omcproxy") then - return - end - - entry({"admin", "services", "omcproxy"}, view("omcproxy"), _("omcproxy")).dependent = true - -end \ No newline at end of file diff --git a/applications/luci-app-omcproxy/root/usr/share/luci/menu.d/luci-app-omcproxy.json b/applications/luci-app-omcproxy/root/usr/share/luci/menu.d/luci-app-omcproxy.json new file mode 100644 index 000000000..1eb7aaa75 --- /dev/null +++ b/applications/luci-app-omcproxy/root/usr/share/luci/menu.d/luci-app-omcproxy.json @@ -0,0 +1,12 @@ +{ + "admin/services/omcproxy": { + "title": "omcproxy", + "action": { + "type": "view", + "path": "omcproxy" + }, + "depends": { + "uci": { "omcproxy": true } + } + } +} diff --git a/applications/luci-app-p910nd/luasrc/controller/p910nd.lua b/applications/luci-app-p910nd/luasrc/controller/p910nd.lua deleted file mode 100644 index df47e9fd9..000000000 --- a/applications/luci-app-p910nd/luasrc/controller/p910nd.lua +++ /dev/null @@ -1,15 +0,0 @@ --- Copyright 2008 Yanira --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.p910nd", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/p910nd") then - return - end - - local page - - page = entry({"admin", "services", "p910nd"}, cbi("p910nd"), _("p910nd - Printer server"), 60) - page.dependent = true -end diff --git a/applications/luci-app-p910nd/root/usr/share/luci/menu.d/luci-app-p910nd.json b/applications/luci-app-p910nd/root/usr/share/luci/menu.d/luci-app-p910nd.json new file mode 100644 index 000000000..33fcda6e4 --- /dev/null +++ b/applications/luci-app-p910nd/root/usr/share/luci/menu.d/luci-app-p910nd.json @@ -0,0 +1,14 @@ +{ + "admin/services/p910nd": { + "title": "p910nd - Printer server", + "order": 60, + "action": { + "type": "cbi", + "path": "p910nd", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "p910nd": true } + } + } +} diff --git a/applications/luci-app-pagekitec/luasrc/controller/pagekitec.lua b/applications/luci-app-pagekitec/luasrc/controller/pagekitec.lua deleted file mode 100644 index 938356be6..000000000 --- a/applications/luci-app-pagekitec/luasrc/controller/pagekitec.lua +++ /dev/null @@ -1,8 +0,0 @@ --- Copyright 2018 Karl Palsson --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.pagekitec", package.seeall) - -function index() - entry({"admin", "services", "pagekitec"}, cbi("pagekitec"), _("PageKite")) -end diff --git a/applications/luci-app-pagekitec/root/usr/share/luci/menu.d/luci-app-pagekitec.json b/applications/luci-app-pagekitec/root/usr/share/luci/menu.d/luci-app-pagekitec.json new file mode 100644 index 000000000..54af904c5 --- /dev/null +++ b/applications/luci-app-pagekitec/root/usr/share/luci/menu.d/luci-app-pagekitec.json @@ -0,0 +1,10 @@ +{ + "admin/services/pagekitec": { + "title": "PageKite", + "action": { + "type": "cbi", + "path": "pagekitec", + "post": { "cbi.submit": true } + } + } +} diff --git a/applications/luci-app-polipo/luasrc/controller/polipo.lua b/applications/luci-app-polipo/luasrc/controller/polipo.lua deleted file mode 100644 index b3ae38980..000000000 --- a/applications/luci-app-polipo/luasrc/controller/polipo.lua +++ /dev/null @@ -1,15 +0,0 @@ --- Copyright 2008 Aleksandar Krsteski --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.polipo", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/polipo") then - return - end - - entry({"admin", "services", "polipo"}, alias("admin", "services", "polipo", "config"), _("Polipo")) - entry({"admin", "services", "polipo", "status"}, template("polipo_status"), _("Status")) - entry({"admin", "services", "polipo", "config"}, cbi("polipo"), _("Configuration")) -end - diff --git a/applications/luci-app-polipo/root/usr/share/luci/menu.d/luci-app-polipo.json b/applications/luci-app-polipo/root/usr/share/luci/menu.d/luci-app-polipo.json new file mode 100644 index 000000000..6fea92d28 --- /dev/null +++ b/applications/luci-app-polipo/root/usr/share/luci/menu.d/luci-app-polipo.json @@ -0,0 +1,31 @@ +{ + "admin/services/polipo": { + "title": "Polipo", + "action": { + "type": "alias", + "path": "admin/services/polipo/config" + }, + "depends": { + "uci": { "polipo": true } + } + }, + + "admin/services/polipo/status": { + "title": "Status", + "order": 1, + "action": { + "type": "template", + "path": "polipo_status" + } + }, + + "admin/services/polipo/config": { + "title": "Configuration", + "order": 2, + "action": { + "type": "cbi", + "path": "polipo", + "post": { "cbi.submit": true } + } + } +} diff --git a/applications/luci-app-qos/luasrc/controller/qos.lua b/applications/luci-app-qos/luasrc/controller/qos.lua deleted file mode 100644 index 250a0392f..000000000 --- a/applications/luci-app-qos/luasrc/controller/qos.lua +++ /dev/null @@ -1,15 +0,0 @@ --- Copyright 2008 Steven Barth --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.qos", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/qos") then - return - end - - local page - - page = entry({"admin", "network", "qos"}, cbi("qos/qos"), _("QoS")) - page.dependent = true -end diff --git a/applications/luci-app-qos/root/usr/share/luci/menu.d/luci-app-qos.json b/applications/luci-app-qos/root/usr/share/luci/menu.d/luci-app-qos.json new file mode 100644 index 000000000..90ce20de0 --- /dev/null +++ b/applications/luci-app-qos/root/usr/share/luci/menu.d/luci-app-qos.json @@ -0,0 +1,13 @@ +{ + "admin/network/qos": { + "title": "QoS", + "action": { + "type": "cbi", + "path": "qos/qos", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "qos": true } + } + } +} diff --git a/applications/luci-app-rosy-file-server/luasrc/controller/rosy-file-server/rosy-file-server.lua b/applications/luci-app-rosy-file-server/luasrc/controller/rosy-file-server/rosy-file-server.lua deleted file mode 100644 index dd5598a68..000000000 --- a/applications/luci-app-rosy-file-server/luasrc/controller/rosy-file-server/rosy-file-server.lua +++ /dev/null @@ -1,37 +0,0 @@ --- Copyright 2018 Rosy Song --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.rosy-file-server.rosy-file-server", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/rosyfs") then - return - end - - local root = node() - if not root.target then - root.target = alias("httpfs") - root.index = true - end - - page = node() - page.lock = true - page.target = alias("httpfs") - page.subindex = true - page.index = false - - page = node("httpfs") - page.title = _("Rosy File Server") - page.target = alias("httpfs", "rosy-file-server") - page.order = 5 - page.setuser = "root" - page.setgroup = "root" - page.index = true - - entry({"httpfs", "rosy-file-server"}, - form("rosy-file-server/rosy-file-server"), _("Rosy File Server"), 10) - - entry({"admin", "services", "rosyfs"}, - cbi("rosy-file-server/rosyfs"), _("Rosy File Server"), 61) -end - diff --git a/applications/luci-app-rosy-file-server/root/usr/share/luci/menu.d/luci-app-rosy-file-server.json b/applications/luci-app-rosy-file-server/root/usr/share/luci/menu.d/luci-app-rosy-file-server.json new file mode 100644 index 000000000..03e7fd0f4 --- /dev/null +++ b/applications/luci-app-rosy-file-server/root/usr/share/luci/menu.d/luci-app-rosy-file-server.json @@ -0,0 +1,34 @@ +{ + "httpfs": { + "title": "Rosy File Server", + "order": 5, + "setuser": "root", + "setgroup": "root", + "action": { + "type": "firstchild" + }, + "depends": { + "uci": { "rosyfs": true } + } + }, + + "httpfs/rosy-file-server": { + "title": "Rosy File Server", + "order": 1, + "action": { + "type": "form", + "path": "rosy-file-server/rosy-file-server", + "post": { "cbi.submit": true } + } + }, + + "admin/services/rosyfs": { + "title": "Rosy File Server", + "order": 61, + "action": { + "type": "cbi", + "path": "rosy-file-server/rosyfs", + "post": { "cbi.submit": true } + } + } +} diff --git a/applications/luci-app-rp-pppoe-server/luasrc/controller/rp-pppoe-server.lua b/applications/luci-app-rp-pppoe-server/luasrc/controller/rp-pppoe-server.lua deleted file mode 100644 index 105a80e28..000000000 --- a/applications/luci-app-rp-pppoe-server/luasrc/controller/rp-pppoe-server.lua +++ /dev/null @@ -1,13 +0,0 @@ --- Copyright 2015 Daniel Dickinson --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.rp-pppoe-server", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/pppoe") then - return - end - - entry({"admin", "services", "rp-pppoe-server"}, cbi("rp-pppoe-server"), _("RP PPPoE Server")) -end - diff --git a/applications/luci-app-rp-pppoe-server/root/usr/share/luci/menu.d/luci-app-rp-pppoe-server.json b/applications/luci-app-rp-pppoe-server/root/usr/share/luci/menu.d/luci-app-rp-pppoe-server.json new file mode 100644 index 000000000..2d964285a --- /dev/null +++ b/applications/luci-app-rp-pppoe-server/root/usr/share/luci/menu.d/luci-app-rp-pppoe-server.json @@ -0,0 +1,13 @@ +{ + "admin/services/rp-pppoe-server": { + "title": "RP PPPoE Server", + "action": { + "type": "cbi", + "path": "rp-pppoe-server", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "pppoe": true } + } + } +} diff --git a/applications/luci-app-samba/luasrc/controller/samba.lua b/applications/luci-app-samba/luasrc/controller/samba.lua deleted file mode 100644 index 397af6a82..000000000 --- a/applications/luci-app-samba/luasrc/controller/samba.lua +++ /dev/null @@ -1,16 +0,0 @@ --- Copyright 2008 Steven Barth --- Copyright 2008 Jo-Philipp Wich --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.samba", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/samba") then - return - end - - local page - - page = entry({"admin", "services", "samba"}, cbi("samba"), _("Network Shares")) - page.dependent = true -end diff --git a/applications/luci-app-samba/root/usr/share/luci/menu.d/luci-app-samba.json b/applications/luci-app-samba/root/usr/share/luci/menu.d/luci-app-samba.json new file mode 100644 index 000000000..27affd4f0 --- /dev/null +++ b/applications/luci-app-samba/root/usr/share/luci/menu.d/luci-app-samba.json @@ -0,0 +1,13 @@ +{ + "admin/services/samba": { + "title": "Network Shares", + "action": { + "type": "cbi", + "path": "samba", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "samba": true } + } + } +} diff --git a/applications/luci-app-samba4/luasrc/controller/samba4.lua b/applications/luci-app-samba4/luasrc/controller/samba4.lua deleted file mode 100644 index 03c53556b..000000000 --- a/applications/luci-app-samba4/luasrc/controller/samba4.lua +++ /dev/null @@ -1,11 +0,0 @@ --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.samba4", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/samba4") then - return - end - - entry({"admin", "services", "samba4"}, view("samba4"), _("Network Shares")).dependent = true -end diff --git a/applications/luci-app-samba4/root/usr/share/luci/menu.d/luci-app-samba4.json b/applications/luci-app-samba4/root/usr/share/luci/menu.d/luci-app-samba4.json new file mode 100644 index 000000000..74be4ed11 --- /dev/null +++ b/applications/luci-app-samba4/root/usr/share/luci/menu.d/luci-app-samba4.json @@ -0,0 +1,12 @@ +{ + "admin/services/samba4": { + "title": "Network Shares", + "action": { + "type": "view", + "path": "samba4" + }, + "depends": { + "uci": { "samba4": true } + } + } +} diff --git a/applications/luci-app-ser2net/luasrc/controller/ser2net.lua b/applications/luci-app-ser2net/luasrc/controller/ser2net.lua deleted file mode 100644 index e29478a27..000000000 --- a/applications/luci-app-ser2net/luasrc/controller/ser2net.lua +++ /dev/null @@ -1,12 +0,0 @@ -module("luci.controller.ser2net", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/ser2net") then - return - end - - entry({"admin", "services", "ser2net"}, firstchild(), "ser2net").dependent = true - entry({"admin", "services", "ser2net", "settings"}, view("ser2net/settings"), _("Settings"), 1).leaf = false - entry({"admin", "services", "ser2net", "proxies"}, view("ser2net/proxies"), _("Proxies"), 2).leaf = false - entry({"admin", "services", "ser2net", "leds"}, view("ser2net/leds"), _("LEDs"), 3).leaf = false -end diff --git a/applications/luci-app-ser2net/root/usr/share/luci/menu.d/luci-app-ser2net.json b/applications/luci-app-ser2net/root/usr/share/luci/menu.d/luci-app-ser2net.json new file mode 100644 index 000000000..e05a30b93 --- /dev/null +++ b/applications/luci-app-ser2net/root/usr/share/luci/menu.d/luci-app-ser2net.json @@ -0,0 +1,38 @@ +{ + "admin/services/ser2net": { + "title": "ser2net", + "action": { + "type": "firstchild" + }, + "depends": { + "uci": { "ser2net": true } + } + }, + + "admin/services/ser2net/settings": { + "title": "Settings", + "order": 1, + "action": { + "type": "view", + "path": "ser2net/settings" + } + }, + + "admin/services/ser2net/proxies": { + "title": "Proxies", + "order": 2, + "action": { + "type": "view", + "path": "ser2net/proxies" + } + }, + + "admin/services/ser2net/leds": { + "title": "LEDs", + "order": 3, + "action": { + "type": "view", + "path": "ser2net/leds" + } + } +} diff --git a/applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua b/applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua deleted file mode 100644 index c8a9d6636..000000000 --- a/applications/luci-app-shadowsocks-libev/luasrc/controller/shadowsocks-libev.lua +++ /dev/null @@ -1,22 +0,0 @@ --- Copyright 2017 Yousong Zhou --- Licensed to the public under the Apache License 2.0. --- -module("luci.controller.shadowsocks-libev", package.seeall) - -function index() - entry({"admin", "services", "shadowsocks-libev"}, - alias("admin", "services", "shadowsocks-libev", "instances"), - _("Shadowsocks-libev"), 59) - - entry({"admin", "services", "shadowsocks-libev", "instances"}, - view("shadowsocks-libev/instances"), - _("Local Instances"), 10).leaf = true - - entry({"admin", "services", "shadowsocks-libev", "servers"}, - view("shadowsocks-libev/servers"), - _("Remote Servers"), 20).leaf = true - - entry({"admin", "services", "shadowsocks-libev", "rules"}, - view("shadowsocks-libev/rules"), - _("Redir Rules"), 30).leaf = true -end diff --git a/applications/luci-app-shadowsocks-libev/root/usr/share/luci/menu.d/luci-app-shadowsocks-libev.json b/applications/luci-app-shadowsocks-libev/root/usr/share/luci/menu.d/luci-app-shadowsocks-libev.json new file mode 100644 index 000000000..afa8f44e3 --- /dev/null +++ b/applications/luci-app-shadowsocks-libev/root/usr/share/luci/menu.d/luci-app-shadowsocks-libev.json @@ -0,0 +1,36 @@ +{ + "admin/services/shadowsocks-libev": { + "title": "Shadowsocks-libev", + "order": 59, + "action": { + "type": "firstchild" + } + }, + + "admin/services/shadowsocks-libev/instances": { + "title": "Local Instances", + "order": 10, + "action": { + "type": "view", + "path": "shadowsocks-libev/instances" + } + }, + + "admin/services/shadowsocks-libev/servers": { + "title": "Remote Servers", + "order": 20, + "action": { + "type": "view", + "path": "shadowsocks-libev/servers" + } + }, + + "admin/services/shadowsocks-libev/rules": { + "title": "Redir Rules", + "order": 30, + "action": { + "type": "view", + "path": "shadowsocks-libev/rules" + } + } +} diff --git a/applications/luci-app-shairplay/luasrc/controller/shairplay.lua b/applications/luci-app-shairplay/luasrc/controller/shairplay.lua deleted file mode 100644 index d3223016a..000000000 --- a/applications/luci-app-shairplay/luasrc/controller/shairplay.lua +++ /dev/null @@ -1,14 +0,0 @@ --- Copyright 2014 Álvaro Fernández Rojas --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.shairplay", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/shairplay") then - return - end - - local page = entry({"admin", "services", "shairplay"}, cbi("shairplay"), _("Shairplay")) - page.dependent = true - -end diff --git a/applications/luci-app-shairplay/root/usr/share/luci/menu.d/luci-app-shairplay.json b/applications/luci-app-shairplay/root/usr/share/luci/menu.d/luci-app-shairplay.json new file mode 100644 index 000000000..fae731945 --- /dev/null +++ b/applications/luci-app-shairplay/root/usr/share/luci/menu.d/luci-app-shairplay.json @@ -0,0 +1,13 @@ +{ + "admin/services/shairplay": { + "title": "Shairplay", + "action": { + "type": "cbi", + "path": "shairplay", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "shairplay": true } + } + } +} diff --git a/applications/luci-app-siitwizard/luasrc/controller/siitwizard.lua b/applications/luci-app-siitwizard/luasrc/controller/siitwizard.lua deleted file mode 100644 index 0bbedaa9d..000000000 --- a/applications/luci-app-siitwizard/luasrc/controller/siitwizard.lua +++ /dev/null @@ -1,9 +0,0 @@ --- Copyright 2008 Steven Barth --- Copyright 2008 Jo-Philipp Wich --- Licensed to the public under the Apache License 2.0. - -module "luci.controller.siitwizard" - -function index() - entry({"admin", "network", "siitwizard"}, form("siitwizard"), "SIIT 4over6 assistant", 99) -end diff --git a/applications/luci-app-siitwizard/root/usr/share/luci/menu.d/luci-app-siitwizard.json b/applications/luci-app-siitwizard/root/usr/share/luci/menu.d/luci-app-siitwizard.json new file mode 100644 index 000000000..3f64bea83 --- /dev/null +++ b/applications/luci-app-siitwizard/root/usr/share/luci/menu.d/luci-app-siitwizard.json @@ -0,0 +1,11 @@ +{ + "admin/network/siitwizard": { + "title": "SIIT 4over6 assistant", + "order": 99, + "action": { + "type": "form", + "path": "clamav", + "post": { "cbi.submit": true } + } + } +} diff --git a/applications/luci-app-simple-adblock/luasrc/controller/simple-adblock.lua b/applications/luci-app-simple-adblock/luasrc/controller/simple-adblock.lua deleted file mode 100644 index acfea5bf3..000000000 --- a/applications/luci-app-simple-adblock/luasrc/controller/simple-adblock.lua +++ /dev/null @@ -1,6 +0,0 @@ -module("luci.controller.simple-adblock", package.seeall) -function index() - if nixio.fs.access("/etc/config/simple-adblock") then - entry({"admin", "services", "simple-adblock"}, cbi("simple-adblock"), _("Simple AdBlock")) - end -end diff --git a/applications/luci-app-simple-adblock/root/usr/share/luci/menu.d/luci-app-simple-adblock.json b/applications/luci-app-simple-adblock/root/usr/share/luci/menu.d/luci-app-simple-adblock.json new file mode 100644 index 000000000..09f4a3c0f --- /dev/null +++ b/applications/luci-app-simple-adblock/root/usr/share/luci/menu.d/luci-app-simple-adblock.json @@ -0,0 +1,13 @@ +{ + "admin/services/simple-adblock": { + "title": "Simple AdBlock", + "action": { + "type": "cbi", + "path": "simple-adblock", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "simple-adblock": true } + } + } +} diff --git a/applications/luci-app-snmpd/luasrc/controller/snmpd.lua b/applications/luci-app-snmpd/luasrc/controller/snmpd.lua deleted file mode 100644 index 71020747f..000000000 --- a/applications/luci-app-snmpd/luasrc/controller/snmpd.lua +++ /dev/null @@ -1,5 +0,0 @@ -module("luci.controller.snmpd", package.seeall) - -function index() - entry({"admin", "services", "snmpd"}, cbi("snmpd"), "SNMPD") -end diff --git a/applications/luci-app-snmpd/root/usr/share/luci/menu.d/luci-app-snmpd.json b/applications/luci-app-snmpd/root/usr/share/luci/menu.d/luci-app-snmpd.json new file mode 100644 index 000000000..22d29c9f6 --- /dev/null +++ b/applications/luci-app-snmpd/root/usr/share/luci/menu.d/luci-app-snmpd.json @@ -0,0 +1,10 @@ +{ + "admin/services/snmpd": { + "title": "SNMPD", + "action": { + "type": "cbi", + "path": "snmpd", + "post": { "cbi.submit": true } + } + } +} diff --git a/applications/luci-app-squid/luasrc/controller/squid.lua b/applications/luci-app-squid/luasrc/controller/squid.lua deleted file mode 100644 index 09946a151..000000000 --- a/applications/luci-app-squid/luasrc/controller/squid.lua +++ /dev/null @@ -1,21 +0,0 @@ ---[[ - -LuCI Squid module - -Copyright (C) 2015, OpenWrt.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 - -Author: Marko Ratkaj - -]]-- - -module("luci.controller.squid", package.seeall) - -function index() - entry({"admin", "services", "squid"}, cbi("squid"), _("Squid")) -end diff --git a/applications/luci-app-squid/root/usr/share/luci/menu.d/luci-app-squid.json b/applications/luci-app-squid/root/usr/share/luci/menu.d/luci-app-squid.json new file mode 100644 index 000000000..b71648b69 --- /dev/null +++ b/applications/luci-app-squid/root/usr/share/luci/menu.d/luci-app-squid.json @@ -0,0 +1,10 @@ +{ + "admin/services/squid": { + "title": "Squid", + "action": { + "type": "cbi", + "path": "squid", + "post": { "cbi.submit": true } + } + } +} diff --git a/applications/luci-app-tinyproxy/luasrc/controller/tinyproxy.lua b/applications/luci-app-tinyproxy/luasrc/controller/tinyproxy.lua deleted file mode 100644 index cf7e974d6..000000000 --- a/applications/luci-app-tinyproxy/luasrc/controller/tinyproxy.lua +++ /dev/null @@ -1,15 +0,0 @@ --- Copyright 2008 Steven Barth --- Copyright 2008 Jo-Philipp Wich --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.tinyproxy", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/tinyproxy") then - return - end - - entry({"admin", "services", "tinyproxy"}, alias("admin", "services", "tinyproxy", "config"), _("Tinyproxy")) - entry({"admin", "services", "tinyproxy", "status"}, template("tinyproxy_status"), _("Status")) - entry({"admin", "services", "tinyproxy", "config"}, cbi("tinyproxy"), _("Configuration")) -end diff --git a/applications/luci-app-tinyproxy/root/usr/share/luci/menu.d/luci-app-tinyproxy.json b/applications/luci-app-tinyproxy/root/usr/share/luci/menu.d/luci-app-tinyproxy.json new file mode 100644 index 000000000..e89c140e3 --- /dev/null +++ b/applications/luci-app-tinyproxy/root/usr/share/luci/menu.d/luci-app-tinyproxy.json @@ -0,0 +1,30 @@ +{ + "admin/services/tinyproxy": { + "title": "Tinyproxy", + "action": { + "type": "firstchild" + }, + "depends": { + "uci": { "tinyproxy": true } + } + }, + + "admin/services/tinyproxy/status": { + "title": "Status", + "order": 1, + "action": { + "type": "template", + "path": "tinyproxy_status" + } + }, + + "admin/services/tinyproxy/config": { + "title": "Configuration", + "order": 2, + "action": { + "type": "cbi", + "path": "tinyproxy", + "post": { "cbi.submit": true } + } + } +} diff --git a/applications/luci-app-transmission/root/usr/share/luci/menu.d/luci-app-transmission.json b/applications/luci-app-transmission/root/usr/share/luci/menu.d/luci-app-transmission.json index 0eff2ad33..71a17e2b9 100644 --- a/applications/luci-app-transmission/root/usr/share/luci/menu.d/luci-app-transmission.json +++ b/applications/luci-app-transmission/root/usr/share/luci/menu.d/luci-app-transmission.json @@ -4,6 +4,9 @@ "action": { "type": "view", "path": "transmission" + }, + "depends": { + "uci": { "transmission": true } } } } diff --git a/applications/luci-app-ttyd/luasrc/controller/ttyd.lua b/applications/luci-app-ttyd/luasrc/controller/ttyd.lua deleted file mode 100644 index 5a7344d84..000000000 --- a/applications/luci-app-ttyd/luasrc/controller/ttyd.lua +++ /dev/null @@ -1,13 +0,0 @@ --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.ttyd", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/ttyd") then - return - end - - entry({"admin", "services", "ttyd"}, firstchild(), _("ttyd")) - entry({"admin", "services", "ttyd", "ttyd"}, view("ttyd/term"), _("Terminal"), 1) - entry({"admin", "services", "ttyd", "config"}, view("ttyd/config"), _("Config"), 2) -end diff --git a/applications/luci-app-ttyd/root/usr/share/luci/menu.d/luci-app-ttyd.json b/applications/luci-app-ttyd/root/usr/share/luci/menu.d/luci-app-ttyd.json new file mode 100644 index 000000000..cc8b3f146 --- /dev/null +++ b/applications/luci-app-ttyd/root/usr/share/luci/menu.d/luci-app-ttyd.json @@ -0,0 +1,29 @@ +{ + "admin/services/ttyd": { + "title": "ttyd", + "action": { + "type": "firstchild" + }, + "depends": { + "uci": { "ttyd": true } + } + }, + + "admin/services/ttyd/ttyd": { + "title": "Terminal", + "order": 1, + "action": { + "type": "view", + "path": "ttyd/term" + } + }, + + "admin/services/ttyd/config": { + "title": "Config", + "order": 2, + "action": { + "type": "view", + "path": "ttyd/config" + } + } +} diff --git a/applications/luci-app-udpxy/luasrc/controller/udpxy.lua b/applications/luci-app-udpxy/luasrc/controller/udpxy.lua deleted file mode 100644 index 36a40ddfc..000000000 --- a/applications/luci-app-udpxy/luasrc/controller/udpxy.lua +++ /dev/null @@ -1,14 +0,0 @@ --- Copyright 2014 Álvaro Fernández Rojas --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.udpxy", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/udpxy") then - return - end - - local page = entry({"admin", "services", "udpxy"}, cbi("udpxy"), _("udpxy")) - page.dependent = true - -end diff --git a/applications/luci-app-udpxy/root/usr/share/luci/menu.d/luci-app-udpxy.json b/applications/luci-app-udpxy/root/usr/share/luci/menu.d/luci-app-udpxy.json new file mode 100644 index 000000000..5f6a5583a --- /dev/null +++ b/applications/luci-app-udpxy/root/usr/share/luci/menu.d/luci-app-udpxy.json @@ -0,0 +1,13 @@ +{ + "admin/services/udpxy": { + "title": "udpxy", + "action": { + "type": "cbi", + "path": "udpxy", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "udpxy": true } + } + } +} diff --git a/applications/luci-app-uhttpd/luasrc/controller/uhttpd/uhttpd.lua b/applications/luci-app-uhttpd/luasrc/controller/uhttpd/uhttpd.lua deleted file mode 100644 index 2e80dd63b..000000000 --- a/applications/luci-app-uhttpd/luasrc/controller/uhttpd/uhttpd.lua +++ /dev/null @@ -1,17 +0,0 @@ --- Copyright 2015 Daniel Dickinson --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.uhttpd.uhttpd", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/uhttpd") then - return - end - - local page - - page = entry({"admin", "services", "uhttpd"}, cbi("uhttpd/uhttpd"), _("uHTTPd")) - page.leaf = true - -end - diff --git a/applications/luci-app-uhttpd/root/usr/share/luci/menu.d/luci-app-uhttpd.json b/applications/luci-app-uhttpd/root/usr/share/luci/menu.d/luci-app-uhttpd.json new file mode 100644 index 000000000..44619ad06 --- /dev/null +++ b/applications/luci-app-uhttpd/root/usr/share/luci/menu.d/luci-app-uhttpd.json @@ -0,0 +1,13 @@ +{ + "admin/services/uhttpd/*": { + "title": "uHTTPd", + "action": { + "type": "cbi", + "path": "uhttpd/uhttpd", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "uhttpd": true } + } + } +} diff --git a/applications/luci-app-upnp/luasrc/controller/upnp.lua b/applications/luci-app-upnp/luasrc/controller/upnp.lua deleted file mode 100644 index 4b610f286..000000000 --- a/applications/luci-app-upnp/luasrc/controller/upnp.lua +++ /dev/null @@ -1,13 +0,0 @@ --- Copyright 2008 Steven Barth --- Copyright 2008 Jo-Philipp Wich --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.upnp", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/upnpd") then - return - end - - entry({"admin", "services", "upnp"}, view("upnp/upnp"), _("UPnP")) -end diff --git a/applications/luci-app-upnp/root/usr/share/luci/menu.d/luci-app-upnp.json b/applications/luci-app-upnp/root/usr/share/luci/menu.d/luci-app-upnp.json new file mode 100644 index 000000000..7fdf67dcc --- /dev/null +++ b/applications/luci-app-upnp/root/usr/share/luci/menu.d/luci-app-upnp.json @@ -0,0 +1,12 @@ +{ + "admin/services/upnp": { + "title": "UPnP", + "action": { + "type": "view", + "path": "upnp/upnp" + }, + "depends": { + "uci": { "upnpd": true } + } + } +} diff --git a/applications/luci-app-vnstat/luasrc/controller/vnstat.lua b/applications/luci-app-vnstat/luasrc/controller/vnstat.lua deleted file mode 100644 index 3871fa254..000000000 --- a/applications/luci-app-vnstat/luasrc/controller/vnstat.lua +++ /dev/null @@ -1,11 +0,0 @@ -module("luci.controller.vnstat", package.seeall) - -function index() - entry({"admin", "status", "vnstat"}, alias("admin", "status", "vnstat", "graphs"), _("VnStat Traffic Monitor"), 90) - entry({"admin", "status", "vnstat", "graphs"}, template("vnstat"), _("Graphs"), 1) - entry({"admin", "status", "vnstat", "config"}, cbi("vnstat"), _("Configuration"), 2) - - entry({"mini", "network", "vnstat"}, alias("mini", "network", "vnstat", "graphs"), _("VnStat Traffic Monitor"), 90) - entry({"mini", "network", "vnstat", "graphs"}, template("vnstat"), _("Graphs"), 1) - entry({"mini", "network", "vnstat", "config"}, cbi("vnstat"), _("Configuration"), 2) -end diff --git a/applications/luci-app-vnstat/root/usr/share/luci/menu.d/luci-app-vnstat.json b/applications/luci-app-vnstat/root/usr/share/luci/menu.d/luci-app-vnstat.json new file mode 100644 index 000000000..5b92e239c --- /dev/null +++ b/applications/luci-app-vnstat/root/usr/share/luci/menu.d/luci-app-vnstat.json @@ -0,0 +1,28 @@ +{ + "admin/status/vnstat": { + "title": "VnStat Traffic Monitor", + "order": 90, + "action": { + "type": "firstchild" + } + }, + + "admin/status/vnstat/graphs": { + "title": "Graphs", + "order": 1, + "action": { + "type": "template", + "path": "vnstat" + } + }, + + "admin/status/vnstat/config": { + "title": "Configuration", + "order": 2, + "action": { + "type": "cbi", + "path": "vnstat", + "post": { "cbi.submit": true } + } + } +} diff --git a/applications/luci-app-watchcat/luasrc/controller/watchcat.lua b/applications/luci-app-watchcat/luasrc/controller/watchcat.lua deleted file mode 100644 index 27d5b74b2..000000000 --- a/applications/luci-app-watchcat/luasrc/controller/watchcat.lua +++ /dev/null @@ -1,11 +0,0 @@ --- Copyright 2012 Christian Gagneraud --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.watchcat", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/system") then - return - end - entry({"admin", "services", "watchcat"}, cbi("watchcat/watchcat"), _("Watchcat"), 90) -end diff --git a/applications/luci-app-watchcat/root/usr/share/luci/menu.d/luci-app-watchcat.json b/applications/luci-app-watchcat/root/usr/share/luci/menu.d/luci-app-watchcat.json new file mode 100644 index 000000000..d1eba7b43 --- /dev/null +++ b/applications/luci-app-watchcat/root/usr/share/luci/menu.d/luci-app-watchcat.json @@ -0,0 +1,14 @@ +{ + "admin/services/watchcat": { + "title": "Watchcat", + "order": 90, + "action": { + "type": "cbi", + "path": "watchcat/watchcat", + "post": { "cbi.submit": true } + }, + "depends": { + "uci": { "system": true } + } + } +} diff --git a/applications/luci-app-wireguard/luasrc/controller/wireguard.lua b/applications/luci-app-wireguard/luasrc/controller/wireguard.lua deleted file mode 100644 index 5a9196097..000000000 --- a/applications/luci-app-wireguard/luasrc/controller/wireguard.lua +++ /dev/null @@ -1,8 +0,0 @@ --- Copyright 2016-2017 Dan Luedtke --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.wireguard", package.seeall) - -function index() - entry({"admin", "status", "wireguard"}, template("wireguard"), _("WireGuard Status"), 92) -end diff --git a/applications/luci-app-wireguard/root/usr/share/luci/menu.d/luci-app-wireguard.json b/applications/luci-app-wireguard/root/usr/share/luci/menu.d/luci-app-wireguard.json new file mode 100644 index 000000000..0cb87f3e2 --- /dev/null +++ b/applications/luci-app-wireguard/root/usr/share/luci/menu.d/luci-app-wireguard.json @@ -0,0 +1,10 @@ +{ + "admin/status/wireguard": { + "title": "WireGuard Status", + "order": 92, + "action": { + "type": "template", + "path": "wireguard" + } + } +} diff --git a/applications/luci-app-yggdrasil/luasrc/controller/yggdrasil.lua b/applications/luci-app-yggdrasil/luasrc/controller/yggdrasil.lua deleted file mode 100644 index 8a955520f..000000000 --- a/applications/luci-app-yggdrasil/luasrc/controller/yggdrasil.lua +++ /dev/null @@ -1,16 +0,0 @@ -module("luci.controller.yggdrasil", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/yggdrasil") then - return - end - - entry({"admin", "network", "yggdrasil"}, firstchild(), "Yggdrasil").dependent = true - entry({"admin", "network", "yggdrasil", "status"}, view("yggdrasil/status"), _("Status"), 1).leaf = false - - entry({"admin", "network", "yggdrasil", "peers"}, view("yggdrasil/peers"), _("Peers"), 2).leaf = false - entry({"admin", "network", "yggdrasil", "settings"}, view("yggdrasil/settings"), _("Settings"), 3).leaf = false - entry({"admin", "network", "yggdrasil", "keys"}, view("yggdrasil/keys"), _("Encryption keys"), 4).leaf = false - entry({"admin", "network", "yggdrasil", "session_firewall"}, view("yggdrasil/session_firewall"), _("Session firewall"), 5).leaf = false - entry({"admin", "network", "yggdrasil", "tunnel_routing"}, view("yggdrasil/tunnel_routing"), _("Tunnel routing"), 6).leaf = false -end diff --git a/applications/luci-app-yggdrasil/root/usr/share/luci/menu.d/luci-app-yggdrasil.json b/applications/luci-app-yggdrasil/root/usr/share/luci/menu.d/luci-app-yggdrasil.json new file mode 100644 index 000000000..dbe9331b2 --- /dev/null +++ b/applications/luci-app-yggdrasil/root/usr/share/luci/menu.d/luci-app-yggdrasil.json @@ -0,0 +1,65 @@ +{ + "admin/network/yggdrasil": { + "title": "Yggdrasil", + "action": { + "type": "firstchild" + }, + "depends": { + "uci": { "yggdrasil": true } + } + }, + + "admin/network/yggdrasil/status": { + "title": "Status", + "order": 1, + "action": { + "type": "view", + "path": "yggdrasil/status" + } + }, + + "admin/network/yggdrasil/peers": { + "title": "Peers", + "order": 2, + "action": { + "type": "view", + "path": "yggdrasil/peers" + } + }, + + "admin/network/yggdrasil/settings": { + "title": "Settings", + "order": 3, + "action": { + "type": "view", + "path": "yggdrasil/settings" + } + }, + + "admin/network/yggdrasil/keys": { + "title": "Encryption keys", + "order": 4, + "action": { + "type": "view", + "path": "yggdrasil/keys" + } + }, + + "admin/network/yggdrasil/session_firewall": { + "title": "Session firewall", + "order": 5, + "action": { + "type": "view", + "path": "yggdrasil/session_firewall" + } + }, + + "admin/network/yggdrasil/tunnel_routing": { + "title": "Tunnel routing", + "order": 6, + "action": { + "type": "view", + "path": "yggdrasil/tunnel_routing" + } + } +}