集群可以设置默认的WAF策略、缓存策略

This commit is contained in:
刘祥超
2020-12-17 15:50:44 +08:00
parent 5c4d3c31f0
commit 65384082f7
100 changed files with 1172 additions and 488 deletions

View File

@@ -0,0 +1,19 @@
{$layout}
{$template "/left_menu"}
<div class="right-box">
<form class="ui form" method="post" data-tea-action="$" data-tea-success="success">
<csrf-token></csrf-token>
<input type="hidden" name="clusterId" :value="clusterId"/>
<table class="ui table definition selectable">
<tr>
<td class="title">选择缓存策略 *</td>
<td>
<http-cache-policy-selector :v-cache-policy="cachePolicy"></http-cache-policy-selector>
<p class="comment">部署在当前集群上的所有服务都会自动使用此策略,只是服务可以自定义是否开启。</p>
</td>
</tr>
</table>
<submit-btn></submit-btn>
</form>
</div>

View File

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

View File

@@ -0,0 +1,19 @@
{$layout}
{$template "/left_menu"}
<div class="right-box">
<form class="ui form" method="post" data-tea-action="$" data-tea-success="success">
<csrf-token></csrf-token>
<input type="hidden" name="clusterId" :value="clusterId"/>
<table class="ui table definition selectable">
<tr>
<td class="title">选择WAF策略 *</td>
<td>
<http-firewall-policy-selector :v-http-firewall-policy="firewallPolicy"></http-firewall-policy-selector>
<p class="comment">部署在当前集群上的所有服务都会自动使用此策略,只是服务可以自定义是否开启。</p>
</td>
</tr>
</table>
<submit-btn></submit-btn>
</form>
</div>

View File

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

View File

@@ -9,6 +9,18 @@
<td class="title">集群名称 *</td>
<td><input type="text" name="name" maxlength="50" ref="focus"/></td>
</tr>
<tr>
<td>默认缓存设置 *</td>
<td>
<http-cache-policy-selector></http-cache-policy-selector>
</td>
</tr>
<tr>
<td>默认WAF设置 *</td>
<td>
<http-firewall-policy-selector></http-firewall-policy-selector>
</td>
</tr>
</table>
<h4>节点安装选项</h4>

View File

@@ -2,18 +2,12 @@
<h3>选择认证</h3>
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
<input type="hidden" name="grantId" :value="grantId"/>
<table class="ui table selectable definition">
<tr>
<td class="title">选择认证</td>
<td>
<span v-if="grants.length == 0">暂时还没有可用的认证。</span>
<a class="ui label small basic" v-for="grant in grants" :class="{blue:grantId == grant.id}" @click.prevent="selectGrant(grant)" style="margin-bottom:0.5em">{{grant.name}} <span class="small">{{grant.methodName}}</span></a>
<p class="comment">请点击选中某个认证。</p>
</td>
</tr>
</table>
<submit-btn>确定</submit-btn>
</form>
<table class="ui table definition">
<tr>
<td>
<span v-if="grants.length == 0">暂时还没有可用的认证。</span>
<a class="ui label small basic" v-for="grant in grants" :class="{blue:grantId == grant.id}" @click.prevent="selectGrant(grant)" style="margin-bottom:0.5em">{{grant.name}} <span class="small">{{grant.methodName}}</span></a>
<p class="comment">请点击选中某个认证。</p>
</td>
</tr>
</table>

View File

@@ -2,8 +2,11 @@ Tea.context(function () {
this.grantId = 0;
this.selectGrant = function (grant) {
this.grantId = grant.id;
NotifyPopup({
code: 200,
data: {
grant: grant
}
})
};
this.success = NotifyPopup;
});