proxy intercept ip功能完成
http\dns\ssl\mail dolog添加
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
<mapping path="/nis/basicprotocol/ajax*" exclue="true"/>
|
||||
<mapping path="/nis/encryptedtunnelbehav/ajax*" exclue="true"/>
|
||||
<mapping path="/nis/ntc/av/ajax*" exclue="true"/>
|
||||
<mapping path="/proxy/intercept/ajax*" exclue="true"/>
|
||||
<!-- 对同一路径,启用多个装饰器 -->
|
||||
<mapping>
|
||||
<path>/articles/*</path>
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion1"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('REPLACE_ZONE')}" var="replaceZoneC">
|
||||
<c:forEach items="${fns:getDictList('CONTROL_REPLACE_ZONE')}" var="replaceZoneC">
|
||||
<option value="${replaceZoneC.itemCode}" <c:if test="${_cfg.userRegion1==replaceZoneC.itemCode || _cfg.userRegion1==null}">selected</c:if>><spring:message code="${replaceZoneC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
|
||||
@@ -16,12 +16,6 @@
|
||||
$("#cancel").on("click", function() {
|
||||
window.history.back();
|
||||
});
|
||||
setDefaultInfo();
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
setDefaultInfo();
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate(
|
||||
@@ -82,24 +76,25 @@
|
||||
$(this).remove();
|
||||
});
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
var action=$("input[name='action']").val();
|
||||
var action=$("input[name='action']:checked").val();
|
||||
if(action==1){ //监测
|
||||
$("input[name='userRegion2']").val("");
|
||||
$("select[name='userRegion3']").val();
|
||||
$("select[name='userRegion3']").val("");
|
||||
$("input[name='userRegion4']").val("");
|
||||
$("input[name='userRegion5']").val("");
|
||||
}else if(action==64){//限速
|
||||
$("select[name='userRegion1']").val("");
|
||||
$("select[name='userRegion3']").val();
|
||||
$("select[name='userRegion3']").val("");
|
||||
$("input[name='userRegion4']").val("");
|
||||
$("input[name='userRegion5']").val("");
|
||||
}else if(action==80){//替换
|
||||
$("input[name='userRegion1']").val("");
|
||||
$("input[name='userRegion2']").val("");
|
||||
}else {//白名单
|
||||
$("select[name='userRegion1']").val();
|
||||
$("input[name='userRegion2']").val("");
|
||||
$("select[name='userRegion3']").val();
|
||||
}else {//白名单
|
||||
$("select[name='userRegion1']").val("");
|
||||
$("input[name='userRegion2']").val("");
|
||||
$("select[name='userRegion3']").val("");
|
||||
$("input[name='userRegion4']").val("");
|
||||
$("input[name='userRegion5']").val("");
|
||||
}
|
||||
@@ -118,72 +113,7 @@
|
||||
}); */
|
||||
|
||||
});
|
||||
var setDefaultInfo=function(){
|
||||
var action=$("input[name='action']").val();
|
||||
var serviceRegionType="";
|
||||
var protocolNamePrefix="";
|
||||
$("input[name$='configServiceType']").each(function(){
|
||||
//替换动作非tcp
|
||||
var serviceRegionTypeValue=$(this).val();
|
||||
var serviceRegionTypeValue=$(this).attr("name");
|
||||
if(serviceRegionTypeValue.indexOf(".") >-1){
|
||||
serviceRegionTypeValue=serviceRegionTypeValue.substring(0,serviceRegionTypeValue.indexOf(".")+1);
|
||||
}else{
|
||||
serviceRegionTypeValue="";
|
||||
}
|
||||
if(serviceRegionType == 'intercept_ratelimit'){
|
||||
serviceRegionType=serviceRegionTypeValue;
|
||||
protocolNamePrefix=serviceRegionTypeValue;
|
||||
}
|
||||
});
|
||||
|
||||
if(action==1){
|
||||
//监测
|
||||
$(".monitAction").removeClass("hidden");
|
||||
$(".monitAction").find(".hidden").removeClass("hidden");
|
||||
$(".monitAction").find("[disabled=disabled]").attr("disabled","");
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
$(".replaceAction").addClass("hidden");
|
||||
if(serviceRegionType == 'intercept_ratelimit'){
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=1]").hide();
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=6]").show();
|
||||
}
|
||||
}else if(action==64){
|
||||
//限速
|
||||
$(".monitAction").addClass("hidden");
|
||||
$(".ratelimitAction").removeClass("hidden");
|
||||
$(".ratelimitAction").find(".hidden").removeClass("hidden");
|
||||
$(".ratelimitAction").find("[disabled=disabled]").attr("disabled","");
|
||||
$(".replaceAction").addClass("hidden");
|
||||
if(serviceRegionType == 'intercept_ratelimit'){
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=1]").hide();
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=6]").show();
|
||||
}
|
||||
}else if(action==80){
|
||||
//替换
|
||||
$(".monitAction").addClass("hidden");
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
$(".replaceAction").removeClass("hidden");
|
||||
$(".replaceAction").find(".hidden").removeClass("hidden");
|
||||
$(".replaceAction").find("[disabled=disabled]").attr("disabled","");
|
||||
if(serviceRegionType == 'intercept_ratelimit'){
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=1]").show();
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=6]").hide();
|
||||
}
|
||||
|
||||
|
||||
}else {
|
||||
//白名单
|
||||
$(".monitAction").hide();
|
||||
$(".ratelimitAction").hide();
|
||||
$(".replaceAction").hide();
|
||||
if(serviceRegionType == 'intercept_ratelimit'){
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=1]").hide();
|
||||
$("select[name="+protocolNamePrefix+"'protocol']").find("option[value=6]").show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
@@ -229,7 +159,7 @@
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/ntc/website/saveDnsCfg"
|
||||
<form id="cfgFrom" action="${ctx}/proxy/intercept/ip/saveOrUpdate"
|
||||
method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
@@ -278,9 +208,33 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- dolog begin-->
|
||||
<div class="row doLog">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:choose>
|
||||
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- dolog end-->
|
||||
<%-- action 为1 监测时 可以选择证书--%>
|
||||
<div class="row monitAction hidden">
|
||||
<div class="col-md-6 policy">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="policy_name" /></label>
|
||||
@@ -298,9 +252,9 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ratelimit"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required number" range="[0,100]" type="text" name="userRegion2">
|
||||
<input class="form-control required number" range="[0,100]" type="text" name="userRegion2" value="${_cfg.userRegion2 }">
|
||||
</div>
|
||||
<div for="ratelimit"></div>
|
||||
<div for="userRegion2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -319,12 +273,13 @@
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion3"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('REPLACE_ZONE')}" var="replaceZoneC">
|
||||
<option value="" ><spring:message code="selected"/></option>
|
||||
<c:forEach items="${fns:getDictList('INTERCEPT_REPLACE_ZONE')}" var="replaceZoneC">
|
||||
<option value="${replaceZoneC.itemCode}" <c:if test="${_cfg.userRegion3==replaceZoneC.itemCode || _cfg.userRegion3==null}">selected</c:if>><spring:message code="${replaceZoneC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion1"></div>
|
||||
<div for="userRegion3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -391,7 +346,7 @@
|
||||
</c:if>
|
||||
<c:if test="${region.regionType eq 2 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<h4 class="form-section ${region.configServiceType }">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
@@ -402,10 +357,10 @@
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(_cfg.interceptPktBinList)>0}">
|
||||
<c:set var="isBreak" value="false" ></c:set>
|
||||
<c:forEach items="${_cfg.domainList}" var="cfg">
|
||||
<c:forEach items="${_cfg.interceptPktBinList}" var="cfg">
|
||||
<c:choose>
|
||||
<c:when test="${region.configRegionValue eq cfg.cfgType and !isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index}">
|
||||
<div class="row boxSolid ${region.configServiceType }_div ${tabName}${status.index}">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="isBreak" value="true" ></c:set>
|
||||
@@ -414,14 +369,14 @@
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:if test="${!isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<div class="row boxSolid ${region.configServiceType }_div ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="complexCfgIndex" value="${complexCfgIndex+1 }"></c:set>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<div class="row boxSolid ${region.configServiceType }_div ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="complexCfgIndex" value="${complexCfgIndex+1 }"></c:set>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/ntc/website/ajaxDnsSubList',
|
||||
url:'${ctx}/proxy/intercept/ajaxInterceptIpSubList',
|
||||
data:{"cfgId":cfgId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
@@ -102,7 +102,7 @@
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/proxy/intercept/interceptIpList?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/proxy/intercept/ip/list?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
@@ -150,8 +150,8 @@
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="intercept:ip:config">
|
||||
<sys:delRow url="${ctx}/ntc/website/dnsForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/website/updateDnsCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/proxy/intercept/interceptIpForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/proxy/intercept/updateInterceptIpValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="intercept:ip:confirm">
|
||||
<div class="btn-group">
|
||||
@@ -311,6 +311,7 @@
|
||||
<th><spring:message code="replaced_content"/></th>
|
||||
<th><spring:message code="replace_content"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -342,7 +343,7 @@
|
||||
${indexCfg.userRegion2 }
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('REPLACE_ZONE')}" var="replaceZoneC">
|
||||
<c:forEach items="${fns:getDictList('INTERCEPT_REPLACE_ZONE')}" var="replaceZoneC">
|
||||
<c:if test="${indexCfg.userRegion3==replaceZoneC.itemCode}">
|
||||
<spring:message code="${replaceZoneC.itemValue}"/>
|
||||
</c:if>
|
||||
@@ -361,6 +362,13 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.doLog }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -120,17 +120,10 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${region[0] eq 3 }">
|
||||
<c:forEach items="${_cfg.domainList}" var="cfg">
|
||||
<c:if test="${region[0] eq 2 }">
|
||||
<c:forEach items="${_cfg.interceptPktBinList}" var="cfg">
|
||||
<c:if test="${region[1] eq cfg.cfgType }">
|
||||
<div id="${region[1]}Info${index}" class="content" name="subCfg${index}">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='district' />:</label><label>${cfg.district }</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
|
||||
@@ -197,6 +197,30 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- dolog begin-->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:choose>
|
||||
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- dolog end-->
|
||||
<c:set var="ipCfgIndex" value="0"></c:set>
|
||||
<c:set var="complexCfgIndex" value="0"></c:set>
|
||||
<c:set var="digestCfgIndex" value="0"></c:set>
|
||||
|
||||
@@ -307,6 +307,7 @@
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th class="cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -338,6 +339,13 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.doLog }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -592,7 +592,7 @@
|
||||
</c:if>
|
||||
<c:if test="${action == 80}">
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('REPLACE_ZONE') }" var="dict3">
|
||||
<c:forEach items="${fns:getDictList('CONTROL_REPLACE_ZONE') }" var="dict3">
|
||||
<c:if test="${dict3.itemCode eq indexCfg.userRegion1 }">
|
||||
<spring:message code="${dict3.itemValue }"/>
|
||||
</c:if>
|
||||
|
||||
@@ -190,6 +190,26 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:choose>
|
||||
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 policy">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
|
||||
@@ -307,6 +307,7 @@
|
||||
<th class="cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="policy_name"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -343,6 +344,13 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.doLog }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -258,6 +258,30 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- dolog begin-->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:choose>
|
||||
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- dolog end-->
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<c:if test="${region.regionType eq 1 }">
|
||||
<!--ip info-->
|
||||
|
||||
@@ -464,6 +464,7 @@
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th class="cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -495,6 +496,13 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.doLog }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -191,6 +191,30 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- dolog begin-->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:choose>
|
||||
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- dolog end-->
|
||||
<c:set var="ipCfgIndex" value="0"></c:set>
|
||||
<c:set var="strCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
|
||||
@@ -306,6 +306,7 @@
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th class="cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
@@ -337,6 +338,13 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.doLog }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
|
||||
@@ -63,12 +63,10 @@ $(function(){
|
||||
$("select[name$='portPattern']").on("change",function(){
|
||||
switchIpInfo(this);
|
||||
});
|
||||
|
||||
switchAction($("input[name='action']:checked").val());
|
||||
//DNS REJECT 时选择dnsStrategyId
|
||||
$("input[name='action']").on('change',function(){
|
||||
var action=$(this).val();
|
||||
switchAction(action);
|
||||
});
|
||||
setInterceptDefaultInfo($("input[name='cfgId']").val());
|
||||
|
||||
$(".glyphicon-plus").on("click",function(){
|
||||
var obj=$(this).parents(".form-section").next(".container-fluid").clone();
|
||||
var len=$(this).parents("div").find(".container-fluid:visible").size();
|
||||
@@ -360,6 +358,23 @@ $(function(){
|
||||
}
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
//DNS REJECT 时选择dnsStrategyId
|
||||
var action=$("input[name='action']:checked").val();
|
||||
switchAction(action);
|
||||
|
||||
//拦截根据action切换动作部分
|
||||
setInterceptDefaultInfo("");
|
||||
|
||||
//dolog 白名单默认不显示,不记录日志
|
||||
if(action == 128 || action == 32){
|
||||
$(".doLog").addClass("hidden");
|
||||
$("input[name='doLog'][value=0]").prop("checked",true);
|
||||
}else{
|
||||
$(".doLog").removeClass("hidden");
|
||||
$("input[name='doLog'][value=2]").prop("checked",true);
|
||||
|
||||
}
|
||||
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
var actionCode=$(this).val();
|
||||
@@ -641,7 +656,83 @@ window.onload=function(){
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
var setInterceptDefaultInfo=function(cfgId){
|
||||
var action=$("input[name='action']:checked").val();
|
||||
var interceptRatelimitIp="";
|
||||
var interceptReplacePktBin="";
|
||||
var protocolNamePrefix="";
|
||||
//查找当前业务中的serviceRegionType,是否存在intercept_ratelimit_ip
|
||||
$("input[name$='configServiceType']").each(function(){
|
||||
//替换动作非tcp
|
||||
var serviceRegionTypeValue=$(this).val();
|
||||
var serviceRegionTypeName=$(this).attr("name");
|
||||
if(serviceRegionTypeName.indexOf(".") >-1){
|
||||
serviceRegionTypeName=serviceRegionTypeName.substring(0,serviceRegionTypeName.indexOf(".")+1);
|
||||
}else{
|
||||
serviceRegionTypeName="";
|
||||
}
|
||||
if(serviceRegionTypeValue == 'intercept_ratelimit_ip'){
|
||||
interceptRatelimitIp=serviceRegionTypeValue;
|
||||
protocolNamePrefix=serviceRegionTypeName;
|
||||
}
|
||||
if(serviceRegionTypeValue == 'intercept_replace_pkt_bin'){
|
||||
interceptReplacePktBin=serviceRegionTypeValue;
|
||||
}
|
||||
});
|
||||
|
||||
if(action==1){
|
||||
//监测
|
||||
$(".monitAction").removeClass("hidden");
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
$(".replaceAction").addClass("hidden");
|
||||
if(interceptRatelimitIp == 'intercept_ratelimit_ip'){
|
||||
//TODO隐藏不可选IP 协议
|
||||
}
|
||||
if(interceptReplacePktBin == 'intercept_replace_pkt_bin'){
|
||||
$("."+interceptReplacePktBin).addClass("hidden");
|
||||
$("."+interceptReplacePktBin+"_div").addClass("hidden");
|
||||
}
|
||||
}else if(action==64){
|
||||
//限速
|
||||
$(".monitAction").addClass("hidden");
|
||||
$(".ratelimitAction").removeClass("hidden");
|
||||
$(".replaceAction").addClass("hidden");
|
||||
if(interceptRatelimitIp == 'intercept_ratelimit_ip'){
|
||||
//TODO隐藏不可选IP 协议
|
||||
}
|
||||
if(interceptReplacePktBin == 'intercept_replace_pkt_bin'){
|
||||
$("."+interceptReplacePktBin).addClass("hidden");
|
||||
$("."+interceptReplacePktBin+"_div").addClass("hidden");
|
||||
}
|
||||
}else if(action==80){
|
||||
//替换
|
||||
$(".monitAction").addClass("hidden");
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
$(".replaceAction").removeClass("hidden");
|
||||
if(interceptRatelimitIp == 'intercept_ratelimit_ip'){
|
||||
//TODO隐藏不可选IP 协议
|
||||
}
|
||||
if(interceptReplacePktBin == 'intercept_replace_pkt_bin' && cfgId == ""){
|
||||
$("."+interceptReplacePktBin).removeClass("hidden");
|
||||
$("."+interceptReplacePktBin).find("span").removeClass("hidden");
|
||||
}
|
||||
|
||||
|
||||
}else {
|
||||
//白名单
|
||||
$(".monitAction").addClass("hidden");
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
$(".replaceAction").addClass("hidden");
|
||||
if(interceptRatelimitIp == 'intercept_ratelimit'){
|
||||
//TODO隐藏不可选IP 协议
|
||||
}
|
||||
if(interceptReplacePktBin == 'intercept_replace_pkt_bin'){
|
||||
$("."+interceptReplacePktBin).addClass("hidden");
|
||||
$("."+interceptReplacePktBin+"_div").addClass("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//0 非十六进制 大小不敏感 1 十六进制,大小写不敏感 2非十六进制 大小写敏感
|
||||
var setIsHexBin=function(obj){
|
||||
var profix="";
|
||||
|
||||
Reference in New Issue
Block a user