代理操控业务部分功能提交配置、导入、导出
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<style>
|
||||
.radio-inline{
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
<script src="${pageContext.request.contextPath}/static/pages/scripts/importExcel.js" type="text/javascript"></script>
|
||||
<div class="modal fade" id="import_modal" tabindex="-1" role="dialog" aria-labelledby="mo" aria-hidden="true">
|
||||
<form id="importForm1" action="${ctx}/ntc/iplist/import?importPath=${importPath}" method="post" enctype="multipart/form-data" class="form-horizontal"
|
||||
onsubmit="loading('<spring:message code='loading'/>');">
|
||||
<input type="hidden" id="noneFileTip" value="<spring:message code='none_file_tip'/>">
|
||||
<input type="hidden" id="fileVersionErrorTip" value="<spring:message code='import_tip_excel'/>">
|
||||
<input type="hidden" id="noneProfileTip" value="<spring:message code='none_profile_tip'/>">
|
||||
<div class="modal-dialog" role="document" style="width:700px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@@ -85,6 +91,35 @@
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${cfg.functionId eq 215 }">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="action" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode == 16 || dict.itemCode == 48 || dict.itemCode == 80 }">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="manipulatType" class="userRegion5" value="${dict.itemCode }" class="required"
|
||||
<c:if test="${dict.itemCode == 48}">checked</c:if>>
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<label class="radio-inline"><%-- HiJack标识为85 --%>
|
||||
<input type="radio" name="manipulatType" class="userRegion5" value="85" class="required">
|
||||
<spring:message code="HiJack"/>
|
||||
</label>
|
||||
<label class="radio-inline"><%-- Insert标识为90 --%>
|
||||
<input type="radio" name="manipulatType" class="userRegion5" value="90" class="required">
|
||||
<spring:message code="Insert"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="manipulatType"></div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<div class="form-group region">
|
||||
<label class="control-label col-md-3"> <spring:message
|
||||
code="cfg_type" />
|
||||
@@ -120,6 +155,22 @@
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
|
||||
<c:if test="${cfg.functionId eq 215 }">
|
||||
<div class="row profileInfo hidden">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="profile_info"/>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select id="profileSelId" name="profileId" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message var="select"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="profileId"></div>
|
||||
</div>
|
||||
</br>
|
||||
</c:if>
|
||||
|
||||
<!-- 600 asn ip、 3:IP白名单、 405:APP协议IP、 403:APP域名特征、 563 APP Payload、 565 APP HTTP、 564 APP DNS、 566 APP SSL -->
|
||||
<c:if test="${(cfg.functionId eq 600) || (cfg.functionId eq 3) || (cfg.functionId eq 405) || (cfg.functionId eq 403) || (cfg.functionId eq 563) || (cfg.functionId eq 565) || (cfg.functionId eq 564) || (cfg.functionId eq 566) ||
|
||||
(cfg.functionId eq 560) }">
|
||||
|
||||
@@ -0,0 +1,382 @@
|
||||
<%@ 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 -->
|
||||
<div class="actionParam" >
|
||||
<h4 class="form-section">
|
||||
<spring:message code="action_region" />
|
||||
<small></small>
|
||||
</h4>
|
||||
<c:if test="${_cfg.userRegion5 == 16 }">
|
||||
<div class="row blockInfoDiv" action_value="16">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<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 eq responseCodeC.itemCode || (empty _cfg.userRegion1 && responseCodeC.itemCode eq 404)}">selected</c:if>>${responseCodeC.itemCode} <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">
|
||||
<spring:message code="response_content" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input id="" name="userRegion2" class="form-control" type="text" value="${_cfg.userRegion2 }" maxlength="1024">
|
||||
</div>
|
||||
<div for="userRegion2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="row blockInfoDiv" action_value="16">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="profile_info" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select id="" name="userRegion4" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${allProxyFileStrategys}" var="file">
|
||||
<c:if test="${file.isValid!=0 and file.isAudit!=3}">
|
||||
<option action="${file.action }" value="${file.compileId}"
|
||||
<c:if test="${file.compileId eq _cfg.userRegion4 }">selected</c:if>>${file.fileDesc}</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion4"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
<div class="row profileSelDiv" action_value="16">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="profile_info" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select id="profileSelId" name="userRegion4" class="selectpicker show-tick form-control required">
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion4"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${_cfg.userRegion5 == 48 }">
|
||||
<div class="row redirectDiv" action_value="48">
|
||||
<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 id="redirectResponseCode" name="userRegion1" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('REDIRECT_RESPONSE_CODE')}" var="redirectResponseCodeC">
|
||||
<option value="${redirectResponseCodeC.itemCode}" <c:if test="${_cfg.userRegion1==redirectResponseCodeC.itemCode || (_cfg.userRegion1==null && redirectResponseCodeC.itemCode==1)}">selected</c:if>>${redirectResponseCodeC.itemCode} <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 id="responseLabel" class="control-label col-md-3 "><font color="red">*</font>
|
||||
<spring:message code="redirect_url" /></label>
|
||||
<div class="col-md-6">
|
||||
<input id="responseContent" name="userRegion2" class="form-control required httpCheck" type="text" value="${_cfg.userRegion2 }" maxlength="1024">
|
||||
<select id="responseFile" name="userRegion3" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${allProxyFileStrategys}" var="file">
|
||||
<c:if test="${file.isValid!=0 and file.isAudit!=3}">
|
||||
<option action="${file.action }" value="${file.compileId}"
|
||||
<c:if test="${file.compileId eq _cfg.userRegion3 }">selected</c:if>>${file.fileDesc}</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
/* //清除没用的 file 信息
|
||||
var action = $("input[name='action']").val();
|
||||
$("#responseFile option").each(function(i,n){
|
||||
var oa = $(this).attr("action");
|
||||
if(oa != action && i != 0){
|
||||
$(this).remove();
|
||||
}
|
||||
}); */
|
||||
//页面加载时触发初始化操作
|
||||
var code = $("#redirectResponseCode").val();
|
||||
if(code == 200){//响应文件
|
||||
$("#responseContent").hide();//隐藏输入框
|
||||
$("#responseFile").selectpicker("show");//显示选择框
|
||||
$("#responseLabel").html('<font color="red">*</font><spring:message code="response_file" />');
|
||||
}else{
|
||||
$("#responseContent").show();//显示输入框
|
||||
$("#responseFile").selectpicker("hide");//隐藏选择框
|
||||
$("#responseLabel").html('<font color="red">*</font><spring:message code="redirect_url" />');
|
||||
}
|
||||
|
||||
$("#redirectResponseCode").on("change",function(){
|
||||
var $this = $(this);
|
||||
var code = $this.val();
|
||||
if(code == 200){//重定向 应答码 为 200 时可以选择 应答文件
|
||||
$("#responseContent").hide();//隐藏输入框
|
||||
$("#responseFile").selectpicker("show");//显示选择框
|
||||
$("#responseLabel").html('<font color="red">*</font><spring:message code="response_file" />');
|
||||
}else{
|
||||
$("#responseContent").show();//显示输入框
|
||||
$("#responseFile").selectpicker("hide");//隐藏选择框
|
||||
$("#responseLabel").html('<font color="red">*</font><spring:message code="redirect_url" />');
|
||||
}
|
||||
$("#responseContent").val("");//清空
|
||||
$("#responseFile").selectpicker("val","");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div for="userRegion2"></div>
|
||||
<div for="userRegion3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${_cfg.userRegion5 == 80 }">
|
||||
<div class="row replaceDiv" action_value="80">
|
||||
<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 required">
|
||||
<c:forEach items="${fns:getDictList('CONTROL_REPLACE_ZONE')}" var="replaceZoneC">
|
||||
<option value="${replaceZoneC.itemCode}" <c:if test="${_cfg.userRegion1==replaceZoneC.itemCode || (_cfg.userRegion1==null && replaceZoneC.itemCode eq 'http_resp_body')}">selected</c:if>><spring:message code="${replaceZoneC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row replaceDiv" action_value="80">
|
||||
<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 required" type="text" maxlength="1024"
|
||||
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 required" type="text" maxlength="1024"
|
||||
name="userRegion3"
|
||||
value="${_cfg.userRegion3 }">
|
||||
</div>
|
||||
<div for="userRegion3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row blockInfoDivBak hidden" action_value="16">
|
||||
<div class="col-md-6 blockInfoDiv" action_value="16">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<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}" >${responseCodeC.itemCode} <spring:message code="${responseCodeC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion1"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 blockInfoDiv" action_value="16">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="response_content" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input id="responseContentA" name="userRegion2" class="form-control" type="text" maxlength="1024">
|
||||
</div>
|
||||
<div for="userRegion2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="row blockInfoDiv" action_value="16">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="profile_info" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select id="" name="userRegion4" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${allProxyFileStrategys}" var="file">
|
||||
<c:if test="${file.isValid!=0 and file.isAudit!=3}">
|
||||
<option action="${file.action }" value="${file.compileId}">${file.fileDesc}</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion4"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
<div class="row profileSelDiv" action_value="16">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="profile_info" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select id="profileSelId" name="userRegion4" class="selectpicker show-tick form-control required">
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion4"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row redirectDivBak hidden" action_value="48">
|
||||
<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 id="redirectResponseCode" name="userRegion1" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('REDIRECT_RESPONSE_CODE')}" var="redirectResponseCodeC">
|
||||
<option value="${redirectResponseCodeC.itemCode}">${redirectResponseCodeC.itemCode} <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 id="responseLabel" class="control-label col-md-3 "><font color="red">*</font>
|
||||
<spring:message code="redirect_url" /></label>
|
||||
<div class="col-md-6">
|
||||
<input id="responseContent" name="userRegion2" class="form-control required httpCheck" type="text" value="" maxlength="1024">
|
||||
<select id="responseFile" name="userRegion3" data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${allProxyFileStrategys}" var="file">
|
||||
<c:if test="${file.isValid!=0 and file.isAudit!=3}">
|
||||
<option action="${file.action }" value="${file.compileId}">${file.fileDesc}</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
//页面加载时触发初始化操作
|
||||
var code = $("#redirectResponseCode").val();
|
||||
if(code == 200){//响应文件
|
||||
$("#responseContent").hide();//隐藏输入框
|
||||
$("#responseFile").selectpicker("show");//显示选择框
|
||||
$("#responseLabel").html('<font color="red">*</font><spring:message code="response_file" />');
|
||||
}else{
|
||||
$("#responseContent").show();//显示输入框
|
||||
$("#responseFile").selectpicker("hide");//隐藏选择框
|
||||
$("#responseLabel").html('<font color="red">*</font><spring:message code="redirect_url" />');
|
||||
}
|
||||
|
||||
$("#redirectResponseCode").on("change",function(){
|
||||
var $this = $(this);
|
||||
var code = $this.val();
|
||||
if(code == 200){//重定向 应答码 为 200 时可以选择 应答文件
|
||||
$("#responseContent").hide();//隐藏输入框
|
||||
$("#responseFile").selectpicker("show");//显示选择框
|
||||
$("#responseLabel").html('<font color="red">*</font><spring:message code="response_file" />');
|
||||
}else{
|
||||
$("#responseContent").show();//显示输入框
|
||||
$("#responseFile").selectpicker("hide");//隐藏选择框
|
||||
$("#responseLabel").html('<font color="red">*</font><spring:message code="redirect_url" />');
|
||||
}
|
||||
$("#responseContent").val("");//清空
|
||||
$("#responseFile").selectpicker("val","");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div for="userRegion2"></div>
|
||||
<div for="userRegion3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row replaceDivBak hidden" action_value="80">
|
||||
<div class="row replaceDiv">
|
||||
<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 required">
|
||||
<c:forEach items="${fns:getDictList('CONTROL_REPLACE_ZONE')}" var="replaceZoneC">
|
||||
<option value="${replaceZoneC.itemCode}"><spring:message code="${replaceZoneC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row replaceDiv">
|
||||
<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 required" type="text" maxlength="1024" name="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 required" type="text" maxlength="1024" name="userRegion3">
|
||||
</div>
|
||||
<div for="userRegion3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,576 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
|
||||
<style type="text/css">
|
||||
.boxSolid {
|
||||
border: 1px solid #eeeeee
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
// user_region5表示为所选action(伪)
|
||||
switchAction($(".userRegion5:checked"));
|
||||
$(".userRegion5").on("change", function() {
|
||||
switchAction($(this));
|
||||
});
|
||||
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement : function(error, element) {
|
||||
console.log(error);
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
$(element).parents(".col-md-6").next("div").append(error);
|
||||
}else{
|
||||
$(element).parents(".form-group").find("div[for='" + element.attr("name") + "']").append(error);
|
||||
}
|
||||
},
|
||||
submitHandler : function(form) {
|
||||
var flag = true;
|
||||
|
||||
//代表所有业务都隐藏了,提示必须增加一种业务数据
|
||||
if(!$(".httpReqCfg").hasClass("hidden")){
|
||||
if($(".httpReqCfg").find(".boxSolid").length==$(".httpReqCfg").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();
|
||||
if($("#areaIp").hasClass("hidden")) $("#areaIsp").find(".glyphicon-plus").click();
|
||||
top.$.jBox.tip("<spring:message code='one_more_area'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
$(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){
|
||||
if($(this).val()==''){
|
||||
$(this).parents(".form-group").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
|
||||
flag = false;
|
||||
}
|
||||
});
|
||||
//keywords非空校验完成校验二进制字符串
|
||||
$(".boxSolid:visible").find("select[name$='isHexbin']").each(function(){
|
||||
var isHexbin=$(this).val();
|
||||
if(isHexbin == 1){ //十六进制
|
||||
var keywords=$("input[name$='"+$(this).attr("name").replace("isHexbin","cfgKeywords")+"']").val();
|
||||
keywords=keywords.replace("***and***","")
|
||||
if(keywords != ''){
|
||||
if(!(/^([0-9|a-f|A-F]*)$/.test(keywords))){
|
||||
$(this).parents(".boxSolid").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name").replace("isHexbin","cfgKeywords")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.hexCheck+"</label>");
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
var flag1=validateInvisibleCharTag();
|
||||
if(flag){
|
||||
flag=flag1;
|
||||
}
|
||||
if(flag){
|
||||
// 将disable属性的元素删除
|
||||
$(".disabled").each(function(){
|
||||
$(this).remove();
|
||||
});
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
|
||||
// 因存在多个相同Name属性值的标签,提交前删除无用的标签
|
||||
$("div[action_value]").each(function(){
|
||||
if($(this).hasClass("hidden")){
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
|
||||
// 删除无用的域配置
|
||||
$("div[class~='httpReqCfg']").each(function(){
|
||||
if($(this).hasClass("hidden")){
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
|
||||
},
|
||||
errorContainer : "#messageBox",
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
var switchAction = function(element){
|
||||
var selValue = $(element).val();
|
||||
// 初始显示所有域配置
|
||||
$(".reqHdrCfg,.resHdrCfg,.reqBodyCfg,.resBodyCfg,.ntcSubscribeIdCfgCfg").each(function(){
|
||||
$(this).removeClass("hidden");
|
||||
});
|
||||
|
||||
$("select[name='httpResHdrList[0].district']").find("option").each(function(){
|
||||
$(this).removeAttr("disabled");
|
||||
});
|
||||
$("select[name='httpResHdrList[0].district']").selectpicker("refresh");
|
||||
$("select[name='httpResHdrList[0].district']").change();
|
||||
|
||||
// 域配置隐藏/显示
|
||||
if(selValue == 48){ // Redirect 隐藏响应体
|
||||
$(".resBodyCfg").addClass("hidden");
|
||||
}else if(selValue == 80){ // Replace 隐藏请求响应体
|
||||
$(".reqBodyCfg").addClass("hidden");
|
||||
$(".resBodyCfg").addClass("hidden");
|
||||
}else if(selValue == 85 || selValue == 90){ // Hijack/Insert 隐藏请求头、请求体和响应体
|
||||
$(".reqHdrCfg").addClass("hidden");
|
||||
$(".resBodyCfg").addClass("hidden");
|
||||
$(".reqBodyCfg").addClass("hidden");
|
||||
$(".ntcSubscribeIdCfgCfg").addClass("hidden");
|
||||
// 且响应头匹配区域只能为Content-Type
|
||||
$("select[name='httpResHdrList[0].district']").find("option").each(function(){
|
||||
if($(this).val() != "Content-Type"){
|
||||
$(this).attr("disabled","disabled");
|
||||
$(this).attr("selected",false);
|
||||
}else{
|
||||
$(this).attr("selected",true);
|
||||
}
|
||||
|
||||
});
|
||||
$("select[name='httpResHdrList[0].district']").selectpicker("refresh");
|
||||
$("select[name='httpResHdrList[0].district']").change();
|
||||
}
|
||||
|
||||
var flag = false;
|
||||
if(selValue == 16 ||selValue == 85 || selValue == 90){
|
||||
$(".profileSelDiv").attr("source",selValue);
|
||||
if(selValue != 16){
|
||||
selValue = 16;
|
||||
flag = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 备份片段移动(用于新增)
|
||||
if(selValue == 16 && "${_cfg.userRegion5}" != 16 ){
|
||||
var blockBak = $(".blockInfoDivBak").removeClass("hidden");
|
||||
$(".actionParam").append(blockBak);
|
||||
}
|
||||
if(selValue == 48 && "${_cfg.userRegion5}" != 48 ){
|
||||
var redirectBak = $(".redirectDivBak").removeClass("hidden");
|
||||
$(".actionParam").append(redirectBak);
|
||||
}
|
||||
if(selValue == 80 && "${_cfg.userRegion5}" != 80 ){
|
||||
var replaceBak = $(".replaceDivBak").removeClass("hidden");
|
||||
$(".actionParam").append(replaceBak);
|
||||
}
|
||||
|
||||
// 参数切换
|
||||
$(".actionParam").find("div[action_value]").each(function(){
|
||||
var value = $(this).attr("action_value");
|
||||
if(value == selValue){
|
||||
$(this).removeClass("hidden");
|
||||
}else{
|
||||
$(this).addClass("hidden");
|
||||
}
|
||||
if(flag){
|
||||
$(".blockInfoDiv").addClass("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
// Get Policy Profile Info
|
||||
$(".actionParam").find(".profileSelDiv").each(function(){
|
||||
if(!$(this).hasClass("hidden")){
|
||||
var source = $(this).attr("source");
|
||||
var pathName = window.document.location.pathname.substring(0,window.document.location.pathname.lastIndexOf("/nis")+4);
|
||||
$.ajax({
|
||||
type:'get',
|
||||
url:pathName+'/proxy/control/manipulatPolicy/ajaxGetProfileInfo?source='+source,
|
||||
dataType:'json',
|
||||
success:function(data){
|
||||
if(data != null){
|
||||
$("#profileSelId").empty();
|
||||
var falseAction = $(".userRegion5:checked").val();
|
||||
$.each(data, function(i, n){
|
||||
if("${_cfg.userRegion4}" == data[i].compileId && "${_cfg.userRegion5}" == falseAction){ // 修改时选中
|
||||
var option = new Option(data[i].cfgDesc, data[i].compileId, null, true);
|
||||
}else{
|
||||
var option = new Option(data[i].cfgDesc, data[i].compileId);
|
||||
}
|
||||
|
||||
$("#profileSelId")[0].options.add(option);
|
||||
});
|
||||
$("#profileSelId").selectpicker("refresh");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
$("." + contentClassName + "0").removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
$(obj).addClass("hidden");
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
var delContent = function(contentClassName, addBtnClassName) {
|
||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||
$("." + addBtnClassName).removeClass("hidden");
|
||||
}
|
||||
</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="${_cfg.menuNameCode }"></spring:message>
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}">
|
||||
<spring:message code="add"></spring:message>
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<spring:message code="edit"></spring:message>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/proxy/control/manipulatPolicy/saveOrUpdate"
|
||||
method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" id="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<div class="form-body">
|
||||
|
||||
<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 hidden">
|
||||
<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 }" class="action"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode }"
|
||||
configDolog="${service.configDoLog }"
|
||||
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>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></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="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode == 16 || dict.itemCode == 48 || dict.itemCode == 80 }">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="userRegion5" class="userRegion5" value="${dict.itemCode }" class="required"
|
||||
<c:if test="${_cfg.userRegion5 == dict.itemCode || (_cfg.userRegion5==null && dict.itemCode==48)}">checked</c:if>>
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<%-- Hijack标识为85 --%>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="userRegion5" class="userRegion5" value="85" class="required"
|
||||
<c:if test="${_cfg.userRegion5 == 85}">checked</c:if>>
|
||||
<spring:message code="HiJack"/>
|
||||
</label>
|
||||
<%-- Insert标识为90 --%>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="userRegion5" class="userRegion5" value="90" class="required"
|
||||
<c:if test="${_cfg.userRegion5 == 90}">checked</c:if>>
|
||||
<spring:message code="Insert"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="userRegion5"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<c:if test="${empty _cfg.cfgId }">
|
||||
<c:set var="doLog" value="1"/>
|
||||
</c:if>
|
||||
<c:if test="${!empty _cfg.cfgId }">
|
||||
<c:set var="doLog" value="${_cfg.doLog }"/>
|
||||
</c:if>
|
||||
<!-- 记录日志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>
|
||||
<!-- 记录日志end -->
|
||||
|
||||
<%@include file="/WEB-INF/views/cfg/proxy/control/manipulatPolicyActionForm.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="cfg"
|
||||
varStatus="status">
|
||||
<c:set var="cfgName" value="httpUrlList[${status.index}]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index}
|
||||
<c:if test="${empty cfg.cfgId}">hidden disabled </c:if>" >
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<!--/url info-->
|
||||
</c:if>
|
||||
<c:if test="${region.configRegionValue eq _cfg.httpReqBody.cfgType }">
|
||||
<!--request body info-->
|
||||
<div class="httpReqCfg reqBodyCfg">
|
||||
<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="cfg"
|
||||
varStatus="status">
|
||||
<c:set var="cfgName" value="httpReqBodyList[${status.index}]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty cfg.cfgId}">hidden disabled </c:if>" >
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.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 resBodyCfg">
|
||||
<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="cfg"
|
||||
varStatus="status">
|
||||
<c:set var="cfgName" value="httpResBodyList[${status.index}]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty cfg.cfgId}">hidden disabled </c:if>" >
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${region.configRegionValue eq _cfg.ntcSubscribeIdCfg.cfgType }">
|
||||
<!--response body info-->
|
||||
<div class="httpReqCfg ntcSubscribeIdCfgCfg">
|
||||
<c:set var="tabName" value="ntcSubscribeIdCfgTab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="NTC_SUBSCRIBE_ID" />
|
||||
<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.ntcSubscribeIdCfgList}" var="cfg" varStatus="status">
|
||||
<c:set var="cfgName" value="ntcSubscribeIdCfgList[${status.index}]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty cfg.cfgId}">hidden disabled </c:if>" >
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.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 reqHdrCfg">
|
||||
<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="cfg"
|
||||
varStatus="status">
|
||||
<c:set var="cfgName" value="httpReqHdrList[${status.index}]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty cfg.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 resHdrCfg">
|
||||
<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="cfg"
|
||||
varStatus="status">
|
||||
<c:set var="cfgName" value="httpResHdrList[${status.index}]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${empty cfg.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"%>
|
||||
<br>
|
||||
<%@include file="/WEB-INF/include/form/scheduleNew.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">
|
||||
<c:set var="auditPermission" value="false"></c:set>
|
||||
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||
<shiro:hasPermission name="save:audit:permission">
|
||||
<c:set var="auditPermission" value="true"></c:set>
|
||||
</shiro:hasPermission>
|
||||
<c:choose>
|
||||
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||
<button id="audit" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<button id="save" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<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>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,629 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.destIpAddress}");
|
||||
}else if("${cfg.httpUrl.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.httpUrl.cfgKeywords}");
|
||||
}else if("${cfg.httpReqHdr.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.httpReqHdr.cfgKeywords}");
|
||||
}else if("${cfg.httpResHdr.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.httpResHdr.cfgKeywords}");
|
||||
}else if("${cfg.httpReqBody.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.httpReqBody.cfgKeywords}");
|
||||
}else if("${cfg.httpResBody.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.httpResBody.cfgKeywords}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#level").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
//异步获取配置相关信息
|
||||
$("span[id^=open]").click(function(){
|
||||
var openId=$(this).attr("id");
|
||||
var closeId=$(this).attr("id").replace("open","close");
|
||||
var index=$(this).attr("id").replace("open","");
|
||||
$("#"+openId).hide();
|
||||
$("#"+closeId).show();
|
||||
//var compileId=$(this).attr("compileId");
|
||||
var cfgId=$(this).attr("cfgId");
|
||||
if($("#"+openId).parent().parent().next("tr").hasClass("child")){
|
||||
$("#"+openId).parent().parent().next("tr").show();
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url:'${ctx}/proxy/control/httpRedirect/ajaxHttpSubList',
|
||||
data:{"cfgId":cfgId,"index":index},
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
var subTab="<tr class='child'>"+
|
||||
"<td style='border-right: 1px solid #FFFFFF;'>"+
|
||||
"<input type='checkbox' hidden='hidden'/>"+
|
||||
"</td>"+
|
||||
"<td colspan='"+($(".table tr").eq(0).children("th").length-1)+"'>";
|
||||
var html="";
|
||||
html+="<div class='row'>";
|
||||
html = html+data;
|
||||
subTab=subTab+html;
|
||||
subTab+="</td>";
|
||||
subTab+="</tr>";
|
||||
$("#"+openId).parent().parent().after(subTab);
|
||||
$("div[name='tabTitle"+index+"']").get(0).click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("span[id^=close]").on("click",function(){
|
||||
var closeId=$(this).attr("id");
|
||||
var openId=$(this).attr("id").replace("close","open");
|
||||
$("#"+closeId).hide();
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
|
||||
if($("#exportType").val() != null && $("#exportType").val() != ""){
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
$("#exportValue").val($("#intype").val());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<c:forEach items="${serviceList }" var="serviceDict">
|
||||
<c:if test="${serviceDict.functionId== cfg.functionId}">
|
||||
<c:set var="serviceName1" value="${serviceDict.serviceName }"/>
|
||||
<c:set var="action" value="${serviceDict.action }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
|
||||
<%-- 配置权限 --%>
|
||||
<c:set var="configPermissionName" value="http_manipulation:config"/>
|
||||
<%-- 审核权限 --%>
|
||||
<c:set var="confirmPermissionName" value="http_manipulation:confirm"/>
|
||||
<c:set var="actionPath" value="${ctx}/proxy/control/manipulatPolicy/list?functionId=${cfg.functionId}"></c:set>
|
||||
|
||||
<shiro:hasPermission name="${configPermissionName }">
|
||||
<button type="button" class="btn btn-primary addId" onClick="javascript:window.location='${ctx}/proxy/control/manipulatPolicy/form?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message>
|
||||
</button>
|
||||
<c:set var="serviceImport" value="false"></c:set>
|
||||
<c:set var="regionImport" value="false"></c:set>
|
||||
<c:forEach items="${serviceList}" var="service" >
|
||||
<c:if test="${(cfg.functionId eq service.functionId) && service.isImport eq 1}">
|
||||
<c:set var="serviceImport" value="true"></c:set>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:forEach items="${regionList}" var="region" >
|
||||
<c:if test="${(cfg.functionId eq region.functionId) && region.isImport eq 1}">
|
||||
<c:set var="regionImport" value="true"></c:set>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:if test="${serviceImport eq 'true' && regionImport eq 'true'}">
|
||||
<button type="button" class="btn btn-primary import importId" >
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="import"></spring:message>
|
||||
</button>
|
||||
</c:if>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${cfg.menuNameCode }"></spring:message>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${actionPath }" 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="exportType" type="hidden" value="${cfg.seltype}"/>
|
||||
<input id="exportValue" type="hidden" value=""/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='state'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
<form:option value="httpUrl.cfgKeywords"><spring:message code="URL"></spring:message></form:option>
|
||||
<form:option value="httpReqHdr.cfgKeywords"><spring:message code="http_req_hdr_keywords"></spring:message></form:option>
|
||||
<c:if test="${cfg.functionId ne 211}">
|
||||
<c:if test="${cfg.functionId ne 209}">
|
||||
<form:option value="httpReqBody.cfgKeywords"><spring:message code="http_req_body_keywords"></spring:message></form:option>
|
||||
</c:if>
|
||||
<form:option value="httpResHdr.cfgKeywords"><spring:message code="http_res_hdr_keywords"></spring:message></form:option>
|
||||
<c:if test="${cfg.functionId ne 208 && cfg.functionId ne 209}">
|
||||
<form:option value="httpResBody.cfgKeywords"><spring:message code="http_res_body_keywords"></spring:message></form:option>
|
||||
</c:if>
|
||||
</c:if>
|
||||
<form:option value="action"><spring:message code="block_type"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
<div class="input-group-btn">
|
||||
<form:select id="actionSelect" path="action" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<form:option value="${service.action }"><spring:message code="action_${service.actionCode }"/></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
<form:select path="isValid" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<form:option value="1"><spring:message code="yes"/></form:option>
|
||||
<form:option value="0"><spring:message code="no"/></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<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="${configPermissionName }">
|
||||
<sys:delRow url="${ctx}/proxy/control/manipulatPolicy/form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/proxy/control/manipulatPolicy/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<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="export"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
|
||||
<li><sys:delRow url="${ctx}/proxy/control/manipulatPolicy/exportPolicy?functionId=${cfg.functionId }&exType=excel" id="contentTable" searchUrl="${actionPath }" label="cfg_excel"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/control/manipulatPolicy/exportPolicy?functionId=${cfg.functionId }&exType=csv" id="contentTable" searchUrl="${actionPath }" label="cfg_csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<shiro:hasPermission name="${confirmPermissionName }">
|
||||
<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/control/manipulatPolicy/audit?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/control/manipulatPolicy/audit?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/proxy/control/manipulatPolicy/audit?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='letter'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='classification'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
</div>
|
||||
<sys:message content="${message}" type="${messageType }"/>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th column="cfg_id" class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th>
|
||||
<th column="config_describe" class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th column="block_type" class="sort-column a.action"><spring:message code="block_type"/></th>
|
||||
|
||||
<th><spring:message code="response_code"/></th>
|
||||
<th><spring:message code="response_content"/></th>
|
||||
<th><spring:message code="redirect_url"/></th>
|
||||
<th><spring:message code="replace_zone"/></th>
|
||||
<th><spring:message code="replaced_content"/></th>
|
||||
<th><spring:message code="replace_content"/></th>
|
||||
|
||||
<th column="is_audit" ><spring:message code="is_audit"/></th>
|
||||
<th column="valid_identifier" class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_schduler"/></th>
|
||||
<th column="do_log" ><spring:message code="do_log"/></th>
|
||||
<th column="log_total" ><spring:message code="log_total"/></th>
|
||||
<th column="whether_area_block" ><spring:message code="whether_area_block"/></th>
|
||||
<th column="letter" ><spring:message code="letter"/></th>
|
||||
<th column="classification" ><spring:message code="classification"/></th>
|
||||
<th column="attribute" ><spring:message code="attribute"/></th>
|
||||
<th column="label" ><spring:message code="label"/></th>
|
||||
<th column="creator" ><spring:message code="creator"/></th>
|
||||
<th column="config_time" class="sort-column a.create_time"><spring:message code="config_time"/></th>
|
||||
<th column="editor" ><spring:message code="editor"/></th>
|
||||
<th column="edit_time" class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th column="auditor" ><spring:message code="auditor"/></th>
|
||||
<th column="audit_time" class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="open${status.index}" class="" compileId="${indexCfg.compileId}" cfgId="${indexCfg.cfgId}"> ▷ </span><span style="display: none" id="close${status.index}" > ▼ </span>
|
||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
|
||||
</td>
|
||||
<td>${indexCfg.compileId }</td>
|
||||
<td>${indexCfg.cfgDesc }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.userRegion5 }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:if test="${indexCfg.userRegion5 eq 85 }">
|
||||
<spring:message code="HiJack"/>
|
||||
</c:if>
|
||||
<c:if test="${indexCfg.userRegion5 eq 90 }">
|
||||
<spring:message code="Insert"/>
|
||||
</c:if>
|
||||
</td>
|
||||
|
||||
|
||||
<c:if test="${indexCfg.userRegion5 == 16}">
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('RESPONSE_CODE') }" var="dict1">
|
||||
<c:if test="${dict1.itemCode eq indexCfg.userRegion1 }">
|
||||
${dict1.itemCode}
|
||||
<spring:message code="${dict1.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td <c:if test="${not empty indexCfg.userRegion2 }"> title="${indexCfg.userRegion2 }"</c:if>"><!-- 阻断 响应内容 -->
|
||||
<c:if test="${not empty indexCfg.userRegion2 }">${fns:abbr(indexCfg.userRegion2,20)}</c:if>
|
||||
<%-- <c:if test="${not empty indexCfg.userRegion4 }">
|
||||
<c:forEach items="${allProxyFileStrategys}" var="file">
|
||||
<c:if test="${file.compileId eq indexCfg.userRegion3}">
|
||||
<a href="${file.url }" target="_blank">${file.fileDesc }</a>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if> --%>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</c:if>
|
||||
<c:if test="${indexCfg.userRegion5 == 48}">
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('REDIRECT_RESPONSE_CODE') }" var="dict2">
|
||||
<c:if test="${dict2.itemCode eq indexCfg.userRegion1 }">
|
||||
${dict2.itemCode}
|
||||
<spring:message code="${dict2.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td></td>
|
||||
<td <c:if test="${not empty indexCfg.userRegion2 }"> title="${indexCfg.userRegion2 }"</c:if>><!-- 重定向 响应内容 ,userRegion3 不为空 响应文件-->
|
||||
<c:if test="${not empty indexCfg.userRegion2 }">${fns:abbr(indexCfg.userRegion2,20)}</c:if>
|
||||
<%-- <c:if test="${not empty indexCfg.userRegion3 }">
|
||||
<c:forEach items="${allProxyFileStrategys}" var="file">
|
||||
<c:if test="${file.compileId eq indexCfg.userRegion3}">
|
||||
<a href="${file.url }" target="_blank">${file.fileDesc }</a>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if> --%>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${indexCfg.userRegion5 == 80}">
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<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>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td title="${indexCfg.userRegion2 }">${fns:abbr(indexCfg.userRegion2,20)}</td>
|
||||
<td title="${indexCfg.userRegion3 }">${fns:abbr(indexCfg.userRegion3,20)}</td>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${indexCfg.userRegion5 != 16 && indexCfg.userRegion5 != 48 && indexCfg.userRegion5 != 80}">
|
||||
<td></td><td></td><td></td><td></td><td></td><td></td>
|
||||
</c:if>
|
||||
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${indexCfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${indexCfg.isAudit eq '3'}"><span indexTable="${indexCfg.indexTable}" data-placement="right" data-original-title="<spring:message code='letter_cancel_info'/>: " class="label le-ca-fo label-warning tooltips" data-icon=""> <spring:message code="cancel_approved"/></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${indexCfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td class="schedulerFlag">
|
||||
<c:choose>
|
||||
<c:when test="${not empty indexCfg.schedule }">
|
||||
<span isScheduler="yes">
|
||||
<i class="icon-clock icon-state-danger"></i>
|
||||
</span>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<span isScheduler="no">
|
||||
</span>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.doLog and indexCfg.action!=64 }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}" serviceId="${indexCfg.serviceId}"><div class="loading-total"></div></td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
|
||||
<c:if test="${indexCfg.isAreaEffective==1}">
|
||||
<a href="javascript:viewAreaInfo('${ctx}','${indexCfg.areaEffectiveIds }','${indexCfg.compileId }')" >
|
||||
<spring:message code="selective"/>
|
||||
</a>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>${indexCfg.requestName }</td>
|
||||
<td>
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="classify" value="${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${classify}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(classify,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="attribute" value="${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${attribute}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(attribute,20)}
|
||||
</a>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(indexCfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${lableInfo}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>${indexCfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${indexCfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${indexCfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page" >${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:set var="importPath" value="/proxy/control/manipulatPolicy/list?functionId=${cfg.functionId}"/>
|
||||
<!-- 模板导入,start -->
|
||||
<%@include file="/WEB-INF/include/excel/importModal.jsp" %>
|
||||
</body>
|
||||
</html>
|
||||
@@ -14,6 +14,7 @@ $(function(){
|
||||
$("input[name='serviceDictId']").click(function(){
|
||||
switchService();
|
||||
});
|
||||
|
||||
$("input[name='regionDictIds']").click(function(){
|
||||
});
|
||||
|
||||
@@ -36,12 +37,21 @@ $(function(){
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($("#functionId").val() == 215){
|
||||
profileChange($("input[name='manipulatType']:checked").val());
|
||||
$("input[name='manipulatType']").click(function(){
|
||||
profileChange($(this).val());
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
/**
|
||||
* action动作切换
|
||||
*/
|
||||
function switchService(){
|
||||
var functionId=$("#functionId").val();
|
||||
|
||||
if(functionId==5){//IP配置特殊处理
|
||||
var cfgRegionCodeS=$("input[name='serviceDictId']:checked").attr("cfgRegionCodeS");
|
||||
var cfgRegionCode=cfgRegionCodeS.split(",")[0];
|
||||
@@ -78,6 +88,7 @@ function switchService(){
|
||||
$(label).show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 模板下载
|
||||
@@ -85,9 +96,10 @@ function switchService(){
|
||||
* */
|
||||
function downLoadTemplate(path){
|
||||
var obj={
|
||||
"regionDictId":$("input[name='regionDictIds']:checked").val()
|
||||
,"serviceDictId":$("input[name='serviceDictId']:checked").val()
|
||||
,"requestId":$("select[name='requestId']").val()
|
||||
"regionDictId":$("input[name='regionDictIds']:checked").val(),
|
||||
"serviceDictId":$("input[name='serviceDictId']:checked").val(),
|
||||
"requestId":$("select[name='requestId']").val(),
|
||||
"manipulatType":$("input[name='manipulatType']:checked").val()
|
||||
};
|
||||
var params = $.param(obj);
|
||||
document.location.href = path+'/ntc/iplist/import/template?' + params;
|
||||
@@ -151,6 +163,7 @@ var importCfg=function(){
|
||||
appFlag=false;
|
||||
}
|
||||
}
|
||||
|
||||
var fileName = $(".fileupload-preview", $("#importForm1")).text();
|
||||
var $error = $('.alert-error', $("#importForm1"));
|
||||
if(!appFlag){
|
||||
@@ -160,6 +173,14 @@ var importCfg=function(){
|
||||
return false;
|
||||
}
|
||||
|
||||
// 代理-操控业务Profile Info
|
||||
if($("#profileSelId").val() == "" || $("#profileSelId").val() == null){
|
||||
$("span",$error).html($("#noneProfileTip").val());
|
||||
$error.removeClass("hide");
|
||||
$error.addClass("show");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(fileName==""){
|
||||
$("span",$error).html($("#noneFileTip").val());
|
||||
$error.removeClass("hide");
|
||||
@@ -172,6 +193,7 @@ var importCfg=function(){
|
||||
$error.addClass("show");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#import_modal").modal('hide');//导入文件隐藏
|
||||
$("#importForm1").submit();
|
||||
}
|
||||
@@ -181,4 +203,67 @@ var closeTip = function(){
|
||||
var $error = $('.alert-error', $("#importForm1"));
|
||||
$error.removeClass("show");
|
||||
$error.addClass("hide");
|
||||
}
|
||||
|
||||
function profileChange(val){
|
||||
if(typeof val == 'undefined'){
|
||||
return false;
|
||||
}
|
||||
|
||||
$(".region").find("label[class='radio-inline']").each(function(){
|
||||
$(this).show();
|
||||
});
|
||||
|
||||
var reqHdrInput = $(".region").find("input[regionvalue='PXY_CTRL_HTTP_REQ_HDR']");
|
||||
var resBodyInput = $(".region").find("input[regionvalue='PXY_CTRL_HTTP_RES_BODY']");
|
||||
var reqBodyInput = $(".region").find("input[regionvalue='PXY_CTRL_HTTP_REQ_BODY']");
|
||||
|
||||
// 根据动作隐藏配置域,若该域隐藏前已被选中则默认选中首个
|
||||
var resetFlag = false;
|
||||
if(val == 48){
|
||||
if($(resBodyInput).prop("checked") == true){
|
||||
resetFlag = true;
|
||||
}
|
||||
$(resBodyInput).parents("label:first").hide();
|
||||
}else if(val == 80){
|
||||
if($(reqBodyInput).prop("checked") == true || $(resBodyInput).prop("checked") == true){
|
||||
resetFlag = true;
|
||||
}
|
||||
$(reqBodyInput).parents("label:first").hide();
|
||||
$(resBodyInput).parents("label:first").hide();
|
||||
}else if(val == 85 || val == 90){
|
||||
if($(reqHdrInput).prop("checked") == true || $(reqBodyInput).prop("checked") == true || $(resBodyInput).prop("checked") == true){
|
||||
resetFlag = true;
|
||||
}
|
||||
$(reqHdrInput).parents("label:first").hide();
|
||||
$(reqBodyInput).parents("label:first").hide();
|
||||
$(resBodyInput).parents("label:first").hide();
|
||||
}
|
||||
if(resetFlag){
|
||||
$("input[name='regionDictIds']:first").prop("checked",true);
|
||||
}
|
||||
|
||||
if(val == 48 || val == 80){ // 重定向和替换动作无Profile属性
|
||||
$(".profileInfo").addClass("hidden");
|
||||
}else{
|
||||
$(".profileInfo").removeClass("hidden");
|
||||
// Get Policy Profile Info
|
||||
var pathName = window.document.location.pathname.substring(0,window.document.location.pathname.lastIndexOf("/nis")+4);
|
||||
$.ajax({
|
||||
type:'get',
|
||||
url:pathName+'/proxy/control/manipulatPolicy/ajaxGetProfileInfo?source='+val,
|
||||
dataType:'json',
|
||||
success:function(data){
|
||||
if(data != null){
|
||||
$("#profileSelId").empty();
|
||||
$.each(data, function(i, n){
|
||||
var option = new Option(data[i].cfgDesc, data[i].compileId);
|
||||
$("#profileSelId")[0].options.add(option);
|
||||
});
|
||||
$("#profileSelId").selectpicker("refresh");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user