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
1.0 KiB
Lua
29 lines
1.0 KiB
Lua
1 year ago
|
--[[
|
||
|
LuCI - Lua Configuration Interface
|
||
|
]]--
|
||
|
|
||
|
local taskd = require "luci.model.tasks"
|
||
|
local lxc-attach_model = require "luci.model.lxc-attach"
|
||
|
local m, s, o
|
||
|
|
||
|
m = taskd.docker_map("lxc-attach", "lxc-attach", "/usr/libexec/apps/lxc-attach/lxc-attach.sh",
|
||
|
translate("lxc-attach"),
|
||
|
translate("Access your LXC containers in Luci Terminal with lxc-attach.")
|
||
|
.. translate("Official website:") .. ' <a href=\"https://lxc.com/\" target=\"_blank\">https://lxc.com/</a>')
|
||
|
|
||
|
s = m:section(SimpleSection, translate("Service Status"), translate("lxc-attach status:"))
|
||
|
s:append(Template("lxc-attach/status"))
|
||
|
|
||
|
s = m:section(TypedSection, "lxc-attach", translate("Container"), translate("Enter the LXC container you want to access."))
|
||
|
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 = lxc-attach_model.blocks()
|
||
|
local home = lxc-attach_model.home()
|
||
|
|
||
|
return m
|