Update 'luasrc/model/cbi/lxc-attach.lua'

main
ben 1 year ago
parent bf3f6c2b4b
commit 913477020e

@ -0,0 +1,29 @@
--[[
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

@ -1,29 +0,0 @@
--[[
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
Loading…
Cancel
Save