手动健康检查增加超时时间为60s

This commit is contained in:
GoEdgeLab
2022-04-22 20:56:49 +08:00
parent 6366e98ce2
commit a566c52821
3 changed files with 9 additions and 2 deletions

View File

@@ -3,8 +3,9 @@
<h3>健康检查</h3>
<span class="red" v-if="isRequesting">正在执行中,请等待执行完毕...</span>
<span class="red" v-if="!isRequesting && errorString.length > 0">{{errorString}}</span>
<form method="post" class="ui form" v-if="!isRequesting">
<form method="post" class="ui form" v-if="!isRequesting && errorString.length == 0">
<p>成功节点:<span class="green">{{countSuccess}}</span> &nbsp; 失败节点:<span class="red">{{countFail}}</span></p>
<table class="ui table selectable celled" v-if="results.length > 0">
<thead>

View File

@@ -5,6 +5,7 @@ Tea.context(function () {
this.results = []
this.countSuccess = 0
this.countFail = 0
this.errorString = ""
this.$delay(function () {
this.run()
@@ -12,11 +13,13 @@ Tea.context(function () {
this.run = function () {
this.isRequesting = true
this.errorString = ""
this.$post("$")
.params({
clusterId: this.clusterId
})
.timeout(60)
.success(function (resp) {
this.results = resp.data.results
let that = this
@@ -32,6 +35,9 @@ Tea.context(function () {
}
})
})
.error(function () {
this.errorString = "执行健康检查超时,请重试"
})
.done(function () {
this.isRequesting = false
})

View File

@@ -43,7 +43,7 @@
<td class="color-border">缓存文件句柄缓存</td>
<td>
<input type="text" name="fileOpenFileCacheMax" maxlength="6" value="0" style="width: 10em"/>
<p class="comment">保持缓存文件句柄,提升缓存文件打开速度,建议数量缓存文件数量的10%。</p>
<p class="comment">保持缓存文件句柄,提升缓存文件打开速度,建议数量不超过缓存文件数量的10%。</p>
</td>
</tr>
<tr v-show="teaIsPlus">