1、动作:白名单,阻断,监测
2、白名单业务为原有的域名白名单,阻断和监测业务为HTTP的阻断和监测业务
This commit is contained in:
leijun
2018-10-05 02:26:15 +08:00
parent bcf66ef52d
commit c06d7e11cb
5 changed files with 134 additions and 73 deletions

View File

@@ -16,6 +16,15 @@
$(".action").on("change", function() {
$("#serviceId").val($(this).attr("serviceId"));
$("#protocolId").val($(this).attr("protocolId"));
if($(this).val()!=128){
$("#http_url").removeClass("hidden");
$(".httpurlCfg").removeClass("hidden").removeClass("disabled");
$(".httpwhite").addClass("hidden").addClass("disabled");
}else{
$(".httpwhite").removeClass("hidden").removeClass("disabled");
$(".httpurlCfg").addClass("hidden").addClass("disabled");
$("#http_url").addClass("hidden");
}
});
$("#serviceId").val($(".action:checked").attr("serviceId"));
$("#protocolId").val($(".action:checked").attr("protocolId"));
@@ -80,37 +89,39 @@
},
errorContainer : "#messageBox",
});
var actions=$("input[name='action']:checked").val();
if(actions!=128){
$("#http_url").removeClass("hidden");
$(".httpurlCfg").removeClass("hidden").removeClass("disabled");
$(".httpwhite").addClass("hidden").addClass("disabled");
}else{
$(".httpwhite").removeClass("hidden").removeClass("disabled");
$(".httpurlCfg").addClass("hidden").addClass("disabled");
$("#http_url").addClass("hidden");
}
});
//业务窗口打开
var addContent = function(obj, contentClassName) {
/* var addContent = function(obj, contentClassName) {
var showDiv = $(obj).parent().parent().next();
$(showDiv).removeClass("hidden").removeClass(
"disabled");
/* $("."+contentClassName+"0").find("input,select").each(function(){
$(showDiv).removeClass("hidden").removeClass("disabled");
$("."+contentClassName+"0").find("input,select").each(function(){
$(this).removeAttr("disabled");
}); */
});
$(obj).addClass("hidden");
}
} */
//业务窗口关闭
var delContent = function(contentClassName, addBtnClassName) {
/* var delContent = function(contentClassName, addBtnClassName) {
$("." + contentClassName).addClass("hidden").addClass("disabled");
/* $("."+contentClassName).find("input,select").each(function(){
$(this).attr("disabled","true");
}); */
$("." + 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">
@@ -132,14 +143,9 @@
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
<input type="hidden" name="compileId" value="${_cfg.compileId}">
<input type="hidden" name="functionId" value="${_cfg.functionId}">
<input type="hidden" name="doLog" value="0" >
<input type="hidden" name="isAreaEffective" value="0" >
<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">
@@ -179,51 +185,73 @@
</div>
</div>
</div>
<h4 class="form-section">
<spring:message code="domain_whitelist" />
</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="domain_name"/></label>
<div class="col-md-6">
<input class="form-control required domainCheck" type="text" name="httpUrlList[0].cfgKeywords" value="${_cfg.httpUrlList[0].cfgKeywords}">
<input type="hidden" name="httpUrlList[0].exprType" value="0">
<input type="hidden" name="httpUrlList[0].matchMethod" value="0">
<input type="hidden" name="httpUrlList[0].isHexbin" value="0">
</div>
<div for="httpUrlList[0].cfgKeywords"></div>
</div>
</div>
</div>
<!-- dolog begin-->
<%-- <div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
<c:choose>
<c:when test="${dict.itemCode eq _cfg.doLog}">
<label class="radio-inline">
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
</label>
</c:when>
<c:otherwise>
<label class="radio-inline">
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
</label>
</c:otherwise>
</c:choose>
</c:forEach>
<div 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>
</div> --%>
<!-- dolog end-->
</div>
<h4 class="form-section">
<spring:message code="http_url_title" />
</h4>
<c:set var="strCfgIndex" value="0"></c:set>
<c:set var="subscribeIdIndex" value="0"></c:set>
<c:forEach items="${regionList}" var="region" varStatus="status">
<c:if test="${region.regionType eq 2 and region.configServiceType ne 'subscribe_id'}">
<c:if test="${region.configRegionValue eq 'WHITE_LIST_DOMAIN' }">
<div class="httpwhite">
<c:set var="tabName" value="httpUrlTab"></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}" >
<div class="col-md-6">
<div class="form-group " style="margin-top: 15px;">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="URL"/></label>
<div class="col-md-6">
<input class="form-control required domainCheck" type="text" name="httpUrlList[0].cfgKeywords" value="${_cfg.httpUrlList[0].cfgKeywords}">
<input type="hidden" name="httpUrlList[0].exprType" value="0">
<input type="hidden" name="httpUrlList[0].matchMethod" value="0">
<input type="hidden" name="httpUrlList[0].isHexbin" value="0">
<input type="hidden" name="httpUrlList[0].cfgType" value="WHITE_LIST_DOMAIN">
</div>
<div for="httpUrlList[0].cfgKeywords"></div>
</div>
</div>
</div>
</c:forEach>
</div>
</c:if>
<c:if test="${region.configRegionValue eq _cfg.httpUrl.cfgType }">
<div class="httpurlCfg">
<c:set var="tabName" value="httpUrlTab"></c:set>
<%-- <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}" >
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
</div>
</c:forEach>
</div>
</c:if>
<%-- <c:if test="${region.regionType eq 2 and region.configServiceType ne 'subscribe_id'}">
<input type="hidden" name="httpUrlList[0].cfgType" value="${region.configRegionValue}">
<input type="hidden" name="httpUrlList[0].cfgRegionCode" value="${region.configRegionCode}">
</c:if>
@@ -237,7 +265,7 @@
onClick="addContent(this,'${tabName}')" title="add"></span></small>
</h4>
<c:set var="cfgName" value="ntcSubscribeIdCfgList[${subscribeIdIndex}]"></c:set>
<%-- <c:set var="regionValue" value="${region.configRegionValue}"></c:set> --%>
<c:set var="regionValue" value="${region.configRegionValue}"></c:set>
<c:choose>
<c:when test="${fn:length(_cfg.ntcSubscribeIdCfgList)>0}">
<c:set var="isBreak" value="false" ></c:set>
@@ -270,15 +298,13 @@
</c:if>
</c:otherwise>
</c:choose>
</c:if>
</c:if> --%>
</c:forEach>
<br>
<%--@include file="/WEB-INF/include/form/areaInfo.jsp"--%>
<%--@include file="/WEB-INF/include/form/basicInfo.jsp"--%>
<input type="hidden" name="requestId" value="0"/>
<input type="hidden" name="classify" value="0"/>
<input type="hidden" name="attribute" value="0"/>
<input type="hidden" name="lable" value="0"/>
<div id="http_url">
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-6">

View File

@@ -114,16 +114,27 @@
</c:if>
<c:if test="${(region[0] eq 2) && (fn:length(_cfg.httpUrlList) >0)}">
<c:forEach items="${_cfg.httpUrlList}" var="cfg">
<c:if test="${region[1] eq cfg.cfgType }">
<c:if test="${'WHITE_LIST_DOMAIN' eq cfg.cfgType }">
<div id="${region[1]}Info${index}" class="content content${region[0]}" name="subCfg${index}">
<div class="row">
<div class="col-md-8">
<div class="form-group">
<label><spring:message code='domain' />: ${fn:replace(cfg.cfgKeywords, "***and***", " ")}</label>
<label><spring:message code='URL' />: ${fn:replace(cfg.cfgKeywords, "***and***", " ")}</label>
</div>
</div>
</div>
<%-- <div class="row">
</c:if>
<c:if test="${'NTC_HTTP_URL' eq cfg.cfgType }">
<div id="${region[1]}Info${index}" class="content content${region[0]}" name="subCfg${index}">
<div class="row">
<div class="col-md-8">
<div class="form-group">
<label><spring:message code='URL' />: ${fn:replace(cfg.cfgKeywords, "***and***", " ")}</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label><spring:message code='expression_type' />:</label>
@@ -159,7 +170,7 @@
</label>
</div>
</div>
</div> --%>
</div>
</div>
</c:if>
</c:forEach>