--[[
LuCI - Lua Configuration Interface
]]--
local taskd = require "luci.model.tasks"
local lxdterm_model = require "luci.model.lxdterm"
local m, s, o
m = taskd.docker_map("lxdterm", "lxdterm", "/usr/libexec/apps/lxdterm/lxdterm.sh",
translate("lxdterm"),
translate("Access your LXD containers in Luci Terminal")
.. translate("Official website:") .. ' https://lxd.com/')
s = m:section(SimpleSection, translate("Service Status"), translate("lxdterm status:"))
s:append(Template("lxdterm/status"))
s = m:section(TypedSection, "lxdterm", translate("Container"), translate("Enter the LXC container you want to access then click save."))
s.addremove=false
s.anonymous=true
o = s:option(Value, "container", translate("container").."*")
o.rmempty = false
o.default = "ubuntu" -- Changed default to "ubuntu"
o.datatype = "string" -- Changed datatype to "string"
local blocks = lxdterm_model.blocks()
local home = lxdterm_model.home()
return m