mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-12 03:10:26 +08:00
增加刷新、预热缓存任务管理
This commit is contained in:
@@ -1,31 +1,35 @@
|
||||
Tea.context(function () {
|
||||
if (this.clusterId == null) {
|
||||
if (this.clusters.length > 0) {
|
||||
this.clusterId = this.clusters[0].id
|
||||
} else {
|
||||
this.clusterId = 0
|
||||
}
|
||||
}
|
||||
|
||||
this.isRequesting = false
|
||||
this.isOk = false
|
||||
this.message = ""
|
||||
this.results = []
|
||||
this.failKeys = []
|
||||
|
||||
this.$delay(function () {
|
||||
this.$refs.keysBox.focus()
|
||||
this.$watch("keyType", function () {
|
||||
this.$refs.keysBox.focus()
|
||||
})
|
||||
})
|
||||
|
||||
this.before = function () {
|
||||
this.isRequesting = true
|
||||
this.isOk = false
|
||||
this.message = ""
|
||||
this.results = []
|
||||
this.failKeys = []
|
||||
}
|
||||
|
||||
this.success = function (resp) {
|
||||
this.success = function () {
|
||||
this.isOk = true
|
||||
this.results = resp.data.results
|
||||
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 () {
|
||||
@@ -35,5 +39,5 @@ Tea.context(function () {
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
this.type = "key" // key | prefix
|
||||
this.keyType = "key" // key | prefix
|
||||
})
|
||||
Reference in New Issue
Block a user