treewide: convert simple Lua controllers to declarative JSON

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2020-02-05 16:51:19 +01:00
parent 535d4cf8b9
commit 625abbfdbe
89 changed files with 821 additions and 608 deletions

View file

@ -1,5 +0,0 @@
module("luci.controller.attendedsysupgrade", package.seeall)
function index()
entry({"admin", "system", "attended_sysupgrade"}, template("attendedsysupgrade"), _("Attended Sysupgrade"), 1)
end

View file

@ -0,0 +1,10 @@
{
"admin/system/attended_sysupgrade": {
"title": "Attended Sysupgrade",
"order": 1,
"action": {
"type": "template",
"path": "attendedsysupgrade"
}
}
}

View file

@ -1,7 +0,0 @@
module("luci.controller.bcp38", package.seeall)
function index()
entry({"admin", "network", "firewall", "bcp38"},
cbi("bcp38"),
_("BCP38"), 50).dependent = false
end

View file

@ -0,0 +1,11 @@
{
"admin/network/firewall/bcp38": {
"title": "BCP38",
"order": 50,
"action": {
"type": "cbi",
"path": "bcp38",
"post": { "cbi.submit": true }
}
}
}

View file

@ -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 <marko.ratkaj@sartura.hr>
Luka Perkov <luka.perkov@sartura.hr>
]]--
module("luci.controller.clamav", package.seeall)
function index()
entry({"admin", "services", "clamav"}, cbi("clamav"), _("ClamAV"))
end

View file

@ -0,0 +1,10 @@
{
"admin/services/clamav": {
"title": "ClamAV",
"action": {
"type": "cbi",
"path": "clamav",
"post": { "cbi.submit": true }
}
}
}

View file

@ -1,15 +0,0 @@
-- Copyright 2008 Steven Barth <steven@midlink.org>
-- 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

View file

@ -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 }
}
}
}

View file

@ -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

View file

@ -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 }
}
}
}

View file

@ -1,11 +0,0 @@
-- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- Copyright 2013 Manuel Munz <freifunk at somakoma dot de>
-- Copyright 2014-2018 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
-- 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

View file

@ -0,0 +1,10 @@
{
"admin/services/ddns": {
"title": "Dynamic DNS",
"order": 59,
"action": {
"type": "view",
"path": "ddns/overview"
}
}
}

View file

@ -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

View file

@ -0,0 +1,10 @@
{
"admin/network/diag_config": {
"title": "Configure Diagnostics",
"order": 120,
"action": {
"type": "template",
"path": "diag/network_config_index"
}
}
}

View file

@ -1,14 +0,0 @@
-- Copyright 2014 Álvaro Fernández Rojas <noltari@gmail.com>
-- 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

View file

@ -0,0 +1,13 @@
{
"admin/services/dump1090": {
"title": "dump1090",
"action": {
"type": "cbi",
"path": "dump1090",
"post": { "cbi.submit": true }
},
"depends": {
"uci": { "dump1090": true }
}
}
}

View file

@ -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

View file

@ -0,0 +1,13 @@
{
"admin/services/dynapoint": {
"title": "DynaPoint",
"action": {
"type": "cbi",
"path": "dynapoint",
"post": { "cbi.submit": true }
},
"depends": {
"uci": { "dynapoint": true }
}
}
}

View file

@ -1,15 +0,0 @@
-- Copyright 2015 Jonathan Bennett <jbennett@incomsystems.biz>
-- 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

View file

@ -0,0 +1,13 @@
{
"admin/services/fwknopd": {
"title": "Firewall Knock Daemon",
"action": {
"type": "cbi",
"path": "fwknopd",
"post": { "cbi.submit": true }
},
"depends": {
"uci": { "fwknopd": true }
}
}
}

View file

@ -1,15 +0,0 @@
-- Copyright 2008 Yanira <forum-2008@email.de>
-- 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

View file

@ -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 }
}
}
}

View file

@ -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

View file

@ -0,0 +1,12 @@
{
"admin/services/ksmbd": {
"title": "Network Shares",
"action": {
"type": "view",
"path": "ksmbd"
},
"depends": {
"uci": { "ksmbd": true }
}
}
}

View file

@ -1,16 +0,0 @@
-- Copyright 2014 Roger D <rogerdammit@gmail.com>
-- 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

View file

@ -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 }
}
}
}

View file

@ -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

View file

@ -0,0 +1,10 @@
{
"admin/services/mosquitto": {
"title": "Mosquitto",
"action": {
"type": "cbi",
"path": "mosquitto",
"post": { "cbi.submit": true }
}
}
}

View file

@ -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

View file

@ -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"
}
}
}

View file

@ -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

View file

@ -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 }
}
}
}

View file

@ -1,19 +0,0 @@
-- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- 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

View file

@ -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 }
}
}
}

View file

@ -1,25 +0,0 @@
-- Copyright 2015 Daniel Dickinson <openwrt@daniel.thecshore.com>
-- 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

View file

@ -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 }
}
}
}

View file

@ -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

View file

@ -0,0 +1,10 @@
{
"admin/status/olsr/olsr-viz": {
"title": "OLSR-Viz",
"order": 90,
"action": {
"type": "template",
"path": "olsr-viz/olsr-viz"
}
}
}

View file

@ -1,13 +0,0 @@
-- Copyright 2019 Shun Li <riverscn@gmail.com>
-- 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

View file

@ -0,0 +1,12 @@
{
"admin/services/omcproxy": {
"title": "omcproxy",
"action": {
"type": "view",
"path": "omcproxy"
},
"depends": {
"uci": { "omcproxy": true }
}
}
}

View file

@ -1,15 +0,0 @@
-- Copyright 2008 Yanira <forum-2008@email.de>
-- 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

View file

@ -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 }
}
}
}

View file

@ -1,8 +0,0 @@
-- Copyright 2018 Karl Palsson <karlp@tweak.net.au>
-- 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

View file

@ -0,0 +1,10 @@
{
"admin/services/pagekitec": {
"title": "PageKite",
"action": {
"type": "cbi",
"path": "pagekitec",
"post": { "cbi.submit": true }
}
}
}

View file

@ -1,15 +0,0 @@
-- Copyright 2008 Aleksandar Krsteski <alekrsteski@gmail.com>
-- 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

View file

@ -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 }
}
}
}

View file

@ -1,15 +0,0 @@
-- Copyright 2008 Steven Barth <steven@midlink.org>
-- 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

View file

@ -0,0 +1,13 @@
{
"admin/network/qos": {
"title": "QoS",
"action": {
"type": "cbi",
"path": "qos/qos",
"post": { "cbi.submit": true }
},
"depends": {
"uci": { "qos": true }
}
}
}

View file

@ -1,37 +0,0 @@
-- Copyright 2018 Rosy Song <rosysong@rosinson.com>
-- 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

View file

@ -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 }
}
}
}

View file

@ -1,13 +0,0 @@
-- Copyright 2015 Daniel Dickinson <openwrt@daniel.thecshore.com>
-- 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

View file

@ -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 }
}
}
}

View file

@ -1,16 +0,0 @@
-- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- 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

View file

@ -0,0 +1,13 @@
{
"admin/services/samba": {
"title": "Network Shares",
"action": {
"type": "cbi",
"path": "samba",
"post": { "cbi.submit": true }
},
"depends": {
"uci": { "samba": true }
}
}
}

View file

@ -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

View file

@ -0,0 +1,12 @@
{
"admin/services/samba4": {
"title": "Network Shares",
"action": {
"type": "view",
"path": "samba4"
},
"depends": {
"uci": { "samba4": true }
}
}
}

View file

@ -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

View file

@ -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"
}
}
}

View file

@ -1,22 +0,0 @@
-- Copyright 2017 Yousong Zhou <yszhou4tech@gmail.com>
-- 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

View file

@ -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"
}
}
}

View file

@ -1,14 +0,0 @@
-- Copyright 2014 Álvaro Fernández Rojas <noltari@gmail.com>
-- 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

View file

@ -0,0 +1,13 @@
{
"admin/services/shairplay": {
"title": "Shairplay",
"action": {
"type": "cbi",
"path": "shairplay",
"post": { "cbi.submit": true }
},
"depends": {
"uci": { "shairplay": true }
}
}
}

View file

@ -1,9 +0,0 @@
-- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- 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

View file

@ -0,0 +1,11 @@
{
"admin/network/siitwizard": {
"title": "SIIT 4over6 assistant",
"order": 99,
"action": {
"type": "form",
"path": "clamav",
"post": { "cbi.submit": true }
}
}
}

View file

@ -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

View file

@ -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 }
}
}
}

View file

@ -1,5 +0,0 @@
module("luci.controller.snmpd", package.seeall)
function index()
entry({"admin", "services", "snmpd"}, cbi("snmpd"), "SNMPD")
end

View file

@ -0,0 +1,10 @@
{
"admin/services/snmpd": {
"title": "SNMPD",
"action": {
"type": "cbi",
"path": "snmpd",
"post": { "cbi.submit": true }
}
}
}

View file

@ -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 <marko.ratkaj@sartura.hr>
]]--
module("luci.controller.squid", package.seeall)
function index()
entry({"admin", "services", "squid"}, cbi("squid"), _("Squid"))
end

View file

@ -0,0 +1,10 @@
{
"admin/services/squid": {
"title": "Squid",
"action": {
"type": "cbi",
"path": "squid",
"post": { "cbi.submit": true }
}
}
}

View file

@ -1,15 +0,0 @@
-- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- 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

View file

@ -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 }
}
}
}

View file

@ -4,6 +4,9 @@
"action": {
"type": "view",
"path": "transmission"
},
"depends": {
"uci": { "transmission": true }
}
}
}

View file

@ -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

View file

@ -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"
}
}
}

View file

@ -1,14 +0,0 @@
-- Copyright 2014 Álvaro Fernández Rojas <noltari@gmail.com>
-- 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

View file

@ -0,0 +1,13 @@
{
"admin/services/udpxy": {
"title": "udpxy",
"action": {
"type": "cbi",
"path": "udpxy",
"post": { "cbi.submit": true }
},
"depends": {
"uci": { "udpxy": true }
}
}
}

View file

@ -1,17 +0,0 @@
-- Copyright 2015 Daniel Dickinson <openwrt@daniel.thecshore.com>
-- 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

View file

@ -0,0 +1,13 @@
{
"admin/services/uhttpd/*": {
"title": "uHTTPd",
"action": {
"type": "cbi",
"path": "uhttpd/uhttpd",
"post": { "cbi.submit": true }
},
"depends": {
"uci": { "uhttpd": true }
}
}
}

View file

@ -1,13 +0,0 @@
-- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- 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

View file

@ -0,0 +1,12 @@
{
"admin/services/upnp": {
"title": "UPnP",
"action": {
"type": "view",
"path": "upnp/upnp"
},
"depends": {
"uci": { "upnpd": true }
}
}
}

View file

@ -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

View file

@ -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 }
}
}
}

View file

@ -1,11 +0,0 @@
-- Copyright 2012 Christian Gagneraud <chris@techworks.ie>
-- 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

View file

@ -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 }
}
}
}

View file

@ -1,8 +0,0 @@
-- Copyright 2016-2017 Dan Luedtke <mail@danrl.com>
-- 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

View file

@ -0,0 +1,10 @@
{
"admin/status/wireguard": {
"title": "WireGuard Status",
"order": 92,
"action": {
"type": "template",
"path": "wireguard"
}
}
}

View file

@ -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

View file

@ -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"
}
}
}