mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-03 07:03:56 +08:00
🤞 Sync 2026-08-31 03:15:28
This commit is contained in:
1 parent
1444a85fae
commit
5151f60573
5 files changed
+25
-7
No files matched your search
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=AgentFlow
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
LUCI_DEPENDS:=+agentflow +luci-compat
|
||||
LUCI_MINIFY_CSS:=0
|
||||
LUCI_MINIFY_JS:=0
|
||||
|
||||
@@ -17,6 +17,17 @@ local data_dir = s:option(Value, "data_dir", translate("Data directory"))
|
||||
data_dir.rmempty = false
|
||||
data_dir.description = translate("Required. AgentFlow stores its configuration, database and workspace data under this directory.")
|
||||
|
||||
function data_dir.validate(self, value, section)
|
||||
value = (value or ""):match("^%s*(.-)%s*$")
|
||||
if value == "" or value == "/" then
|
||||
return nil, translate("Data directory cannot be empty.")
|
||||
end
|
||||
if not value:match("^/mnt/[^/]+/") then
|
||||
return nil, translate("Please select a disk as the data directory.")
|
||||
end
|
||||
return value
|
||||
end
|
||||
|
||||
local paths, default_path = agentflow_model.find_paths(blocks, home)
|
||||
for _, val in pairs(paths) do
|
||||
data_dir:value(val, val)
|
||||
|
||||
@@ -16,6 +16,9 @@ msgstr "正在获取数据……"
|
||||
msgid "Data directory"
|
||||
msgstr "数据目录"
|
||||
|
||||
msgid "Data directory cannot be empty."
|
||||
msgstr "数据目录不能为空"
|
||||
|
||||
msgid "Enable"
|
||||
msgstr "启用"
|
||||
|
||||
@@ -28,6 +31,9 @@ msgstr "监听端口"
|
||||
msgid "Port for the AgentFlow HTTP server."
|
||||
msgstr "AgentFlow HTTP 服务的端口号。"
|
||||
|
||||
msgid "Please select a disk as the data directory."
|
||||
msgstr "请选择硬盘作为数据目录"
|
||||
|
||||
msgid "Required. AgentFlow stores its configuration, database and workspace data under this directory."
|
||||
msgstr "必需。AgentFlow 在此目录中保存配置、数据库和工作区数据。"
|
||||
|
||||
|
||||
Reference in new issue
Block a user