优化路由规则标签、菜单、删除UAM组件

This commit is contained in:
刘祥超
2023-03-09 11:42:15 +08:00
parent 9d6a3a8a0d
commit 8ccd41b551
5 changed files with 16 additions and 85 deletions

View File

@@ -43,6 +43,12 @@ Vue.component("http-location-labels", {
<!-- 反向代理 -->
<http-location-labels-label v-if="refIsOn(location.reverseProxyRef, location.reverseProxy)" :v-href="url('/reverseProxy')">源站</http-location-labels-label>
<!-- UAM -->
<http-location-labels-label v-if="location.web != null && location.web.uam != null && location.web.uam.isPrior"><span :class="{disabled: !location.web.uam.isOn, red:location.web.uam.isOn}">5秒盾</span></http-location-labels-label>
<!-- CC -->
<http-location-labels-label v-if="location.web != null && location.web.cc != null && location.web.cc.isPrior"><span :class="{disabled: !location.web.cc.isOn, red:location.web.cc.isOn}">CC防护</span></http-location-labels-label>
<!-- WAF -->
<!-- TODO -->

View File

@@ -1,68 +0,0 @@
// UAM模式配置
Vue.component("uam-config-box", {
props: ["v-uam-config", "v-is-location", "v-is-group"],
data: function () {
let config = this.vUamConfig
if (config == null) {
config = {
isPrior: false,
isOn: false,
onlyURLPatterns: [],
exceptURLPatterns: []
}
}
if (config.onlyURLPatterns == null) {
config.onlyURLPatterns = []
}
if (config.exceptURLPatterns == null) {
config.exceptURLPatterns = []
}
return {
config: config,
moreOptionsVisible: false
}
},
methods: {
showMoreOptions: function () {
this.moreOptionsVisible = !this.moreOptionsVisible
}
},
template: `<div>
<input type="hidden" name="uamJSON" :value="JSON.stringify(config)"/>
<table class="ui table definition selectable">
<prior-checkbox :v-config="config" v-if="vIsLocation || vIsGroup"></prior-checkbox>
<tbody v-show="((!vIsLocation && !vIsGroup) || config.isPrior)">
<tr>
<td class="title">启用5秒盾</td>
<td>
<checkbox v-model="config.isOn"></checkbox>
<p class="comment"><plus-label></plus-label>启用后,访问网站时,自动检查浏览器环境,阻止非正常访问。</p>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2"><more-options-indicator @change="showMoreOptions"></more-options-indicator></td>
</tr>
</tbody>
<tbody v-show="moreOptionsVisible">
<tr>
<td>例外URL</td>
<td>
<url-patterns-box v-model="config.exceptURLPatterns"></url-patterns-box>
<p class="comment">如果填写了例外URL表示这些URL跳过5秒盾不做处理。</p>
</td>
</tr>
<tr>
<td>限制URL</td>
<td>
<url-patterns-box v-model="config.onlyURLPatterns"></url-patterns-box>
<p class="comment">如果填写了支持URL表示只对这些URL进行5秒盾处理如果不填则表示支持所有的URL。</p>
</td>
</tr>
</tr>
</tbody>
</table>
<div class="margin"></div>
</div>`
})