--[[ LuCI - Lua Configuration Interface ]]-- local taskd = require "luci.model.tasks" local gotify_model = require "luci.model.gotify" local m, s, o m = taskd.docker_map("gotify", "gotify", "/usr/libexec/apps/gotify/gotify.sh", translate("Gotify"), translate("A simple server for sending and receiving messages.") .. translate("Official website:") .. ' https://gotify.net/') s = m:section(SimpleSection, translate("Service Status"), translate("gotify status:")) s:append(Template("gotify/status")) s = m:section(TypedSection, "gotify", translate("Setup"), translate("Refresh to update settings.")) s.addremove=false s.anonymous=true o = s:option(Value, "port", translate("Port").."*") o.rmempty = false o.default = "8050" o.datatype = "port" o = s:option(Value, "image_name", translate("Image").."*") o.rmempty = false o.datatype = "string" o:value("gotify/server", "gotify/server") o.default = "gotify/server" local blocks = gotify_model.blocks() local home = gotify_model.home() o = s:option(Value, "config_path", translate("Config path").."*") o.rmempty = false o.datatype = "string" o:value("/opt/docker2/compose/gotify-app", "/opt/docker2/compose/gotify-app") o.default = "/opt/docker2/compose/gotify-app" local paths, default_path = gotify_model.find_paths(blocks, home, "Configs") for _, val in pairs(paths) do o:value(val, val) end o.default = default_path return m