update 2022-07-22 20:21:22
This commit is contained in:
parent
087e5393a5
commit
313f1fd07e
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=aliyundrive-webdav
|
PKG_NAME:=aliyundrive-webdav
|
||||||
PKG_VERSION:=1.8.1
|
PKG_VERSION:=1.8.2
|
||||||
PKG_RELEASE:=$(AUTORELEASE)
|
PKG_RELEASE:=$(AUTORELEASE)
|
||||||
|
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-aliyundrive-webdav
|
PKG_NAME:=luci-app-aliyundrive-webdav
|
||||||
PKG_VERSION:=1.8.1
|
PKG_VERSION:=1.8.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_PO_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
|
PKG_PO_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ function index()
|
||||||
entry({ "admin", "services", "aliyundrive-webdav", "logtail" }, call("action_logtail")).leaf = true -- 日志采集
|
entry({ "admin", "services", "aliyundrive-webdav", "logtail" }, call("action_logtail")).leaf = true -- 日志采集
|
||||||
entry({ "admin", "services", "aliyundrive-webdav", "qrcode" }, call("action_generate_qrcode")).leaf = true -- 生成扫码登录二维码地址和参数
|
entry({ "admin", "services", "aliyundrive-webdav", "qrcode" }, call("action_generate_qrcode")).leaf = true -- 生成扫码登录二维码地址和参数
|
||||||
entry({ "admin", "services", "aliyundrive-webdav", "query" }, call("action_query_qrcode")).leaf = true -- 查询扫码登录结果
|
entry({ "admin", "services", "aliyundrive-webdav", "query" }, call("action_query_qrcode")).leaf = true -- 查询扫码登录结果
|
||||||
|
entry({ "admin", "services", "aliyundrive-webdav", "invalidate-cache" }, call("action_invalidate_cache")).leaf = true -- 清除缓存
|
||||||
end
|
end
|
||||||
|
|
||||||
function action_status()
|
function action_status()
|
||||||
|
@ -57,3 +58,10 @@ function action_query_qrcode()
|
||||||
luci.http.prepare_content("application/json")
|
luci.http.prepare_content("application/json")
|
||||||
luci.http.write_json(output)
|
luci.http.write_json(output)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function action_invalidate_cache()
|
||||||
|
local e = {}
|
||||||
|
e.ok = luci.sys.call("kill -HUP `pidof aliyundrive-webdav`") == 0
|
||||||
|
luci.http.prepare_content("application/json")
|
||||||
|
luci.http.write_json(e)
|
||||||
|
end
|
||||||
|
|
|
@ -11,11 +11,26 @@ XHR.poll(3, '<%=url([[admin]], [[services]], [[aliyundrive-webdav]], [[status]])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function invalidateCache(button) {
|
||||||
|
XHR.get('<%=url([[admin]], [[services]], [[aliyundrive-webdav]], [[invalidate-cache]])%>', null,
|
||||||
|
function(x, data) {
|
||||||
|
if (data.ok) {
|
||||||
|
alert("缓存已清除.");
|
||||||
|
} else {
|
||||||
|
alert("清除缓存失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
||||||
<fieldset class="cbi-section">
|
<fieldset class="cbi-section">
|
||||||
<p id="aliyundrive-webdav_status">
|
<p id="aliyundrive-webdav_status" style="float: left; width: 60%; margin-top: 12px;">
|
||||||
<em><%:Collecting data...%></em>
|
<em><%:Collecting data...%></em>
|
||||||
</p>
|
</p>
|
||||||
|
<p class="right" style="float: right; width: 40%;">
|
||||||
|
<button class="cbi-button" onclick="event.stopPropagation(); invalidateCache(this);"><%:Invalidate cache%></button>
|
||||||
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -49,6 +49,9 @@ msgstr "目录缓存过期时间(单位为秒)"
|
||||||
msgid "Collecting data..."
|
msgid "Collecting data..."
|
||||||
msgstr "获取数据中..."
|
msgstr "获取数据中..."
|
||||||
|
|
||||||
|
msgid "Invalidate cache"
|
||||||
|
msgstr "清除缓存"
|
||||||
|
|
||||||
msgid "RUNNING"
|
msgid "RUNNING"
|
||||||
msgstr "运行中"
|
msgstr "运行中"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue