mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-06 14:50:25 +08:00
在WAF规则产生错误时给予提示
This commit is contained in:
@@ -6,6 +6,13 @@ Vue.component("http-firewall-rule-label", {
|
||||
rule: this.vRule
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showErr: function (err) {
|
||||
|
||||
teaweb.popupTip("规则校验错误,请修正:<span class=\"red\">" + teaweb.encodeHTML(err) + "</span>")
|
||||
},
|
||||
|
||||
},
|
||||
template: `<div>
|
||||
<div class="ui label tiny basic">
|
||||
{{rule.name}}[{{rule.param}}]
|
||||
@@ -19,6 +26,8 @@ Vue.component("http-firewall-rule-label", {
|
||||
<var :class="{dash:rule.isCaseInsensitive}" :title="rule.isCaseInsensitive ? '大小写不敏感':''" v-if="!rule.isComposed">{{rule.operator}}</var>
|
||||
{{rule.value}}
|
||||
</span>
|
||||
|
||||
<a href="" v-if="rule.err != null && rule.err.length > 0" @click.prevent="showErr(rule.err)" style="color: #db2828; opacity: 1; border-bottom: 1px #db2828 dashed; margin-left: 0.5em">规则错误</a>
|
||||
</div>
|
||||
</div>`
|
||||
})
|
||||
Reference in New Issue
Block a user