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.
50 lines
1.8 KiB
Lua
50 lines
1.8 KiB
Lua
--[[
|
|
LuCI - Lua Configuration Interface
|
|
]]--
|
|
|
|
local taskd = require "luci.model.tasks"
|
|
local motioneye_model = require "luci.model.motioneye"
|
|
local m, s, o
|
|
|
|
m = taskd.docker_map("motioneye", "motioneye", "/usr/libexec/apps/motioneye/motioneye.sh",
|
|
translate("motioneye"),
|
|
translate("motionEye is an open source web-frontend for the motion daemon, used to centralize the management and visualization of multiple types of cameras.")
|
|
.. translate("Official website:") .. ' <a href=\"https://github.com/hassio-addons/addon-motioneye/\" target=\"_blank\">https://github.com/hassio-addons/addon-motioneye/</a>')
|
|
|
|
s = m:section(SimpleSection, translate("Service Status"), translate("motioneye status:"))
|
|
s:append(Template("motioneye/status"))
|
|
|
|
s = m:section(TypedSection, "motioneye", 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 = "8808"
|
|
o.datatype = "port"
|
|
|
|
o = s:option(Value, "image_name", translate("Image").."<b>*</b>")
|
|
o.rmempty = false
|
|
o.datatype = "string"
|
|
o:value("ccrisan/motioneye:master-amd64", "ccrisan/motioneye:master-amd64")
|
|
o:value("ccrisan/motioneye:master-armhf", "ccrisan/motioneye:master-armhf")
|
|
o.default = "ccrisan/motioneye:master-amd64"
|
|
|
|
local blocks = motioneye_model.blocks()
|
|
local home = motioneye_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", "/opt/docker2/compose/Config")
|
|
o:value("/dev/video0", "/dev/video0")
|
|
o.default = "/dev/video0"
|
|
|
|
local paths, default_path = motioneye_model.find_paths(blocks, home, "Configs")
|
|
for _, val in pairs(paths) do
|
|
o:value(val, val)
|
|
end
|
|
o.default = default_path
|
|
|
|
return m
|