增加http block、redirect、monit、whitelist、replace功能

修改清空配置库sql语句
修改欺骗ip策略可空
This commit is contained in:
duandongmei
2018-07-24 15:20:05 +08:00
parent 950872b5d1
commit b72db052fd
11 changed files with 464 additions and 324 deletions

View File

@@ -0,0 +1,134 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title></title>
<script type="text/javascript">
</script>
</head>
<!-- block -->
<c:if test="${action == 16}">
<h4 class="form-section">
<spring:message code="action_region" />
<small></small>
</h4>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font>
<spring:message code="response_code" />
</label>
<div class="col-md-6">
<select name="userRegion1"
class="selectpicker show-tick form-control">
<c:forEach items="${fns:getDictList('RESPONSE_CODE')}" var="responseCodeC">
<option value="${responseCodeC.itemCode}" <c:if test="${_cfg.userRegion1==responseCodeC.itemCode || _cfg.userRegion1==null}">selected</c:if>><spring:message code="${responseCodeC.itemValue}"/></option>
</c:forEach>
</select>
</div>
<div for="userRegion1"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font>
<spring:message code="response_content" /></label>
<div class="col-md-6">
<input class="form-control" type="text"
name="userRegion2"
value="${_cfg.userRegion2 }">
</div>
<div for="userRegion2"></div>
</div>
</div>
</div>
</c:if>
<c:if test="${action == 48}">
<h4 class="form-section">
<spring:message code="action_region" />
<small></small>
</h4>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font>
<spring:message code="redirect_response_code" />
</label>
<div class="col-md-6">
<select name="userRegion1"
class="selectpicker show-tick form-control">
<c:forEach items="${fns:getDictList('REDIRECT_RESPONSE_CODE')}" var="redirectResponseCodeC">
<option value="${redirectResponseCodeC.itemCode}" <c:if test="${_cfg.userRegion1==redirectResponseCodeC.itemCode || _cfg.userRegion1==null}">selected</c:if>><spring:message code="${redirectResponseCodeC.itemValue}"/></option>
</c:forEach>
</select>
</div>
<div for="userRegion1"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font>
<spring:message code="redirect_url" /></label>
<div class="col-md-6">
<input class="form-control url" type="text"
name="userRegion2"
value="${_cfg.userRegion2 }">
</div>
<div for="userRegion2"></div>
</div>
</div>
</div>
</c:if>
<c:if test="${action == 80}">
<h4 class="form-section">
<spring:message code="action_region" />
<small></small>
</h4>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font>
<spring:message code="replace_zone" />
</label>
<div class="col-md-6">
<select name="userRegion1"
class="selectpicker show-tick form-control">
<c:forEach items="${fns:getDictList('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>
</div>
<div for="userRegion1"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font>
<spring:message code="replaced_content" /></label>
<div class="col-md-6">
<input class="form-control" type="text"
name="userRegion2"
value="${_cfg.userRegion2 }">
</div>
<div for="userRegion2"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font>
<spring:message code="replace_content" /></label>
<div class="col-md-6">
<input class="form-control" type="text"
name="userRegion3"
value="${_cfg.userRegion3 }">
</div>
<div for="userRegion3"></div>
</div>
</div>
</div>
</c:if>
</html>

View File

@@ -169,7 +169,7 @@ $(function(){
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="group_name"/></label>
<div class="col-md-6">
<select id="dnsStrategyId" name="dnsStrategyId" class="selectpicker show-tick form-control required">
<option value=""><spring:message code="select"/></option>
<option value="0"><spring:message code="select"/></option>
<c:forEach items="${policyGroups }" var="policyGroup">
<option value="${policyGroup.groupId}" <c:if test="${_cfg.dnsStrategyId==policyGroup.groupId }">selected</c:if>><spring:message code="${policyGroup.groupName}"/></option>
</c:forEach>

View File

@@ -76,6 +76,7 @@ $(function(){
<label class="control-label col-md-3"><spring:message code="policy_name"/></label>
<div class="col-md-6">
<select name="dnsStrategyId" class="selectpicker show-tick form-control">
<option value="0" ><spring:message code="select"/></option>
<c:forEach items="${dnsResStrategys }" var="dnsStrategy">
<option value="${dnsStrategy.cfgId}" <c:if test="${_cfg.dnsStrategyId==dnsStrategy.cfgId }">selected</c:if>><spring:message code="${dnsStrategy.cfgDesc}"/></option>
</c:forEach>

View File

@@ -22,47 +22,6 @@
});
$("#serviceId").val($(".action:checked").attr("serviceId"));
$("#protocolId").val($(".action:checked").attr("protocolId"));
if($("#cfgId").val()!=""){
if($("#httpReqCfgNum").val()>0){
$("a[for='httpReqCfg']").parent().addClass("active");
$("a[for='httpResCfg']").parent().removeClass("active");
$(".httpResCfg").addClass("hidden").addClass("disabled");
$(".httpReqCfg").removeClass("hidden").removeClass(
"disabled");
}
if($("#httpResCfgNum").val()>0){
$("a[for='httpResCfg']").parent().addClass("active");
$("a[for='httpReqCfg']").parent().removeClass("active");
$(".httpReqCfg").addClass("hidden").addClass("disabled");
$(".httpResCfg").removeClass("hidden").removeClass(
"disabled");
}
}else{
$(".httpResCfg").addClass("hidden").addClass("disabled");
$(".httpReqCfg").removeClass("hidden").removeClass(
"disabled");
}
$(".configType").on("click", function() {
var region = ($(this).find("a").attr("for"));
if(region=="httpReqCfg"){
$(".httpResCfg").addClass("hidden").addClass("disabled");
$(".httpReqCfg").removeClass("hidden").removeClass(
"disabled");
}else{
$(".httpReqCfg").addClass("hidden").addClass("disabled");
$(".httpResCfg").removeClass("hidden").removeClass(
"disabled");
}
});
$("select[name='userRegion1']").on("change",function(){
var code = $(this).val();
if(code.indexOf("30")==0){//以30开头的应答码需要输入URL地址
$("input[name='userRegion2']").addClass("url");
}else{
$("input[name='userRegion2']").removeClass("url");
}
});
$("#cfgFrom").validate(
{
@@ -86,12 +45,6 @@
return;
}
}
if(!$(".httpResCfg").hasClass("hidden")){
if($(".httpResCfg").find(".boxSolid").length==$(".httpResCfg").find(".boxSolid.hidden").length){
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
return;
}
}
//代表所有区域都隐藏了,提示必须增加个区域信息
if($("input[name='isAreaEffective']:checked").val()==1 && $(".container-fluid:visible").size()==0){
if($("#areaIsp").hasClass("hidden")) $("#areaIp").find(".glyphicon-plus").click();
@@ -134,18 +87,12 @@
var addContent = function(obj, contentClassName) {
$("." + contentClassName + "0").removeClass("hidden").removeClass(
"disabled");
/* $("."+contentClassName+"0").find("input,select").each(function(){
$(this).removeAttr("disabled");
}); */
$(obj).addClass("hidden");
}
//业务窗口关闭
var delContent = function(contentClassName, addBtnClassName) {
$("." + contentClassName).addClass("hidden").addClass("disabled");
/* $("."+contentClassName).find("input,select").each(function(){
$(this).attr("disabled","true");
}); */
$("." + addBtnClassName).removeClass("hidden");
}
</script>
@@ -155,7 +102,11 @@
<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="http_redirect"></spring:message>
<c:forEach items="${serviceList }" var="serviceDict">
<c:if test="${serviceDict.functionId== cfg.functionId}">
<spring:message code="${serviceDict.serviceName }"></spring:message>
</c:if>
</c:forEach>
</h3>
<div class="row">
<div class="col-md-12">
@@ -180,261 +131,208 @@
<input type="hidden" name="functionId" value="${_cfg.functionId}">
<input type="hidden" id="serviceId" name="serviceId"
value="${_cfg.serviceId}">
<input type="hidden" id="httpReqCfgNum" value="${httpReqCfgNum}">
<input type="hidden" id="httpResCfgNum" value="${httpResCfgNum}">
<div class="form-body">
<div class="portlet-body flip-scroll">
<div class="row-fluid">
<div class="span12">
<div class="tabbable tabbable-custom tabs-left">
<!-- Only required for left/right tabs -->
<ul class="nav nav-tabs tabs-left">
<li class="active configType"><a href="#http_req_tab"
data-toggle="tab" for="httpReqCfg"
data_dldk="<spring:message code="http_req_control"/>"><spring:message
code="http_req_control" /></a></li>
<li class="configType"><a href="#http_res_tab" data-toggle="tab" for="httpResCfg"
data_dldk="<spring:message code="http_res_control"/>"><spring:message
code="http_res_control" /></a></li>
</ul>
<div class="tab-content">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message
code="config_describe" /></label>
<div class="col-md-6">
<input class="form-control" type="text" name="cfgDesc"
value="${_cfg.cfgDesc}">
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message
code="action" /></label>
<div class="col-md-6">
<c:forEach items="${serviceList}" var="service"
varStatus="satus">
<label class="radio-inline"> <c:if
test="${_cfg.functionId eq service.functionId}">
<input type="radio" name="action"
serviceId="${service.serviceId }"
protocolId="${service.protocolId }"
value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/>
</c:if>
</c:forEach>
</c:if>
</label>
</c:forEach>
</div>
<div for="action"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font>
<spring:message code="REDIRECT_RESPONSE_CODE" /></label>
<div class="col-md-6">
<select name="userRegion1"
class="selectpicker select2 form-control required">
<c:forEach items="${fns:getDictList('REDIRECT_RESPONSE_CODE')}" var="responseCode">
<option value="${responseCode.itemValue}" <c:if test="${_cfg.userRegion1==responseCode.itemValue}">selected</c:if>><spring:message code="${responseCode.itemCode}"/></option>
</c:forEach>
</select>
</div>
<div for="userRegion1"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message
code="redirect_content" /></label>
<div class="col-md-6">
<input class="form-control" type="text" name="userRegion2"
value="${_cfg.userRegion2}">
</div>
<div for="userRegion2"></div>
</div>
</div>
</div>
<c:forEach items="${regionList}" var="region" varStatus="status">
<c:if test="${region.regionType eq 1 }">
<!--ip info-->
<div class="httpReqCfg">
<c:set var="tabName" value="httpIpTab"></c:set>
<h4 class="form-section" >
<spring:message code="http_ip_title" />
<small> <span
class="glyphicon glyphicon-plus ${tabName}Add"
onClick="addContent(this,'${tabName}')" title="add"></span></small>
</h4>
<c:forEach items="${_cfg.ipPortList}" var="ipPort"
varStatus="status">
<c:set var="cfgName" value="ipPortList[${status.index}]"></c:set>
<div class="row boxSolid ${tabName}${status.index}
<c:if test="${empty ipPort.cfgId}">hidden disabled </c:if>" >
<%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%>
</div>
<c:set var="ipCfgIndex" value="${ipCfgIndex+1}"></c:set>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message
code="config_describe" /></label>
<div class="col-md-6">
<input class="form-control" type="text" name="cfgDesc"
value="${_cfg.cfgDesc}">
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message
code="action" /></label>
<div class="col-md-6">
<c:forEach items="${serviceList}" var="service"
varStatus="satus">
<label class="radio-inline"> <c:if
test="${_cfg.functionId eq service.functionId}">
<input type="radio" name="action"
serviceId="${service.serviceId }"
protocolId="${service.protocolId }"
value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }">
<c:set var="action" value="${dict.itemCode }"></c:set>
<spring:message code="${dict.itemValue }"/>
</c:if>
</c:forEach>
</div>
<!--/ip info-->
</c:if>
<c:if test="${region.regionType eq 2 }">
<c:if test="${region.configRegionValue eq _cfg.httpUrl.cfgType }">
<!--url info-->
<div class="httpReqCfg">
<c:set var="tabName" value="httpUrlTab"></c:set>
<h4 class="form-section" >
<spring:message code="http_url_title" />
<small> <span
class="glyphicon glyphicon-plus ${tabName}Add"
onClick="addContent(this,'${tabName}')" title="add"></span></small>
</h4>
<%-- <c:set var="regionValue" value="${_cfg.httpUrl.cfgType}"></c:set> --%>
<c:forEach items="${_cfg.httpUrlList}" var="strCfg"
varStatus="status">
<c:set var="cfgName" value="httpUrlList[${status.index}]"></c:set>
<div class="row boxSolid ${tabName}${status.index}
<c:if test="${empty strCfg.cfgId}">hidden disabled </c:if>" >
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
</div>
</c:forEach>
</div>
<!--/url info-->
</c:if>
<c:if test="${region.configRegionValue eq _cfg.httpReqBody.cfgType }">
<!--request body info-->
<div class="httpReqCfg">
<c:set var="tabName" value="httpReqBodyTab"></c:set>
<h4 class="form-section" >
<spring:message code="http_req_body_title" />
<small> <span
class="glyphicon glyphicon-plus ${tabName}Add"
onClick="addContent(this,'${tabName}')" title="add"></span></small>
</h4>
<%-- <c:set var="regionValue" value="${_cfg.httpReqBody.cfgType}"></c:set> --%>
<c:forEach items="${_cfg.httpReqBodyList}" var="strCfg"
varStatus="status">
<c:set var="cfgName" value="httpReqBodyList[${status.index}]"></c:set>
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty strCfg.cfgId}">hidden disabled </c:if>" >
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
</div>
</c:forEach>
</div>
<!--/request body info-->
</c:if>
<c:if test="${region.configRegionValue eq _cfg.httpResBody.cfgType }">
<!--response body info-->
<div class="httpResCfg">
<c:set var="tabName" value="httpResBodyTab"></c:set>
<h4 class="form-section" >
<spring:message code="http_res_body_title" />
<small> <span
class="glyphicon glyphicon-plus ${tabName}Add"
onClick="addContent(this,'${tabName}')" title="add"></span></small>
</h4>
<%-- <c:set var="regionValue" value="${_cfg.httpResBody.cfgType}"></c:set> --%>
<c:forEach items="${_cfg.httpResBodyList}" var="strCfg"
varStatus="status">
<c:set var="cfgName" value="httpResBodyList[${status.index}]"></c:set>
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty strCfg.cfgId}">hidden disabled </c:if>" >
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
</div>
</c:forEach>
</div>
</c:if>
</c:if>
<c:if test="${region.regionType eq 3 }">
<c:if test="${region.configRegionValue eq _cfg.httpReqHdr.cfgType }">
<!--request header info-->
<div class="httpReqCfg">
<c:set var="tabName" value="httpReqHdrTab"></c:set>
<h4 class="form-section" >
<spring:message code="http_req_hdr_title" />
<small> <span
class="glyphicon glyphicon-plus ${tabName}Add"
onClick="addContent(this,'${tabName}')" title="add"></span></small>
</h4>
<%-- <c:set var="regionValue" value="${_cfg.httpReqHdr.cfgType}"></c:set> --%>
<c:forEach items="${_cfg.httpReqHdrList}" var="complexCfg"
varStatus="status">
<c:set var="cfgName" value="httpReqHdrList[${status.index}]"></c:set>
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty complexCfg.cfgId}">hidden disabled </c:if>">
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
</div>
</c:forEach>
</div>
<!--/request header info-->
</c:if>
<c:if test="${region.configRegionValue eq _cfg.httpResHdr.cfgType }">
<!--response header info-->
<div class="httpResCfg">
<c:set var="tabName" value="httpResHdrTab"></c:set>
<h4 class="form-section" >
<spring:message code="http_res_hdr_title" />
<small> <span
class="glyphicon glyphicon-plus ${tabName}Add"
onClick="addContent(this,'${tabName}')" title="add"></span></small>
</h4>
<%-- <c:set var="regionValue" value="${_cfg.httpResHdr.cfgType}"></c:set> --%>
<c:forEach items="${_cfg.httpResHdrList}" var="complexCfg"
varStatus="status">
<c:set var="cfgName" value="httpResHdrList[${status.index}]"></c:set>
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty complexCfg.cfgId}">hidden disabled </c:if>">
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
</div>
</c:forEach>
</div>
<!--/response header info-->
</c:if>
</c:if>
</c:forEach>
<%@include file="/WEB-INF/include/form/areaInfo.jsp"%>
<br>
<%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
<div class="form-actions">
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-offset-3 col-md-8">
<button id="save" type="submit" class="btn green">
<spring:message code="submit" />
</button>
<button id="cancel" type="button" class="btn default">
<spring:message code="cancel" />
</button>
</div>
</div>
</div>
<div class="col-md-6"></div>
</div>
</label>
</c:forEach>
</div>
<div for="action"></div>
</div>
</div>
</div>
<%@include file="/WEB-INF/views/cfg/actionRegionForm.jsp"%>
<br>
<c:forEach items="${regionList}" var="region" varStatus="status">
<c:if test="${region.regionType eq 1 }">
<!--ip info-->
<div class="httpReqCfg">
<c:set var="tabName" value="httpIpTab"></c:set>
<h4 class="form-section" >
<spring:message code="http_ip_title" />
<small> <span
class="glyphicon glyphicon-plus ${tabName}Add"
onClick="addContent(this,'${tabName}')" title="add"></span></small>
</h4>
<c:forEach items="${_cfg.ipPortList}" var="ipPort"
varStatus="status">
<c:set var="cfgName" value="ipPortList[${status.index}]"></c:set>
<div class="row boxSolid ${tabName}${status.index}
<c:if test="${empty ipPort.cfgId}">hidden disabled </c:if>" >
<%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%>
</div>
<c:set var="ipCfgIndex" value="${ipCfgIndex+1}"></c:set>
</c:forEach>
</div>
<!--/ip info-->
</c:if>
<c:if test="${region.regionType eq 2 }">
<c:if test="${region.configRegionValue eq _cfg.httpUrl.cfgType }">
<!--url info-->
<div class="httpReqCfg">
<c:set var="tabName" value="httpUrlTab"></c:set>
<h4 class="form-section" >
<spring:message code="http_url_title" />
<small> <span
class="glyphicon glyphicon-plus ${tabName}Add"
onClick="addContent(this,'${tabName}')" title="add"></span></small>
</h4>
<%-- <c:set var="regionValue" value="${_cfg.httpUrl.cfgType}"></c:set> --%>
<c:forEach items="${_cfg.httpUrlList}" var="strCfg"
varStatus="status">
<c:set var="cfgName" value="httpUrlList[${status.index}]"></c:set>
<div class="row boxSolid ${tabName}${status.index}
<c:if test="${empty strCfg.cfgId}">hidden disabled </c:if>" >
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
</div>
</c:forEach>
</div>
<!--/url info-->
</c:if>
<c:if test="${region.configRegionValue eq _cfg.httpReqBody.cfgType }">
<!--request body info-->
<div class="httpReqCfg">
<c:set var="tabName" value="httpReqBodyTab"></c:set>
<h4 class="form-section" >
<spring:message code="http_req_body_title" />
<small> <span
class="glyphicon glyphicon-plus ${tabName}Add"
onClick="addContent(this,'${tabName}')" title="add"></span></small>
</h4>
<%-- <c:set var="regionValue" value="${_cfg.httpReqBody.cfgType}"></c:set> --%>
<c:forEach items="${_cfg.httpReqBodyList}" var="strCfg"
varStatus="status">
<c:set var="cfgName" value="httpReqBodyList[${status.index}]"></c:set>
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty strCfg.cfgId}">hidden disabled </c:if>" >
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
</div>
</c:forEach>
</div>
<!--/request body info-->
</c:if>
<c:if test="${region.configRegionValue eq _cfg.httpResBody.cfgType }">
<!--response body info-->
<div class="httpReqCfg">
<c:set var="tabName" value="httpResBodyTab"></c:set>
<h4 class="form-section" >
<spring:message code="http_res_body_title" />
<small> <span
class="glyphicon glyphicon-plus ${tabName}Add"
onClick="addContent(this,'${tabName}')" title="add"></span></small>
</h4>
<%-- <c:set var="regionValue" value="${_cfg.httpResBody.cfgType}"></c:set> --%>
<c:forEach items="${_cfg.httpResBodyList}" var="strCfg"
varStatus="status">
<c:set var="cfgName" value="httpResBodyList[${status.index}]"></c:set>
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty strCfg.cfgId}">hidden disabled </c:if>" >
<%@include file="/WEB-INF/views/cfg/stringCfgForm.jsp"%>
</div>
</c:forEach>
</div>
</c:if>
</c:if>
<c:if test="${region.regionType eq 3 }">
<c:if test="${region.configRegionValue eq _cfg.httpReqHdr.cfgType }">
<!--request header info-->
<div class="httpReqCfg">
<c:set var="tabName" value="httpReqHdrTab"></c:set>
<h4 class="form-section" >
<spring:message code="http_req_hdr_title" />
<small> <span
class="glyphicon glyphicon-plus ${tabName}Add"
onClick="addContent(this,'${tabName}')" title="add"></span></small>
</h4>
<%-- <c:set var="regionValue" value="${_cfg.httpReqHdr.cfgType}"></c:set> --%>
<c:forEach items="${_cfg.httpReqHdrList}" var="complexCfg"
varStatus="status">
<c:set var="cfgName" value="httpReqHdrList[${status.index}]"></c:set>
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty complexCfg.cfgId}">hidden disabled </c:if>">
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
</div>
</c:forEach>
</div>
<!--/request header info-->
</c:if>
<c:if test="${region.configRegionValue eq _cfg.httpResHdr.cfgType }">
<!--response header info-->
<div class="httpReqCfg">
<c:set var="tabName" value="httpResHdrTab"></c:set>
<h4 class="form-section" >
<spring:message code="http_res_hdr_title" />
<small> <span
class="glyphicon glyphicon-plus ${tabName}Add"
onClick="addContent(this,'${tabName}')" title="add"></span></small>
</h4>
<%-- <c:set var="regionValue" value="${_cfg.httpResHdr.cfgType}"></c:set> --%>
<c:forEach items="${_cfg.httpResHdrList}" var="complexCfg"
varStatus="status">
<c:set var="cfgName" value="httpResHdrList[${status.index}]"></c:set>
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty complexCfg.cfgId}">hidden disabled </c:if>">
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
</div>
</c:forEach>
</div>
<!--/response header info-->
</c:if>
</c:if>
</c:forEach>
<%@include file="/WEB-INF/include/form/areaInfo.jsp"%>
<br>
<%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
<div class="form-actions">
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-offset-3 col-md-8">
<button id="save" type="submit" class="btn green">
<spring:message code="submit" />
</button>
<button id="cancel" type="button" class="btn default">
<spring:message code="cancel" />
</button>
</div>
</div>
</div>
<div class="col-md-6"></div>
</div>
</div>
</div>

View File

@@ -251,7 +251,12 @@
</div>
<h3 class="page-title">
<spring:message code="http_redirect"></spring:message>
<c:forEach items="${serviceList }" var="serviceDict">
<c:if test="${serviceDict.functionId== cfg.functionId}">
<spring:message code="${serviceDict.serviceName }"></spring:message>
</c:if>
</c:forEach>
<small><spring:message code="date_list"/></small>
</h3>
<h5 class="page-header"></h5>
@@ -453,6 +458,13 @@
</div>
<c:forEach items="${serviceList}" var="service"
varStatus="satus">
<c:if
test="${cfg.functionId eq service.functionId}">
<c:set var="action" value="${service.action }"></c:set>
</c:if>
</c:forEach>
<!-- /筛选搜索内容栏 结束-->
</form:form>
@@ -464,8 +476,20 @@
<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="REDIRECT_RESPONSE_CODE"/></th>
<th><spring:message code="redirect_content"/></th>
<c:if test="${action == 16}">
<th><spring:message code="response_code"/></th>
<th><spring:message code="response_content"/></th>
</c:if>
<c:if test="${action == 48}">
<th><spring:message code="redirect_response_code"/></th>
<th><spring:message code="redirect_url"/></th>
</c:if>
<c:if test="${action == 80}">
<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="whether_area_block"/></th>
<th><spring:message code="letter"/></th>
<th><spring:message code="classification"/></th>
@@ -497,14 +521,40 @@
</c:if>
</c:forEach>
</td>
<td>
<c:forEach items="${fns:getDictList('REDIRECT_RESPONSE_CODE') }" var="dict">
<c:if test="${dict.itemValue eq indexCfg.userRegion1 }">
<spring:message code="${dict.itemCode }"/>
</c:if>
</c:forEach>
</td>
<td>${indexCfg.userRegion2 }</td>
<c:if test="${action == 16}">
<td>
<c:forEach items="${fns:getDictList('RESPONSE_CODE') }" var="dict1">
<c:if test="${dict1.itemCode eq indexCfg.userRegion1 }">
<spring:message code="${dict1.itemValue }"/>
</c:if>
</c:forEach>
</td>
<td>${indexCfg.userRegion2 }</td>
</c:if>
<c:if test="${action == 48}">
<td>
<c:forEach items="${fns:getDictList('REDIRECT_RESPONSE_CODE') }" var="dict2">
<c:if test="${dict2.itemCode eq indexCfg.userRegion1 }">
<spring:message code="${dict2.itemValue }"/>
</c:if>
</c:forEach>
</td>
<td>${indexCfg.userRegion2 }</td>
</c:if>
<c:if test="${action == 80}">
<td>
<c:forEach items="${fns:getDictList('REPLACE_ZONE') }" var="dict3">
<c:if test="${dict3.itemCode eq indexCfg.userRegion1 }">
<spring:message code="${dict3.itemValue }"/>
</c:if>
</c:forEach>
</td>
<td>${indexCfg.userRegion2 }</td>
<td>${indexCfg.userRegion3 }</td>
</c:if>
<td>
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
<c:if test="${indexCfg.isAreaEffective==1}">

View File

@@ -39,7 +39,6 @@
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<shiro:hasPermission name="proxy:contol:httpReqReplace:config">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/proxy/control/httpReqReplace/form?functionId=${cfg.functionId}'">

View File

@@ -22,6 +22,7 @@
max: $.validator.format("Please enter a value less than or equal to {0}."),
min: $.validator.format("Please enter a value greater than or equal to {0}."),
noBlankSpace:"can not be space",
ip:"Please enter a correct IP address",
ipCheck:"Please enter a correct IP address",
ipMask:"Please enter a correct IP/mask",
ipPart:"Invalid IP part",

View File

@@ -22,6 +22,7 @@
max: $.validator.format("请输入一个最大为 {0} 的值"),
min: $.validator.format("请输入一个最小为 {0} 的值"),
noBlankSpace:"不能为空格",
ip:"请填写正确的IP地址",
ipCheck:"请填写正确的IP地址",
ipMask:"请填写正确的IP地址/掩码",
ipPart:"IP部分格式错误",