You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.5 KiB
Lua
48 lines
1.5 KiB
Lua
1 year ago
|
--[[
|
||
|
LuCI - Lua Configuration Interface
|
||
|
]]--
|
||
|
|
||
|
local taskd = require "luci.model.tasks"
|
||
|
local plugsy_model = require "luci.model.plugsy"
|
||
|
local m, s, o
|
||
|
|
||
|
m = taskd.docker_map("plugsy", "plugsy", "/usr/libexec/apps/plugsy/plugsy.sh",
|
||
|
translate("Plugsy"),
|
||
|
translate("A simple dashboard used to show the status and easy to find links to all the apps you install! This makes a good homescreen.")
|
||
|
.. translate("Official website:") .. ' <a href=\"https://github.com/plugsy/core\" target=\"_blank\">https://github.com/plugsy/core/</a>')
|
||
|
|
||
|
s = m:section(SimpleSection, translate("Service Status"), translate("Plugsy status:"))
|
||
|
s:append(Template("plugsy/status"))
|
||
|
|
||
|
s = m:section(TypedSection, "plugsy", translate("Setup"), translate("The following parameters will only take effect during installation or upgrade:"))
|
||
|
s.addremove=false
|
||
|
s.anonymous=true
|
||
|
|
||
|
o = s:option(Value, "port", translate("Port").."<b>*</b>")
|
||
|
o.rmempty = false
|
||
|
o.default = "3030"
|
||
|
o.datatype = "port"
|
||
|
|
||
|
o = s:option(Value, "image_name", translate("Image").."<b>*</b>")
|
||
|
o.rmempty = false
|
||
|
o.datatype = "string"
|
||
|
o:value("plugsy/core", "plugsy/core")
|
||
|
o.default = "plugsy/core"
|
||
|
|
||
|
local blocks = plugsy_model.blocks()
|
||
|
local home = plugsy_model.home()
|
||
|
|
||
|
o = s:option(Value, "config_path", translate("Config path").."<b>*</b>")
|
||
|
o.rmempty = false
|
||
|
o.datatype = "string"
|
||
|
o:value("/var/run/docker.sock", "/var/run/docker.sock")
|
||
|
o.default = "/var/run/docker.sock"
|
||
|
|
||
|
local paths, default_path = plugsy_model.find_paths(blocks, home, "Configs")
|
||
|
for _, val in pairs(paths) do
|
||
|
o:value(val, val)
|
||
|
end
|
||
|
o.default = default_path
|
||
|
|
||
|
return m
|