--[[ LuCI - Lua Configuration Interface ]]-- local taskd = require "luci.model.tasks" local webtop_model = require "luci.model.webtop" local m, s, o m = taskd.docker_map("webtop", "webtop", "/usr/libexec/apps/webtop/webtop.sh", translate("Virtual Desktop"), translate("Get Virtual Desktops of all flavors, Alpine, Ubuntu, Fedora, and Arch based containers containing full desktop environments in officially supported versions accessible via any modern web browser.") .. translate("Official website:") .. ' hhttps://docs.linuxserver.io/images/docker-webtop/') s = m:section(SimpleSection, translate("Service Status"), translate("webtop status:")) s:append(Template("webtop/status")) s = m:section(TypedSection, "webtop", 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 = "3000" o.datatype = "port" o = s:option(Value, "image_name", translate("Image").."*") o.rmempty = false o.datatype = "string" o:value("fedora-xfce", "fedora-xfce") o:value("arch-xfce", "arch-xfce") o:value("alpine-kde", "alpine-kde") o:value("ubuntu-kde", "ubuntu-kde") o:value("fedora-kde", "fedora-kde") o:value("arch-kde", "arch-kde") o:value("alpine-mate", "alpine-mate") o:value("ubuntu-mate", "ubuntu-mate") o:value("alpine-i3", "alpine-i3") o:value("ubuntu-i3", "ubuntu-i3") o:value("fedora-i3", "fedora-i3") o:value("arch-i3", "arch-i3") o:value("alpine-openbox", "alpine-openbox") o:value("ubuntu-openbox", "ubuntu-openbox") o:value("fedora-openbox", "fedora-openbox") o:value("arch-openbox", "arch-openbox") o:value("alpine-icewm", "alpine-icewm") o:value("ubuntu-icewm", "ubuntu-icewm") o:value("fedora-icewm", "fedora-icewm") o:value("arch-icewm", "arch-icewm") o.default = "ubuntu-xfce" local blocks = webtop_model.blocks() local home = webtop_model.home() o = s:option(Value, "config_path", translate("Config path").."*") o.rmempty = false o.datatype = "string" o:value("/opt/docker2/compose/", "/opt/docker2/compose/") o:value("/mnt/data", "/mnt/data") o.default = "/opt/docker2/compose/" local paths, default_path = webtop_model.find_paths(blocks, home, "Configs") for _, val in pairs(paths) do o:value(val, val) end o.default = default_path return m