mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-03 18:30:24 +08:00
优化界面显示
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifyPopup
|
||||
|
||||
this.isRequesting = true
|
||||
this.results = []
|
||||
this.countSuccess = 0
|
||||
this.countFail = 0
|
||||
|
||||
this.$delay(function () {
|
||||
this.run()
|
||||
})
|
||||
|
||||
this.run = function () {
|
||||
this.isRequesting = true
|
||||
|
||||
this.$post("$")
|
||||
.params({
|
||||
clusterId: this.clusterId
|
||||
})
|
||||
.success(function (resp) {
|
||||
this.results = resp.data.results
|
||||
let that = this
|
||||
this.results.forEach(function (v) {
|
||||
v.costMs = Math.ceil(v.costMs)
|
||||
if (isNaN(v.costMs)) {
|
||||
v.costMs = 0
|
||||
}
|
||||
if (v.isOk) {
|
||||
that.countSuccess++
|
||||
} else {
|
||||
that.countFail++
|
||||
}
|
||||
})
|
||||
})
|
||||
.done(function () {
|
||||
this.isRequesting = false
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user