mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-27 05:00:25 +08:00
WAF支持更多动作
This commit is contained in:
@@ -26,42 +26,12 @@
|
||||
<p class="comment">{{selectedConnectorDescription}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td :class="{'color-border':action == 'go_group' || action == 'go_set'}">动作</td>
|
||||
<td>
|
||||
<select class="ui dropdown auto-width" name="action" v-model="action">
|
||||
<option v-for="a in actions" :value="a.code">{{a.name}}({{a.code.toUpperCase()}})</option>
|
||||
</select>
|
||||
<p class="comment">匹配当前规则集后要执行的动作。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="action == 'go_group'">
|
||||
<td class="color-border">下一个规则分组</td>
|
||||
<td>
|
||||
<select class="ui dropdown" name="action_groupId" style="width:12em" v-model="actionGroupId">
|
||||
<option v-for="g in firewallPolicy.inbound.groups" :value="g.id">{{g.name}}</option>
|
||||
</select>
|
||||
<p class="comment">当动作为"跳到下一个规则分组"时出现此选择。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="action == 'go_set'">
|
||||
<td class="color-border">下一个规则分组</td>
|
||||
<td>
|
||||
<select class="ui dropdown" name="action_groupId" style="width:12em" v-model="actionGroupId">
|
||||
<option v-for="g in firewallPolicy.inbound.groups" :value="g.id">{{g.name}}</option>
|
||||
</select>
|
||||
<p class="comment">当动作为"跳到下一个规则集"时出现此选择。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="action == 'go_set'">
|
||||
<td class="color-border">下一个规则集</td>
|
||||
<td>
|
||||
<select class="ui dropdown" name="action_setId" style="width:12em" v-model="actionSetId">
|
||||
<option v-for="r in groupSets(actionGroupId)" :value="r.id">{{r.name}}</option>
|
||||
</select>
|
||||
<p class="comment">当动作为"跳到下一个规则集"时出现此选择。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>执行动作 *</td>
|
||||
<td>
|
||||
<http-firewall-actions-box :v-actions="actions" :v-firewall-policy="firewallPolicy"></http-firewall-actions-box>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
@@ -31,7 +31,7 @@
|
||||
<th style="width:3em"></th>
|
||||
<th nowrap="">规则集名称</th>
|
||||
<th nowrap="">规则</th>
|
||||
<th nowrap="" class="center">关系</th>
|
||||
<th nowrap="" class="center one wide">关系</th>
|
||||
<th nowrap="">动作</th>
|
||||
<th class="three op">操作</th>
|
||||
</tr>
|
||||
@@ -50,11 +50,12 @@
|
||||
</div>
|
||||
<span class="ui disabled" v-if="set.rules.length == 0">暂时还没有规则</span>
|
||||
</td>
|
||||
<td class="center">{{set.connector.toUpperCase()}}</td>
|
||||
<td nowrap=""><span :class="{red:set.action == 'BLOCK' || set.action == 'CAPTCHA', green:set.action != 'BLOCK' && set.action != 'CAPTCHA'}">{{set.actionName}}[{{set.action.toUpperCase()}}]</span>
|
||||
<div v-if="set.actionLinks != null && set.actionLinks.length > 0" style="margin-top:0.3em">
|
||||
<span class="disabled">-></span> <span v-for="link in set.actionLinks"><a :href="link.url"><span class="disabled">[{{link.name}}]</span></a> </span>
|
||||
</div>
|
||||
<td class="center">
|
||||
<span v-if="set.connector.toUpperCase() == 'OR'">或</span><span v-else>和</span>
|
||||
<span class="small grey">({{set.connector.toUpperCase()}})</span>
|
||||
</td>
|
||||
<td nowrap="">
|
||||
<http-firewall-actions-view :v-actions="set.actions"></http-firewall-actions-view>
|
||||
</td>
|
||||
<td>
|
||||
<a href="" @click.prevent="updateSet(set.id)">修改</a> <a href="" @click.prevent="updateSetOn(set.id, false)" v-if="set.isOn">停用</a><a href="" @click.prevent="updateSetOn(set.id, true)" v-if="!set.isOn">启用</a> <a href="" @click.prevent="deleteSet(set.id)">删除</a>
|
||||
|
||||
Reference in New Issue
Block a user