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

This commit is contained in:
刘祥超
2022-04-22 20:56:49 +08:00
parent efebb5a869
commit 8bae065572
3 changed files with 9 additions and 2 deletions

View File

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

View File

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

View File

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