summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-ttyd
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-ttyd')
-rw-r--r--applications/luci-app-ttyd/luasrc/controller/ttyd.lua13
-rw-r--r--applications/luci-app-ttyd/root/usr/share/luci/menu.d/luci-app-ttyd.json29
2 files changed, 29 insertions, 13 deletions
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"
+ }
+ }
+}