增加DNS同步任务状态显示

This commit is contained in:
GoEdgeLab
2021-01-27 22:59:46 +08:00
parent d508c88722
commit 8971d939ba
19 changed files with 353 additions and 29 deletions

View File

@@ -16,6 +16,9 @@ Tea.context(function () {
// 检查集群节点同步
this.loadNodeTasks();
// 检查DNS同步
this.loadDNSTasks()
})
/**
@@ -83,6 +86,9 @@ Tea.context(function () {
}
this.loadNodeTasks = function () {
if (!Tea.Vue.teaCheckNodeTasks) {
return
}
this.$post("/clusters/tasks/check")
.success(function (resp) {
this.doingNodeTasks.isDoing = resp.data.isDoing
@@ -102,6 +108,39 @@ Tea.context(function () {
width: "50em"
})
}
/**
* DNS同步任务
*/
this.doingDNSTasks = {
isDoing: false,
hasError: false,
isUpdated: false
}
this.loadDNSTasks = function () {
if (!Tea.Vue.teaCheckDNSTasks) {
return
}
this.$post("/dns/tasks/check")
.success(function (resp) {
this.doingDNSTasks.isDoing = resp.data.isDoing
this.doingDNSTasks.hasError = resp.data.hasError
this.doingDNSTasks.isUpdated = true
})
.done(function () {
this.$delay(function () {
this.loadDNSTasks()
}, 3000)
})
}
this.showDNSTasks = function () {
teaweb.popup("/dns/tasks/listPopup", {
height: "24em",
width: "50em"
})
}
});
window.NotifySuccess = function (message, url, params) {