优化健康检查界面

This commit is contained in:
GoEdgeLab
2023-04-26 10:48:44 +08:00
parent a513970930
commit 424e262f77
3 changed files with 6 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
Vue.component("health-check-config-box", { Vue.component("health-check-config-box", {
props: ["v-health-check-config", "v-check-domain-url"], props: ["v-health-check-config", "v-check-domain-url", "v-is-plus"],
data: function () { data: function () {
let healthCheckConfig = this.vHealthCheckConfig let healthCheckConfig = this.vHealthCheckConfig
let urlProtocol = "http" let urlProtocol = "http"
@@ -69,6 +69,7 @@ Vue.component("health-check-config-box", {
healthCheckConfig.countDown = 3 healthCheckConfig.countDown = 3
} }
} }
return { return {
healthCheck: healthCheckConfig, healthCheck: healthCheckConfig,
advancedVisible: false, advancedVisible: false,
@@ -237,13 +238,13 @@ Vue.component("health-check-config-box", {
</td> </td>
</tr> </tr>
<tr> <tr>
<td>自动下线</td> <td>自动下线<span v-if="vIsPlus">IP</span></td>
<td> <td>
<div class="ui checkbox"> <div class="ui checkbox">
<input type="checkbox" value="1" v-model="healthCheck.autoDown"/> <input type="checkbox" value="1" v-model="healthCheck.autoDown"/>
<label></label> <label></label>
</div> </div>
<p class="comment">选中后系统会根据健康检查的结果自动标记节点的上线/下线状态并可能自动同步DNS设置。</p> <p class="comment">选中后系统会根据健康检查的结果自动标记<span v-if="vIsPlus">节点IP</span><span v-else>节点</span>的上线/下线状态并可能自动同步DNS设置。<span v-if="!vIsPlus">注意免费版的只能整体上下线整个节点商业版的可以下线单个IP。</span></p>
</td> </td>
</tr> </tr>
<tr v-show="healthCheck.autoDown"> <tr v-show="healthCheck.autoDown">

View File

@@ -5,7 +5,7 @@
<div class="right-box with-menu"> <div class="right-box with-menu">
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success"> <form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
<input type="hidden" name="clusterId" :value="clusterId"/> <input type="hidden" name="clusterId" :value="clusterId"/>
<health-check-config-box :v-health-check-config="healthCheckConfig" :v-check-domain-url="'/clusters/cluster/settings/health/checkDomain?clusterId=' + clusterId"></health-check-config-box> <health-check-config-box :v-health-check-config="healthCheckConfig" :v-check-domain-url="'/clusters/cluster/settings/health/checkDomain?clusterId=' + clusterId" :v-is-plus="teaIsPlus"></health-check-config-box>
<submit-btn></submit-btn> &nbsp; <a href="" @click.prevent="run()" v-if="healthCheckConfig != null && healthCheckConfig.isOn">立即检查</a> <submit-btn></submit-btn> &nbsp; <a href="" @click.prevent="run()" v-if="healthCheckConfig != null && healthCheckConfig.isOn">立即检查</a>
</form> </form>
</div> </div>

View File

@@ -4,7 +4,7 @@ Tea.context(function () {
this.run = function () { this.run = function () {
teaweb.confirm("确定要对当前集群下的所有节点进行健康检查吗?", function () { teaweb.confirm("确定要对当前集群下的所有节点进行健康检查吗?", function () {
teaweb.popup("/clusters/cluster/settings/health/runPopup?clusterId=" + this.clusterId, { teaweb.popup("/clusters/cluster/settings/health/runPopup?clusterId=" + this.clusterId, {
height: "25em" height: "30em"
}) })
}) })
} }