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.
48 lines
1.7 KiB
Lua
48 lines
1.7 KiB
Lua
1 year ago
|
--[[
|
||
|
LuCI - Lua Configuration Interface
|
||
|
]]--
|
||
|
|
||
|
local taskd = require "luci.model.tasks"
|
||
|
local bookstack_model = require "luci.model.bookstack"
|
||
|
local m, s, o
|
||
|
|
||
|
m = taskd.docker_map("bookstack", "bookstack", "/usr/libexec/apps/bookstack/bookstack.sh",
|
||
|
translate("bookstack"),
|
||
|
translate("Bookstack is a free and open source Wiki designed for creating beautiful documentation. Featuring a simple, but powerful WYSIWYG editor it allows for teams to create detailed and useful documentation with ease.")
|
||
|
.. translate("Official website:") .. ' <a href=\"https://www.bookstackapp.com/\" target=\"_blank\">https://www.bookstackapp.com/</a>')
|
||
|
|
||
|
s = m:section(SimpleSection, translate("Service Status"), translate("bookstack status:"))
|
||
|
s:append(Template("bookstack/status"))
|
||
|
|
||
|
s = m:section(TypedSection, "bookstack", translate("Setup"), translate("Refresh to update settings."))
|
||
|
s.addremove=false
|
||
|
s.anonymous=true
|
||
|
|
||
|
o = s:option(Value, "port", translate("Port").."<b>*</b>")
|
||
|
o.rmempty = false
|
||
|
o.default = "6875"
|
||
|
o.datatype = "port"
|
||
|
|
||
|
o = s:option(Value, "image_name", translate("Image").."<b>*</b>")
|
||
|
o.rmempty = false
|
||
|
o.datatype = "string"
|
||
|
o:value("lscr.io/linuxserver/bookstack", "lscr.io/linuxserver/bookstack")
|
||
|
o.default = "lscr.io/linuxserver/bookstack"
|
||
|
|
||
|
local blocks = bookstack_model.blocks()
|
||
|
local home = bookstack_model.home()
|
||
|
|
||
|
o = s:option(Value, "config_path", translate("Config path").."<b>*</b>")
|
||
|
o.rmempty = false
|
||
|
o.datatype = "string"
|
||
|
o:value("/opt/docker2/compose/Config/bookstack", "/opt/docker2/compose/Config/bookstack")
|
||
|
o.default = "/opt/docker2/compose/Config/bookstack"
|
||
|
|
||
|
local paths, default_path = bookstack_model.find_paths(blocks, home, "Configs")
|
||
|
for _, val in pairs(paths) do
|
||
|
o:value(val, val)
|
||
|
end
|
||
|
o.default = default_path
|
||
|
|
||
|
return m
|