实现新的CC

This commit is contained in:
刘祥超
2021-07-19 10:48:53 +08:00
parent 7d8f3a9d9b
commit 3360f2fc08
10 changed files with 164 additions and 5 deletions

View File

@@ -0,0 +1,24 @@
// 显示WAF规则的标签
Vue.component("http-firewall-rule-label", {
props: ["v-rule"],
data: function () {
return {
rule: this.vRule
}
},
template: `<div>
<div class="ui label tiny basic">
{{rule.name}}[{{rule.param}}]
<!-- cc2 -->
<span v-if="rule.param == '\${cc2}'">
{{rule.checkpointOptions.period}}秒/{{rule.checkpointOptions.threshold}}请求
</span>
<span v-else>
<span v-if="rule.paramFilters != null && rule.paramFilters.length > 0" v-for="paramFilter in rule.paramFilters"> | {{paramFilter.code}}</span>
<var :class="{dash:rule.isCaseInsensitive}" :title="rule.isCaseInsensitive ? '大小写不敏感':''" v-if="!rule.isComposed">{{rule.operator}}</var>
{{rule.value}}
</span>
</div>
</div>`
})