Merge branch 'develop' of https://git.mesalab.cn/K18_NTCS_WEB/NTC.git into develop
This commit is contained in:
@@ -27,18 +27,18 @@
|
||||
}
|
||||
}
|
||||
//hide actions
|
||||
if(isAsn==1){
|
||||
/* if(isAsn==1){
|
||||
hideAction(0,asnRegionCode);
|
||||
}else{
|
||||
hideAction(1,asnRegionCode);
|
||||
}
|
||||
if(isAsn==0){
|
||||
$("[class~='glyphicon-plus'][class~='ipPortList']").click();
|
||||
$("[class~='boxSolid'][class~='asn']").find(".glyphicon-remove").click();
|
||||
/*if(action==32){
|
||||
} */
|
||||
/* $("[class~='boxSolid'][class~='asn']").find(".glyphicon-remove").click();*/
|
||||
if($(".action:checked").val()==32){
|
||||
$(".subscribeId").find(".glyphicon-remove").click();
|
||||
$(".subscribeId").prev("h4").addClass("hidden");
|
||||
}*/
|
||||
$(".asnRegionV").find(".glyphicon-remove").click();
|
||||
$(".asnRegionV").prev("h4").addClass("hidden");
|
||||
}
|
||||
var regionCodes=$(".action:checked").attr("regionCode").split(",");
|
||||
$("h4[class*='ipPortListTitle']").each(function(){
|
||||
var has=false;
|
||||
@@ -52,36 +52,6 @@
|
||||
}
|
||||
});
|
||||
processAction(isAsn,$(".ipPortList"));
|
||||
}else{
|
||||
$("[class~='glyphicon-plus'][class~='asn']").click();
|
||||
$("[class~='boxSolid'][class~='ipPortList']").find(".glyphicon-remove").click();
|
||||
processAction(isAsn,$(".asn"));
|
||||
}
|
||||
//隐藏显示asn
|
||||
if($("[name='action']:checked").val()==32||$("[name='action']:checked").val()==64){
|
||||
console.log(111);
|
||||
$("h4.form-section.asn").addClass("hidden");
|
||||
}else{
|
||||
$("h4.form-section.asn").removeClass("hidden");
|
||||
}
|
||||
$(".glyphicon-plus").on("click",function(){
|
||||
if($(this).hasClass("ipPortList")){
|
||||
isAsn=0;
|
||||
hideAction(1,asnRegionCode);
|
||||
$("[class~='boxSolid'][class~='asn']").find(".glyphicon-remove").click();
|
||||
}
|
||||
if($(this).hasClass("asn")){
|
||||
isAsn=1;
|
||||
hideAction(0,asnRegionCode);
|
||||
$("[class~='boxSolid'][class~='ipPortList']").find(".glyphicon-remove").click();
|
||||
}
|
||||
});
|
||||
//处理asn id
|
||||
$(".asn").find("input[name='userRegion5']").val($(".asn").find("select[name='userRegion4'] option:selected").attr("asnId"));
|
||||
$(".asn").find("select[name='userRegion4']").on("change",function(){
|
||||
var asnId=$(this).find("option[value='"+$(this).val()+"']").attr("asnId");
|
||||
$(this).parents(".row").find("input[name='userRegion5']").val(asnId);
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
@@ -116,9 +86,10 @@
|
||||
tabInfo.find("[name$='cfgType']").val(cfgType);
|
||||
tabInfo.find("[name$='cfgRegionCode']").val(cfgRegionCode);
|
||||
}
|
||||
if(isAsn==0){
|
||||
|
||||
/*if(isAsn==0){
|
||||
changeIPVal(tabInfo);
|
||||
}
|
||||
} */
|
||||
processAction(isAsn,tabInfo);
|
||||
/* if(tabInfo){
|
||||
tabInfo.find("[name$='cfgType']").val(cfgType);
|
||||
@@ -127,8 +98,11 @@
|
||||
if($(this).val()==32||$(this).val()==96){
|
||||
$(".subscribeId").find(".glyphicon-remove").click();
|
||||
$(".subscribeId").prev("h4").addClass("hidden");
|
||||
$(".asnRegionV").find(".glyphicon-remove").click();
|
||||
$(".asnRegionV").prev("h4").addClass("hidden");
|
||||
}else{
|
||||
$(".subscribeId").prev("h4").removeClass("hidden");
|
||||
$(".asnRegionV").prev("h4").removeClass("hidden");
|
||||
}
|
||||
//处理ICMP
|
||||
if($(this).val()==32){
|
||||
@@ -145,17 +119,20 @@
|
||||
|
||||
} */
|
||||
//隐藏显示asn
|
||||
if($(this).val()==32||$(this).val()==64){
|
||||
/* if($(this).val()==32||$(this).val()==64){
|
||||
$("h4.form-section.asn").addClass("hidden");
|
||||
}else{
|
||||
$("h4.form-section.asn").removeClass("hidden");
|
||||
}
|
||||
} */
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$(".ratelimitAction").find("input[name='userRegion1']").on("change",function(){
|
||||
switchRateLimitType();
|
||||
})
|
||||
if($("input[name='cfgId']").val() == null || $("input[name='cfgId']").val() == ''){
|
||||
$(".glyphicon-plus").first().click();
|
||||
}
|
||||
$("#cfgFrom").validate(
|
||||
{
|
||||
errorPlacement : function(error, element) {
|
||||
@@ -173,14 +150,14 @@
|
||||
subscribeId=1;
|
||||
}
|
||||
//代表所有业务都隐藏了,提示必须增加一种业务数据
|
||||
/* var boxSolidLenth=$(".boxSolid").length;
|
||||
var boxSolidLenth=$(".boxSolid").length;
|
||||
if($(".boxSolid").hasClass("subscribeId")){
|
||||
boxSolidLenth=boxSolidLenth-1;
|
||||
}
|
||||
if(boxSolidLenth ==($(".boxSolid.hidden").length-subscribeId)){
|
||||
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();
|
||||
@@ -219,10 +196,10 @@
|
||||
flag=flag1;
|
||||
}
|
||||
if(flag){
|
||||
if(isAsn==0){
|
||||
/* if(isAsn==0){
|
||||
$("input[name='userRegion4']").attr("disabled",true);
|
||||
$("input[name='userRegion5']").attr("disabled",true);
|
||||
}
|
||||
} */
|
||||
$("input[name$='userRegion1']").attr("disabled",false);
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
//将disable属性的元素删除
|
||||
@@ -327,12 +304,12 @@ var processAction=function(configType,obj){
|
||||
var selectedProtocol=o.find("select[name$='protocol'] option:selected").attr("value");
|
||||
if(action==32){
|
||||
//先清空,再添加
|
||||
/* o.find("select[name$='protocol']").empty();
|
||||
o.find("select[name$='protocol']").empty();
|
||||
$.ipcommon.protocol.each(function(){
|
||||
if($(this).attr("value")==0||$(this).attr("value")==6||$(this).attr("value")==17||$(this).attr("value")==1||$(this).attr("value")==8||$(this).attr("value")==15){
|
||||
if($(this).attr("value")==6||$(this).attr("value")==17||$(this).attr("value")==1||$(this).attr("value")==50||$(this).attr("value")==15||$(this).attr("value")==51){
|
||||
o.find("select[name$='protocol']").append($(this));
|
||||
}
|
||||
}) */
|
||||
})
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
$(".ratelimitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
||||
}else if(action==16){
|
||||
@@ -347,12 +324,12 @@ var processAction=function(configType,obj){
|
||||
$(".ratelimitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
||||
}else if(action==64){
|
||||
//先清空,再添加
|
||||
/* o.find("select[name$='protocol']").empty();
|
||||
o.find("select[name$='protocol']").empty();
|
||||
$.ipcommon.protocol.each(function(){
|
||||
if($(this).attr("value")==0||$(this).attr("value")==6||$(this).attr("value")==17){
|
||||
if($(this).attr("value")==6||$(this).attr("value")==17){
|
||||
o.find("select[name$='protocol']").append($(this));
|
||||
}
|
||||
}) */
|
||||
})
|
||||
$(".ratelimitAction").removeClass("hidden");
|
||||
var rateLimitType=$("input[name='userRegion1']:checked").val();
|
||||
if(rateLimitType == 0){//丢包率
|
||||
@@ -390,6 +367,8 @@ var processAction=function(configType,obj){
|
||||
|
||||
}
|
||||
}
|
||||
//drop动作不展示asn信息
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -697,7 +676,7 @@ var showHideIPSECProtocol=function(obj){
|
||||
</c:if>
|
||||
<c:if test="${region.regionType eq 7 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<h4 class="form-section asnRegionH">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
@@ -710,7 +689,7 @@ var showHideIPSECProtocol=function(obj){
|
||||
<c:forEach items="${_cfg.asnKeywords}" var="cfg">
|
||||
<c:choose>
|
||||
<c:when test="${!isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index}">
|
||||
<div class="row boxSolid ${tabName}${status.index} asnRegionV">
|
||||
<%@include file="/WEB-INF/views/cfg/asnForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="isBreak" value="true" ></c:set>
|
||||
@@ -719,14 +698,14 @@ var showHideIPSECProtocol=function(obj){
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:if test="${!isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled asnRegionV">
|
||||
<%@include file="/WEB-INF/views/cfg/asnForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="asnIndex" value="${asnIndex+1 }"></c:set>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled asnRegionV">
|
||||
<%@include file="/WEB-INF/views/cfg/asnForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="asnIndex" value="${asnIndex+1 }"></c:set>
|
||||
|
||||
Reference in New Issue
Block a user