This commit is contained in:
unknown
2026-02-04 20:27:13 +08:00
commit 3b042d1dad
9410 changed files with 1488147 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
{$layout}
{$template "../menu"}
{$template "/left_menu_with_menu"}
<div class="right-box with-menu">
<first-menu>
<menu-item :href="'.?clusterId=' + clusterId" class="active">设置</menu-item>
<menu-item :href="'.status?clusterId=' + clusterId" >状态</menu-item>
</first-menu>
<form class="ui form" data-tea-action="$" data-tea-success="success">
<csrf-token></csrf-token>
<input type="hidden" name="clusterId" :value="clusterId"/>
<node-ddos-protection-config-box :v-ddos-protection-config="config" :v-default-configs="defaultConfigs"></node-ddos-protection-config-box>
<submit-btn></submit-btn>
</form>
</div>

View File

@@ -0,0 +1,3 @@
Tea.context(function () {
this.success = NotifyReloadSuccess("保存成功")
})

View File

@@ -0,0 +1,44 @@
{$layout}
{$template "../menu"}
{$template "/left_menu_with_menu"}
<div class="right-box with-menu">
<first-menu>
<menu-item :href="'.?clusterId=' + clusterId">设置</menu-item>
<menu-item :href="'.status?clusterId=' + clusterId" class="active">状态</menu-item>
</first-menu>
<loading-message v-if="isLoading">检查中,请耐心等待完成...</loading-message>
<p class="comment" v-if="!isLoading && results.length == 0">当前集群下暂时还没有节点。</p>
<table class="ui table selectable" v-if="results.length > 0">
<thead>
<tr>
<th class="three wide">节点名称</th>
<th>检查结果</th>
<th class="two op">独立设置</th>
</tr>
</thead>
<tbody v-for="result in results">
<tr>
<td>
<a :href="'/clusters/cluster/node?clusterId=' + clusterId + '&nodeId=' + result.nodeId">{{result.nodeName}}</a>
<div v-if="result.isPrior">
<a :href="'/clusters/cluster/node/settings/ddos-protection?clusterId=' + clusterId + '&nodeId=' + result.nodeId"><grey-label>定制</grey-label></a>
</div>
</td>
<td>
<span class="green" v-if="result.isOk">{{result.message}}</span>
<span class="red" v-if="!result.isOk">{{result.message}}</span>
</td>
<td>
<a :href="'/clusters/cluster/node/settings/ddos-protection?clusterId=' + clusterId + '&nodeId=' + result.nodeId">设置</a>
</td>
</tr>
</tbody>
</table>
<div class="margin"></div>
<a href="" @click.prevent="reload">[刷新]</a>
</div>

View File

@@ -0,0 +1,20 @@
Tea.context(function () {
this.isLoading = true
this.results = []
this.$delay(function () {
this.reload()
})
this.reload = function () {
this.isLoading = true
this.$post("$")
.params({ clusterId: this.clusterId })
.success(function (resp) {
this.results = resp.data.results
})
.done(function () {
this.isLoading = false
})
}
})