mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-08 07:50:28 +08:00
增加刷新、预热缓存任务管理
This commit is contained in:
32
web/views/@default/servers/components/cache/fetch.js
vendored
Normal file
32
web/views/@default/servers/components/cache/fetch.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
Tea.context(function () {
|
||||
this.isRequesting = false
|
||||
this.isOk = false
|
||||
this.message = ""
|
||||
this.failKeys = []
|
||||
|
||||
this.before = function () {
|
||||
this.isRequesting = true
|
||||
this.isOk = false
|
||||
this.message = ""
|
||||
this.failKeys = []
|
||||
}
|
||||
|
||||
this.success = function (resp) {
|
||||
this.isOk = true
|
||||
|
||||
let f = NotifyReloadSuccess("任务提交成功")
|
||||
f()
|
||||
}
|
||||
|
||||
this.fail = function (resp) {
|
||||
this.message = resp.message
|
||||
|
||||
if (resp.data.failKeys != null) {
|
||||
this.failKeys = resp.data.failKeys
|
||||
}
|
||||
}
|
||||
|
||||
this.done = function () {
|
||||
this.isRequesting = false
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user