--[[
LuCI - Lua Configuration Interface
] ] --
local taskd = require " luci.model.tasks "
local seafile_model = require " luci.model.seafile "
local m , s , o
m = taskd.docker_map ( " seafile " , " seafile " , " /usr/libexec/apps/seafile/seafile.sh " ,
translate ( " Seafile " ) ,
translate ( " Seafile is an open-source, cross-platform file-hosting software system. Files are stored on a central server and can be synchronized with personal computers and mobile devices through apps. " )
.. translate ( " Official website: " ) .. ' <a href= \" https://www.seafile.com/en/home/ \" target= \" _blank \" >https://www.seafile.com/en/home/</a> ' )
s = m : section ( SimpleSection , translate ( " Service Status " ) , translate ( " seafile status: " ) )
s : append ( Template ( " seafile/status " ) )
s = m : section ( TypedSection , " seafile " , translate ( " Setup " ) , translate ( " Default user: me@example.com Default pass: asecret " ) )
s.addremove = false
s.anonymous = true
o = s : option ( Value , " port " , translate ( " Port " ) .. " <b>*</b> " )
o.rmempty = false
o.default = " 8160 "
o.datatype = " port "
o = s : option ( Value , " image_name " , translate ( " Image " ) .. " <b>*</b> " )
o.rmempty = false
o.datatype = " string "
o : value ( " seafileltd/seafile-mc:latest " , " seafileltd/seafile-mc:latest " )
o.default = " seafileltd/seafile-mc:latest "
local blocks = seafile_model.blocks ( )
local home = seafile_model.home ( )
o = s : option ( Value , " config_path " , translate ( " Config path " ) .. " <b>*</b> " )
o.rmempty = false
o.datatype = " string "
o : value ( " /opt/docker2/compose/seafile-app/config " , " /opt/docker2/compose/seafile-app/config " )
o.default = " //opt/docker2/compose/seafile-app/config "
local paths , default_path = seafile_model.find_paths ( blocks , home , " Configs " )
for _ , val in pairs ( paths ) do
o : value ( val , val )
end
o.default = default_path
return m