mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-11 10:10:28 +08:00
服务 -- 缓存设置中增加清理和预热功能
This commit is contained in:
31
web/views/@default/servers/server/settings/cache/purge.js
vendored
Normal file
31
web/views/@default/servers/server/settings/cache/purge.js
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
Tea.context(function () {
|
||||
this.isRequesting = false
|
||||
this.isOk = false
|
||||
this.message = ""
|
||||
this.results = []
|
||||
|
||||
this.before = function () {
|
||||
this.isRequesting = true
|
||||
this.isOk = false
|
||||
this.message = ""
|
||||
this.results = []
|
||||
}
|
||||
|
||||
this.success = function (resp) {
|
||||
this.isOk = true
|
||||
this.results = resp.data.results
|
||||
}
|
||||
|
||||
this.fail = function (resp) {
|
||||
this.message = resp.message
|
||||
}
|
||||
|
||||
this.done = function () {
|
||||
this.isRequesting = false
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
this.type = "key" // key | prefix
|
||||
})
|
||||
Reference in New Issue
Block a user