update 2022-06-23 20:21:12

This commit is contained in:
github-actions[bot] 2022-06-23 20:21:12 +08:00
parent 294af389bd
commit 7c201342a7
5 changed files with 28 additions and 22 deletions

View File

@ -14,7 +14,7 @@ PKG_VERSION:=1.5.1
PKG_RELEASE:=$(PKG_ARCH_DDNSTO)-3 PKG_RELEASE:=$(PKG_ARCH_DDNSTO)-3
PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://fw.koolcenter.com/binary/ddnsto/ PKG_SOURCE_URL:=http://fw.koolcenter.com/binary/ddnsto/
PKG_HASH:=a73502a5ffb13cca36e9e0a3a40b88ec261e5dbc48fc2c86c3e32b05515752dc PKG_HASH:=b0a7753acc29d6257a3831bb24dc83457d8c78e05134b0395f88fea85524d10c
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION)

View File

@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for ddnsto
LUCI_DEPENDS:=+ddnsto LUCI_DEPENDS:=+ddnsto
LUCI_PKGARCH:=all LUCI_PKGARCH:=all
PKG_VERSION:=1.5.1 PKG_VERSION:=1.5.1
PKG_RELEASE:=1 PKG_RELEASE:=4
include $(TOPDIR)/feeds/luci/luci.mk include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -6,7 +6,7 @@ function index()
return return
end end
entry({"admin","services", "ddnsto"}, call("redirect_index"), _("DDNSTO"), 20).dependent = true entry({"admin","services", "ddnsto"}, call("redirect_index"), _("DDNSTO 远程控制"), 20).dependent = true
entry({"admin","services", "ddnsto", "pages"}, call("ddnsto_index")).leaf = true entry({"admin","services", "ddnsto", "pages"}, call("ddnsto_index")).leaf = true
if nixio.fs.access("/usr/lib/lua/luci/view/ddnsto/main_dev.htm") then if nixio.fs.access("/usr/lib/lua/luci/view/ddnsto/main_dev.htm") then
entry({"admin","services", "ddnsto", "dev"}, call("ddnsto_dev")).leaf = true entry({"admin","services", "ddnsto", "dev"}, call("ddnsto_dev")).leaf = true
@ -106,8 +106,7 @@ local function status_container()
labels = { labels = {
{ {
key = "服务状态", key = "服务状态",
value = running, value = running
tt = non_system_mounts
}, },
{ {
key = "插件版本", key = "插件版本",
@ -141,7 +140,7 @@ local function status_container()
value = "<a href=\"https://www.ddnsto.com/app/#/devices\" target=\"_blank\">点击前往DDNSTO控制台</a>" value = "<a href=\"https://www.ddnsto.com/app/#/devices\" target=\"_blank\">点击前往DDNSTO控制台</a>"
} }
}, },
title = "DDNSTO 服务状态" title = "服务状态"
} }
return c1 return c1
end end
@ -245,6 +244,7 @@ local function feat_container()
name = "feat_disk_path_selected", name = "feat_disk_path_selected",
enum = getBlockDevices(), enum = getBlockDevices(),
enumNames = getBlockDevices(), enumNames = getBlockDevices(),
required = true,
title = "共享磁盘", title = "共享磁盘",
type = "string", type = "string",
["ui:hidden"] = "{{rootValue.feat_enabled !== true }}" ["ui:hidden"] = "{{rootValue.feat_enabled !== true }}"
@ -275,7 +275,7 @@ local function get_schema()
actions = actions, actions = actions,
containers = get_containers(), containers = get_containers(),
description = "DDNSTO远程控制是Koolcenter小宝开发的支持http2的远程穿透控制插件。<br />\n 支持通过浏览器访问自定义域名访问内网设备后台、远程RDP/VNC桌面、远程文件管理等多种功能。<br />\n 详情请查看 <a href=\"https://www.ddnsto.com/\" target=\"_blank\">https://www.ddnsto.com</a>", description = "DDNSTO远程控制是Koolcenter小宝开发的支持http2的远程穿透控制插件。<br />\n 支持通过浏览器访问自定义域名访问内网设备后台、远程RDP/VNC桌面、远程文件管理等多种功能。<br />\n 详情请查看 <a href=\"https://www.ddnsto.com/\" target=\"_blank\">https://www.ddnsto.com</a>",
title = "ddnsto" title = "DDNSTO 远程控制"
} }
return schema return schema
end end
@ -322,11 +322,8 @@ function ddnsto_submit()
success = -1000 success = -1000
error = "请填写正确用户Token令牌" error = "请填写正确用户Token令牌"
end end
if req.enabled == false then
req.feat_enabled = false
end
if string.find(req.token, " ") then if req.token ~= nil and string.find(req.token, " ") then
success = -1000 success = -1000
error = "令牌勿包含空格" error = "令牌勿包含空格"
end end
@ -336,6 +333,7 @@ function ddnsto_submit()
end end
if req.feat_enabled == true then if req.feat_enabled == true then
if (req.feat_port == nil or tonumber(req.feat_port) == nil or req.feat_port == 0) then if (req.feat_port == nil or tonumber(req.feat_port) == nil or req.feat_port == 0) then
success = -1000 success = -1000
error = "请填写正确的端口" error = "请填写正确的端口"
@ -391,7 +389,7 @@ function ddnsto_submit()
end end
x:set("ddnsto","@ddnsto[0]","feat_enabled",f_enabled) x:set("ddnsto","@ddnsto[0]","feat_enabled",f_enabled)
local port = 3030 local port = 3033
if req.feat_port ~= nil then if req.feat_port ~= nil then
port = req.feat_port port = req.feat_port
end end
@ -409,7 +407,7 @@ function ddnsto_submit()
end end
x:set("ddnsto","@ddnsto[0]","feat_password",password) x:set("ddnsto","@ddnsto[0]","feat_password",password)
local path = req.feat_disk_path_selected local path = ""
if req.feat_disk_path_selected ~= nil then if req.feat_disk_path_selected ~= nil then
path = trim(req.feat_disk_path_selected) path = trim(req.feat_disk_path_selected)
end end
@ -424,7 +422,9 @@ function ddnsto_submit()
log = log .. "请关闭对话框\n" log = log .. "请关闭对话框\n"
ddnsto_writelog(log) ddnsto_writelog(log)
luci.util.exec("/etc/init.d/ddnsto restart") luci.util.exec("/etc/init.d/ddnsto stop")
luci.util.exec("sleep 1")
luci.util.exec("/etc/init.d/ddnsto start")
luci.util.exec("sleep 1") luci.util.exec("sleep 1")
else else
log = log .. "参数错误:\n" log = log .. "参数错误:\n"

View File

@ -1,7 +1,13 @@
<%+header%> <%+header%>
<script> <script>
(function(){ (function(){
})(); })();
window.IstoreosFormEnv = {
getApi: '/cgi-bin/luci/admin/services/ddnsto/form/',
logApi: '/cgi-bin/luci/admin/services/ddnsto/log',
submitApi: '/cgi-bin/luci/admin/services/ddnsto/submit/'
}
</script> </script>
<div id="app"> <div id="app">
</div> </div>

File diff suppressed because one or more lines are too long