域名拦截功能完成
This commit is contained in:
@@ -78,7 +78,11 @@
|
||||
<!-- 此配置的关键词不允许输入多个关键词 -->
|
||||
<c:if test="${(region.configMultiKeywords eq 0) or (empty region.configMultiKeywords)}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required invisibleChar" type="text"
|
||||
|
||||
<input class="form-control required invisibleChar
|
||||
<c:if test="${fn:contains(region.configServiceType,'domain') }"> domainCheck </c:if>
|
||||
"
|
||||
type="text"
|
||||
name="${cfgName}.cfgKeywords"
|
||||
value="${cfg.cfgKeywords}">
|
||||
</div>
|
||||
|
||||
@@ -144,11 +144,20 @@
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
|
||||
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
|
||||
<div class="page-content">
|
||||
<h3 class="page-title">
|
||||
<spring:message code="ip_intercept"></spring:message>
|
||||
<!-- fucntion_ID 200-IP 201-DOMAIN -->
|
||||
<c:if test="${_cfg.functionId eq 200}">
|
||||
<spring:message code="ip_intercept"></spring:message>
|
||||
<c:set var="interceptType" value="Ip"/>
|
||||
</c:if>
|
||||
<c:if test="${_cfg.functionId eq 201}">
|
||||
<spring:message code="domain_intercept"></spring:message>
|
||||
<c:set var="interceptType" value="Domain"/>
|
||||
</c:if>
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -166,7 +175,7 @@
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/proxy/intercept/ip/saveOrUpdate"
|
||||
<form id="cfgFrom" action="${ctx}/proxy/intercept/${fn:toLowerCase(interceptType) }/saveOrUpdate"
|
||||
method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
@@ -319,6 +328,7 @@
|
||||
</div>
|
||||
<c:set var="ipCfgIndex" value="0"></c:set>
|
||||
<c:set var="complexCfgIndex" value="0"></c:set>
|
||||
<c:set var="domainCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<c:if test="${region.regionType eq 1 }">
|
||||
<!--ip info-->
|
||||
@@ -352,43 +362,84 @@
|
||||
<!--/ip info-->
|
||||
</c:if>
|
||||
<c:if test="${region.regionType eq 2 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section ${region.configServiceType }">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="interceptPktBinList[${complexCfgIndex}]"></c:set>
|
||||
<%-- <c:set var="regionValue" value="${region.configRegionValue}"></c:set> --%>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(_cfg.interceptPktBinList)>0}">
|
||||
<c:set var="isBreak" value="false" ></c:set>
|
||||
<c:forEach items="${_cfg.interceptPktBinList}" var="cfg">
|
||||
<c:choose>
|
||||
<c:when test="${region.configRegionValue eq cfg.cfgType and !isBreak}">
|
||||
<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>
|
||||
<c:set var="complexCfgIndex" value="${complexCfgIndex+1 }"></c:set>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:if test="${!isBreak}">
|
||||
<div class="row boxSolid ${region.configServiceType }_div ${tabName}${status.index} hidden disabled">
|
||||
<c:if test="${region.configServiceType eq 'intercept_replace_pkt_bin'}">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section ${region.configServiceType }">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="interceptPktBinList[${complexCfgIndex}]"></c:set>
|
||||
<%-- <c:set var="regionValue" value="${region.configRegionValue}"></c:set> --%>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(_cfg.interceptPktBinList)>0}">
|
||||
<c:set var="isBreak" value="false" ></c:set>
|
||||
<c:forEach items="${_cfg.interceptPktBinList}" var="cfg">
|
||||
<c:choose>
|
||||
<c:when test="${region.configRegionValue eq cfg.cfgType and !isBreak}">
|
||||
<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>
|
||||
<c:set var="complexCfgIndex" value="${complexCfgIndex+1 }"></c:set>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:if test="${!isBreak}">
|
||||
<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 ${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 ${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:otherwise>
|
||||
</c:choose>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<c:if test="${region.configServiceType eq 'intercept_domain'}">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section ${region.configServiceType }">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="httpUrlList[${domainCfgIndex}]"></c:set>
|
||||
<%-- <c:set var="regionValue" value="${region.configRegionValue}"></c:set> --%>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(_cfg.httpUrlList)>0}">
|
||||
<c:set var="isBreak" value="false" ></c:set>
|
||||
<c:forEach items="${_cfg.httpUrlList}" var="cfg">
|
||||
<c:choose>
|
||||
<c:when test="${region.configRegionValue eq cfg.cfgType and !isBreak}">
|
||||
<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>
|
||||
<c:set var="domainCfgIndex" value="${domainCfgIndex+1 }"></c:set>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:if test="${!isBreak}">
|
||||
<div class="row boxSolid ${region.configServiceType }_div ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="domainCfgIndex" value="${domainCfgIndex+1 }"></c:set>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="row boxSolid ${region.configServiceType }_div ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="domainCfgIndex" value="${domainCfgIndex+1 }"></c:set>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<br>
|
||||
@@ -33,7 +33,7 @@
|
||||
$("#level").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//异步获取voip相关信息
|
||||
//异步获取相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
@@ -83,19 +83,26 @@
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<c:if test="${cfg.functionId eq 200}">
|
||||
<c:set var="interceptCode" value="ip_intercept"/>
|
||||
<c:set var="interceptType" value="Ip"/>
|
||||
</c:if>
|
||||
<c:if test="${cfg.functionId eq 201}">
|
||||
<c:set var="interceptCode" value="domain_intercept"/>
|
||||
<c:set var="interceptType" value="Domain"/>
|
||||
</c:if>
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="intercept:ip:config">
|
||||
<shiro:hasPermission name="intercept:${fn:toLowerCase(interceptType)}:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/proxy/intercept/interceptIpForm?functionId=${cfg.functionId}'">
|
||||
onClick="javascript:window.location='${ctx}/proxy/intercept/intercept${interceptType}Form?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="ip_intercept"></spring:message>
|
||||
<spring:message code="${interceptCode }"></spring:message>
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
@@ -104,7 +111,7 @@
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/proxy/intercept/ip/list?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/proxy/intercept/${fn:toLowerCase(interceptType)}/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}"/>
|
||||
@@ -152,20 +159,20 @@
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="intercept:ip:config">
|
||||
<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 name="intercept:${fn:toLowerCase(interceptType)}:config">
|
||||
<sys:delRow url="${ctx}/proxy/intercept/intercept${interceptType}Form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/proxy/intercept/updateIntercept${interceptType}Valid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="intercept:ip:confirm">
|
||||
<shiro:hasPermission name="intercept:${fn:toLowerCase(interceptType)}:confirm">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/proxy/intercept/auditInterceptIpCfg?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/intercept/auditInterceptIpCfg?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/intercept/auditInterceptIpCfg?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/intercept/auditIntercept${interceptType}Cfg?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/intercept/auditIntercept${interceptType}Cfg?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/intercept/auditIntercept${interceptType}Cfg?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
@@ -311,9 +318,11 @@
|
||||
<th class="cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="rate_limit"/></th>
|
||||
<th><spring:message code="certificate"/></th>
|
||||
<th><spring:message code="replace_zone"/></th>
|
||||
<th><spring:message code="replaced_content"/></th>
|
||||
<th><spring:message code="replace_content"/></th>
|
||||
<c:if test="${interceptType eq 'Ip' }">
|
||||
<th><spring:message code="replace_zone"/></th>
|
||||
<th><spring:message code="replaced_content"/></th>
|
||||
<th><spring:message code="replace_content"/></th>
|
||||
</c:if>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="do_log"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
@@ -341,25 +350,27 @@
|
||||
</td>
|
||||
<td>${indexCfg.compileId }</td>
|
||||
<td>${indexCfg.cfgDesc }</td>
|
||||
<td>
|
||||
${indexCfg.userRegion1 }
|
||||
</td>
|
||||
<td>
|
||||
${indexCfg.userRegion2 }
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('INTERCEPT_REPLACE_ZONE')}" var="replaceZoneC">
|
||||
<c:if test="${indexCfg.userRegion3==replaceZoneC.itemCode}">
|
||||
<spring:message code="${replaceZoneC.itemValue}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
${indexCfg.userRegion4 }
|
||||
</td>
|
||||
<td>
|
||||
${indexCfg.userRegion5 }
|
||||
${indexCfg.userRegion1 }
|
||||
</td>
|
||||
<c:if test="${interceptType eq 'Ip' }">
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('INTERCEPT_REPLACE_ZONE')}" var="replaceZoneC">
|
||||
<c:if test="${indexCfg.userRegion3==replaceZoneC.itemCode}">
|
||||
<spring:message code="${replaceZoneC.itemValue}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
${indexCfg.userRegion4 }
|
||||
</td>
|
||||
<td>
|
||||
${indexCfg.userRegion5 }
|
||||
</td>
|
||||
</c:if>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.action }">
|
||||
@@ -174,6 +174,59 @@
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:forEach items="${_cfg.httpUrlList}" 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-8">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='keywords' />:</label>
|
||||
<label>
|
||||
${fn:replace(cfg.cfgKeywords, "***and***", " ")}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='expression_type' />:</label>
|
||||
<label>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.exprType eq 1}"><spring:message code='and_expression'/></c:when>
|
||||
<c:when test="${cfg.exprType eq 0}"><spring:message code='null_expression'/></c:when>
|
||||
</c:choose>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='match_method' />:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${cfg.matchMethod==matchMethodC.itemCode }"><spring:message code="${matchMethodC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='whether_hexbinary' />:</label>
|
||||
<label>
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${cfg.isHexbin==isHexbinC.itemCode }"><spring:message code="${isHexbinC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</html>
|
||||
Reference in New Issue
Block a user