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.

29 lines
1005 B
Lua

1 year ago
--[[
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:") .. ' <a href=\"https://lxd.com/\" target=\"_blank\">https://lxd.com/</a>')
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").."<b>*</b>")
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