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.
46 lines
1.5 KiB
Lua
46 lines
1.5 KiB
Lua
--[[
|
|
LuCI - Lua Configuration Interface
|
|
]]--
|
|
|
|
local taskd = require "luci.model.tasks"
|
|
local ghostblog_model = require "luci.model.ghostblog"
|
|
local m, s, o
|
|
|
|
m = taskd.docker_map("ghostblog", "ghostblog", "/usr/libexec/apps/ghostblog/ghostblog.sh",
|
|
translate("Ghostblog"),
|
|
translate("Ghost is a free and open source blogging platform written in JavaScript that is designed to simplify the process of online publishing.")
|
|
.. translate("Official website:") .. ' <a href=\"https://ghostblog.com/\" target=\"_blank\">https://ghostblog.com/</a>')
|
|
|
|
s = m:section(SimpleSection, translate("Service Status"), translate("Ghostblog status:"))
|
|
s:append(Template("ghostblog/status"))
|
|
|
|
s = m:section(TypedSection, "ghostblog", translate("Setup"), translate("The following parameters will only take effect during installation or upgrade:"))
|
|
s.addremove=false
|
|
s.anonymous=true
|
|
|
|
o = s:option(Value, "port", translate("Port").."<b>*</b>")
|
|
o.rmempty = false
|
|
o.default = "2368"
|
|
o.datatype = "port"
|
|
|
|
o = s:option(Value, "image_name", translate("Image").."<b>*</b>")
|
|
o.rmempty = false
|
|
o.datatype = "string"
|
|
o:value("ghost", "ghost")
|
|
o.default = "ghost"
|
|
|
|
local blocks = ghostblog_model.blocks()
|
|
local home = ghostblog_model.home()
|
|
|
|
o = s:option(Value, "config_path", translate("Config path").."<b>*</b>")
|
|
o.rmempty = false
|
|
o.datatype = "string"
|
|
|
|
local paths, default_path = ghostblog_model.find_paths(blocks, home, "Configs")
|
|
for _, val in pairs(paths) do
|
|
o:value(val, val)
|
|
end
|
|
o.default = default_path
|
|
|
|
return m
|