(1)function_service_dict增加一列config_do_log,用于控制各个业务类型的doLog值的选择范围。
(2)WhiteList,PacketStream下的form表单加入doLog的控制
This commit is contained in:
@@ -98,6 +98,7 @@
|
||||
<script src="${pageContext.request.contextPath}/static/global/scripts/app.js" type="text/javascript"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/scripts/ipRegion.js" type="text/javascript"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/scripts/pzLog.js" type="text/javascript"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/scripts/doLog.js" type="text/javascript"></script>
|
||||
<!-- 文件导入 -->
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-fileupload/js/bootstrap-fileupload.js" type="text/javascript"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-fileupload/js/jquery.cookie.min.js" type="text/javascript"></script>
|
||||
|
||||
@@ -309,9 +309,10 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
<input type="radio" name="action" class="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
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">
|
||||
|
||||
@@ -241,10 +241,11 @@ var switchRateLimitType=function(){
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
<input type="radio" name="action" class="action"
|
||||
serviceId="${service.serviceId }"
|
||||
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">
|
||||
|
||||
@@ -240,6 +240,7 @@ var switchRateLimitType=function(){
|
||||
serviceId="${service.serviceId }"
|
||||
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">
|
||||
|
||||
@@ -483,7 +483,7 @@
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="regionSize" name="regionSize" value="${fn:length(regionList)}">
|
||||
<input type="hidden" id="doLog" name="doLog" value="2">
|
||||
<!-- <input type="hidden" id="doLog" name="doLog" value="2"> -->
|
||||
|
||||
<div class="form-body">
|
||||
|
||||
@@ -510,6 +510,7 @@
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
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">
|
||||
@@ -535,7 +536,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- dolog begin-->
|
||||
<%-- <div class="row interceptDoLog">
|
||||
<div class="row interceptDoLog doLog">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||
@@ -556,7 +557,7 @@
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
</div>
|
||||
<!-- dolog end-->
|
||||
|
||||
<%-- action 为1 监测时 可以选择证书--%>
|
||||
|
||||
@@ -498,6 +498,7 @@ var showHideIPSECProtocol=function(obj){
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode }"
|
||||
configDoLog="${service.configDoLog }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.serviceId==service.serviceId || (_cfg.serviceId==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
|
||||
@@ -171,7 +171,6 @@
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<!-- <input type="hidden" name="protocol" value="0">
|
||||
<input type="hidden" name="direction" value="0"> -->
|
||||
<input type="hidden" name="doLog" value="0" >
|
||||
<input type="hidden" name="isAreaEffective" value="0" >
|
||||
<input type="hidden" id="serviceId" name="serviceId"
|
||||
value="${_cfg.serviceId}">
|
||||
@@ -199,10 +198,11 @@
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
<input type="radio" name="action" class="action"
|
||||
serviceId="${service.serviceId }"
|
||||
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">
|
||||
@@ -219,30 +219,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- dolog begin-->
|
||||
<%--
|
||||
|
||||
<div class="row doLog">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
||||
<c:choose>
|
||||
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
||||
</label>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
--%>
|
||||
|
||||
<!-- dolog end-->
|
||||
<c:set var="ipCfgIndex" value="0"></c:set>
|
||||
<c:set var="strCfgIndex" value="0"></c:set>
|
||||
|
||||
67
src/main/webapp/static/global/scripts/doLog.js
Normal file
67
src/main/webapp/static/global/scripts/doLog.js
Normal file
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* 处理doLog
|
||||
*/
|
||||
$(function(){
|
||||
var doLog=$("[name$=action]:checked").attr("configDoLog");
|
||||
if(!doLog){
|
||||
$("[name$=action]").attr("configDoLog");
|
||||
}
|
||||
if(doLog&&doLog!=""){
|
||||
processDoLog(doLog);
|
||||
}
|
||||
$(".action").on("change",function(){
|
||||
var _doLog=$(this).attr("configDoLog");
|
||||
if(_doLog&&_doLog!=""){
|
||||
processDoLog(_doLog);
|
||||
}
|
||||
});
|
||||
});
|
||||
var processDoLog=function(doLog){
|
||||
var doLogValue=$("[name$='doLog']:checked").val();
|
||||
var dologObj=doLogOpt(doLog);
|
||||
if(dologObj.isShown==0){
|
||||
$(".doLog").addClass("hidden");
|
||||
}else{
|
||||
$(".doLog").removeClass("hidden");
|
||||
}
|
||||
var dologOptionValues=dologObj.options.split(",");
|
||||
if(dologOptionValues.length==1){
|
||||
$(".doLog").find("[name='doLog']").each(function(){
|
||||
if($(this).val()==dologObj.options){
|
||||
$(this).attr("checked",true);
|
||||
$(this).parents(".radio-inline").removeClass("hidden");
|
||||
}else{
|
||||
$(this).removeAttr("checked");
|
||||
$(this).parents(".radio-inline").addClass("hidden");
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$(".doLog").find("[name$='doLog']").each(function(){
|
||||
var has=false;
|
||||
for(var j in dologOptionValues){
|
||||
if($(this).val()==dologOptionValues[j]){
|
||||
has=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(has){
|
||||
$(this).parents(".radio-inline").removeClass("hidden");
|
||||
}else{
|
||||
$(this).parents(".radio-inline").addClass("hidden");
|
||||
}
|
||||
});
|
||||
if($(".doLog").find("[name$='doLog'] [value='"+doLogValue+"']:visible")){
|
||||
$(".doLog").find("[name$='doLog'] [value='"+doLogValue+"']:visible").attr("checked",true);
|
||||
}else if($(".doLog").find("[name$='doLog'] [value='2']:visible")){//默认值为2
|
||||
$(".doLog").find("[name$='doLog'] [value='2']:visible").attr("checked",true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
var doLogOpt=function(doLog){
|
||||
var doLogObj={};
|
||||
var doArr=doLog.split(';');
|
||||
doLogObj.isShown=doArr[0];
|
||||
doLogObj.options=doArr[1];
|
||||
return doLogObj;
|
||||
}
|
||||
Reference in New Issue
Block a user