app block增加DKC=8自定义域(userRegion4)

This commit is contained in:
duandongmei
2019-01-10 15:47:52 +06:00
parent 1cc208d5ff
commit f9a39c7801
4 changed files with 20 additions and 13 deletions

View File

@@ -1021,8 +1021,8 @@ public class AppCfgService extends BaseService {
userRegion+=Constants.USER_REGION_SPLIT +Constants.INTERCEPT_IP_RATELIMIT_BANDWITH_USER_REGION_KEY+"="+entity.getUserRegion3();
}
}
//VIGNORE=1
if(StringUtil.isEmpty(entity.getUserRegion4())){
//DKC=8
if(!StringUtil.isEmpty(entity.getUserRegion4())){
userRegion+=Constants.USER_REGION_SPLIT +Constants.APP_VIGNORE_USER_REGION_KEY+"=1";
}
userRegion+=Constants.USER_REGION_SPLIT+"config_id="+entity.getCompileId();

View File

@@ -557,7 +557,7 @@ max_allowed_packet=1048576
http_max_connection=1000
default_max_perroute=100
poolcm_socket_timeout=3000
app_vignore_user_region_key=VIGNORE
app_vignore_user_region_key=DKC
#policies\u83dc\u5355\u7684\u83dc\u5355ID
policies_menu_id=86
userCreate=UserCreate

View File

@@ -8,6 +8,11 @@ $(function(){
$(".ratelimitAction").find("input[name='userRegion1']").on("change",function(){
switchRateLimitType();
});
if($(".action:checked").val()==16){
$(".dnsIpSpoofing").removeClass("hidden");
}else{
$(".dnsIpSpoofing").addClass("hidden");
}
$(".action").on("change", function() {
$("#serviceId").val($(this).attr("serviceId"));
$("#protocolId").val($(this).attr("protocolId"));
@@ -24,6 +29,11 @@ $(function(){
if($(this).val()==1){
$(".ipPortAdd").click();
}
if($(".action:checked").val()==16){
$(".dnsIpSpoofing").removeClass("hidden");
}else{
$(".dnsIpSpoofing").addClass("hidden");
}
switchAction($(this).val());
});
$("#serviceId").val($(".action:checked").attr("serviceId"));
@@ -316,10 +326,10 @@ var delContent = function(contentClassName, addBtnClassName) {
<div for="action"></div>
</div>
</div>
<div class="col-md-6 hidden">
<div class="col-md-6 dnsIpSpoofing hidden">
<div class="form-group">
<label class="control-label col-md-3">
<input type="checkbox" name="userRegion4" class="child-checks" <%-- <c:if test="${_cfg.userRegion4 eq '1' }"> --%>checked<%-- </c:if> --%> value="1">
<input type="checkbox" name="userRegion4" class="child-checks" <c:if test='${_cfg.userRegion4 eq "8" }'> checked</c:if> value="8">
</label>
<div class="col-md-6">
<label class="control-label">

View File

@@ -384,7 +384,7 @@
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="sort-column r.compile_id" style="display: none" column="cfg_id" ><spring:message code="cfg_id"/></th>
<th class="sort-column r.cfg_desc cfgDesc" column="config_describe" ><spring:message code="config_describe"/></th>
<%-- <th><spring:message code="block_by_app_server_ip"/></th> --%>
<th column="user_region4" ><spring:message code="block_by_app_server_ip"/></th>
<th class="sort-column r.action" column="block_type" ><spring:message code="block_type"/></th>
<th column="ratelimit" ><spring:message code="ratelimit"/></th>
<th column="social_app" ><spring:message code="social_app"/></th>
@@ -415,14 +415,11 @@
</td>
<td>${cfg.compileId }</td>
<td>${cfg.cfgDesc }</td>
<%-- <td>
<c:if test="${cfg.userRegion4 eq '1'}">
<spring:message code="yes"/>
<td>
<c:if test="${cfg.userRegion4 eq '8'}">
<spring:message code="block_by_app_server_ip"/>
</c:if>
<c:if test="${empty cfg.userRegion4}">
<spring:message code="no"/>
</c:if>
</td> --%>
</td>
<td>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq cfg.action }">