实现HTTP部分功能

This commit is contained in:
GoEdgeLab
2020-09-26 08:07:18 +08:00
parent 72865127b7
commit 86229e5a6f
32 changed files with 280 additions and 147 deletions

View File

@@ -38,11 +38,21 @@ Tea.context(function () {
*/
this.checkClusterChanges = function () {
this.$get("/common/changedClusters")
.params({
isNotifying: (this.globalChangedClusters.length > 0) ? 1 : 0
})
.timeout(60)
.success(function (resp) {
this.globalChangedClusters = resp.data.clusters;
}).fail(function () {
this.globalChangedClusters = [];
})
})
.fail(function () {
this.globalChangedClusters = [];
})
.done(function () {
this.$delay(function () {
this.checkClusterChanges()
}, 3000)
})
};
/**