From 913477020ea0992430c88a701b7d0cdea0a89c0e Mon Sep 17 00:00:00 2001 From: ben Date: Sun, 3 Sep 2023 01:26:56 +0000 Subject: [PATCH] Update 'luasrc/model/cbi/lxc-attach.lua' --- luasrc/model/cbi/lxc-attach.lua | 29 +++++++++++++++++++++++++++++ luasrc/model/cbi/lxdterm.lua | 29 ----------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) create mode 100755 luasrc/model/cbi/lxc-attach.lua delete mode 100755 luasrc/model/cbi/lxdterm.lua diff --git a/luasrc/model/cbi/lxc-attach.lua b/luasrc/model/cbi/lxc-attach.lua new file mode 100755 index 0000000..6716c60 --- /dev/null +++ b/luasrc/model/cbi/lxc-attach.lua @@ -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:") .. ' https://lxc.com/') + +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").."*") +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 \ No newline at end of file diff --git a/luasrc/model/cbi/lxdterm.lua b/luasrc/model/cbi/lxdterm.lua deleted file mode 100755 index 22f6835..0000000 --- a/luasrc/model/cbi/lxdterm.lua +++ /dev/null @@ -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:") .. ' 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 \ No newline at end of file