DNS reject增加策略分组功能
This commit is contained in:
@@ -129,14 +129,30 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
var compileIdStr="";
|
||||
var ids="";
|
||||
var compileIds="";
|
||||
var flag=false;//是否删除的为但是响应策略的无策略配置
|
||||
checkboxes.each(function(){
|
||||
if(true == $(this).is(':checked')){
|
||||
str+=$(this).attr("id")+",";
|
||||
if($(this).attr("compileId")){
|
||||
compileIdStr +=$(this).attr("compileId")+",";
|
||||
}
|
||||
var id=$(this).attr("id");
|
||||
var serviceId=$(this).attr("id");
|
||||
if($(this).attr("serviceId")){
|
||||
serviceId=$(this).attr("serviceId");
|
||||
}
|
||||
if(serviceId == 65 && id==0){
|
||||
flag=true;
|
||||
}
|
||||
str+=$(this).attr("id")+",";
|
||||
if($(this).attr("compileId")){
|
||||
compileIdStr +=$(this).attr("compileId")+",";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if(flag && url.indexOf("?isAudit=3") > 1){
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
|
||||
if(str.substr(str.length-1)== ','){
|
||||
ids = str.substr(0,str.length-1);
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ $(function(){
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="protocolId" name="protocolId" value="${_cfg.protocolId}">
|
||||
<input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
@@ -76,8 +77,7 @@ $(function(){
|
||||
<label class="control-label col-md-3"><spring:message code="policy_name"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="dnsStrategyId" class="selectpicker show-tick form-control">
|
||||
<option value="0"><spring:message code="select"/></option>
|
||||
<c:forEach items="${dnsStrategys }" var="dnsStrategy">
|
||||
<c:forEach items="${dnsResStrategys }" var="dnsStrategy">
|
||||
<option value="${dnsStrategy.cfgId}" <c:if test="${_cfg.dnsStrategyId==dnsStrategy.cfgId }">selected</c:if>><spring:message code="${dnsStrategy.cfgDesc}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
|
||||
@@ -121,7 +121,6 @@
|
||||
<sys:delRow url="${ctx}/cfg/dnsIp/form" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/cfg/dnsIp/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="dns:fake:ip:audit">
|
||||
<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>
|
||||
@@ -133,7 +132,6 @@
|
||||
<li><sys:delRow url="${ctx}/cfg/dnsIp/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>
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" value="${cfg.isAudit}"></td>
|
||||
<td><input type="checkbox" class="i-checks" serviceId="${cfg.serviceId}" id="${cfg.cfgId}" value="${cfg.isAudit}"></td>
|
||||
<td>${cfg.cfgId }</td>
|
||||
<td>
|
||||
<a href="javascript:;" data-original-title="${cfg.cfgDesc}"
|
||||
|
||||
@@ -160,6 +160,21 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 policy">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="policy_name" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="dnsStrategyId" class="selectpicker show-tick form-control">
|
||||
<c:forEach items="${dnsResStrategys }" var="dnsStrategy">
|
||||
<option value="${dnsStrategy.cfgId}" <c:if test="${_cfg.dnsStrategyId==dnsStrategy.cfgId }">selected</c:if>><spring:message code="${dnsStrategy.cfgDesc}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:set var="ipCfgIndex" value="0"></c:set>
|
||||
<c:set var="complexCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
|
||||
@@ -305,6 +305,7 @@
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th class="cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="policy_name"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
@@ -329,6 +330,7 @@
|
||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
|
||||
</td>
|
||||
<td>${indexCfg.cfgDesc }</td>
|
||||
<td>${indexCfg.dnsStrategyName }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq indexCfg.action }">
|
||||
|
||||
@@ -23,6 +23,12 @@ $(function(){
|
||||
$("select[name$='portPattern']").on("change",function(){
|
||||
switchIpInfo(this);
|
||||
});
|
||||
switchAction($("input[name='action']:checked").val());
|
||||
//DNS REJECT 时选择dnsStrategyId
|
||||
$("input[name='action']").on('change',function(){
|
||||
var action=$(this).val();
|
||||
switchAction(action);
|
||||
});
|
||||
$(".glyphicon-plus").on("click",function(){
|
||||
var obj=$(this).parents(".form-section").next(".container-fluid").clone();
|
||||
var len=$(this).parents("div").find(".container-fluid:visible").size();
|
||||
@@ -344,6 +350,20 @@ var switchIpType=function(obj){
|
||||
}
|
||||
}
|
||||
}
|
||||
var switchAction=function(action){
|
||||
if(action == 16){ //reject
|
||||
$(".policy").find("input,select,div,button").each(function(){
|
||||
$(this).removeAttr("disabled");
|
||||
$(this).removeClass("hidden");
|
||||
$(this).removeClass("disabled");
|
||||
})
|
||||
}else{
|
||||
$(".policy").find("input,select,div,button").each(function(){
|
||||
$(this).attr("disabled","disabled");
|
||||
$(this).addClass("hidden");
|
||||
})
|
||||
}
|
||||
}
|
||||
//ipType、ipPattern、portPattern选项变化时调用此方法,添加默认值
|
||||
var switchIpInfo=function(obj){
|
||||
var ipType="";
|
||||
|
||||
Reference in New Issue
Block a user