增加节点同步状态提示和任务列表

This commit is contained in:
刘祥超
2021-01-17 16:47:29 +08:00
parent a79d375f4e
commit f7054c69e9
23 changed files with 557 additions and 245 deletions

View File

@@ -0,0 +1,31 @@
Tea.context(function () {
this.$delay(function () {
this.reload()
})
this.reload = function () {
this.$post("$")
.success(function (resp) {
this.countTasks = resp.data.countTasks
this.clusters = resp.data.clusters
})
.done(function () {
this.$delay(function () {
this.reload()
}, 5000)
})
}
this.deleteTask = function (taskId) {
let that = this
teaweb.confirm("确定要删除这个任务吗?", function () {
that.$post(".delete")
.params({
taskId: taskId
})
.success(function () {
teaweb.reload()
})
})
}
})