Files
EdgeAdmin/web/views/@default/servers/components/cache/purge.js

43 lines
749 B
JavaScript
Raw Normal View History

2020-10-04 16:09:50 +08:00
Tea.context(function () {
this.isRequesting = false
this.isOk = false
this.message = ""
this.failKeys = []
this.$delay(function () {
this.$refs.keysBox.focus()
this.$watch("keyType", function () {
this.$refs.keysBox.focus()
})
})
2020-10-04 16:09:50 +08:00
this.before = function () {
this.isRequesting = true
this.isOk = false
this.message = ""
this.failKeys = []
2020-10-04 16:09:50 +08:00
}
this.success = function () {
2020-10-04 16:09:50 +08:00
this.isOk = true
let f = NotifyReloadSuccess("任务提交成功")
f()
2020-10-04 16:09:50 +08:00
}
this.fail = function (resp) {
this.message = resp.message
if (resp.data.failKeys != null) {
this.failKeys = resp.data.failKeys
}
2020-10-04 16:09:50 +08:00
}
this.done = function () {
this.isRequesting = false
}
/**
* 操作类型
*/
this.keyType = "key" // key | prefix
})