--[[ 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:") .. ' https://github.com/plugsy/core/') 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").."*") o.rmempty = false o.default = "3030" o.datatype = "port" o = s:option(Value, "image_name", translate("Image").."*") 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").."*") 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