build: i18n-add-language.sh: more lenient code validation
[project/luci.git] / applications / luci-app-rosy-file-server / luasrc / controller / rosy-file-server / rosy-file-server.lua
1 -- Copyright 2018 Rosy Song <rosysong@rosinson.com>
2 -- Licensed to the public under the Apache License 2.0.
3
4 module("luci.controller.rosy-file-server.rosy-file-server", package.seeall)
5
6 function index()
7 if not nixio.fs.access("/etc/config/rosyfs") then
8 return
9 end
10
11 local root = node()
12 if not root.target then
13 root.target = alias("httpfs")
14 root.index = true
15 end
16
17 page = node()
18 page.lock = true
19 page.target = alias("httpfs")
20 page.subindex = true
21 page.index = false
22
23 page = node("httpfs")
24 page.title = _("Rosy File Server")
25 page.target = alias("httpfs", "rosy-file-server")
26 page.order = 5
27 page.setuser = "root"
28 page.setgroup = "root"
29 page.index = true
30
31 entry({"httpfs", "rosy-file-server"},
32 form("rosy-file-server/rosy-file-server"), _("Rosy File Server"), 10)
33
34 entry({"admin", "services", "rosyfs"},
35 cbi("rosy-file-server/rosyfs"), _("Rosy File Server"), 61)
36 end
37