voip 区域信息增加,voipAccount修改为字符串类型配置
区域信息单选切换移至common.js
This commit is contained in:
@@ -1,80 +1,10 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$(".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();
|
||||
if($(this).parent().parent().parent().attr("id")=="areaIp"){
|
||||
obj.find("[id^='_areaCfg']").each(function(){
|
||||
var name=$(this).attr("id").replace("_areaCfg.","");
|
||||
$(this).removeAttr("id");
|
||||
$(this).attr("name","areaCfg["+len+"]."+name);
|
||||
$(this).parents(".form-group").find("div[for^='_areaCfg']").attr("for","areaCfg["+len+"]."+name);
|
||||
$(this).selectpicker("refresh");
|
||||
});
|
||||
obj.removeClass("hidden");
|
||||
switchIpType(obj.find("select[name$='ipType']"));
|
||||
obj.find("select[name$='ipType']").on("change",function(){
|
||||
switchIpType($(this));
|
||||
});
|
||||
obj.appendTo("#areaIp");
|
||||
$("#areaIsp").find(".container-fluid").each(function(){
|
||||
if(!$(this).hasClass("hidden")) $(this).remove();
|
||||
});
|
||||
}else if($(this).parent().parent().parent().attr("id")=="areaIsp"){
|
||||
obj.find("[name^='areaCode']").each(function(){
|
||||
$(this).attr("name","areaIsp["+len+"].area");
|
||||
$(this).parents(".form-group").find("div[for^='areaCode']").attr("for","areaIsp["+len+"].area");
|
||||
$(this).selectpicker("refresh");
|
||||
});
|
||||
obj.find("[name^='ispCode']").each(function(){
|
||||
$(this).attr("name","areaIsp["+len+"].isp");
|
||||
$(this).selectpicker("refresh");
|
||||
});
|
||||
obj.removeClass("hidden");
|
||||
obj.appendTo("#areaIsp");
|
||||
$("#areaIp").find(".container-fluid").each(function(){
|
||||
if(!$(this).hasClass("hidden")) $(this).remove();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
function delAreaIp(obj){
|
||||
var thisObj=$(obj);
|
||||
thisObj.parents(".container-fluid").remove();
|
||||
var len=$("#areaIp").find(".container-fluid:visible").size();
|
||||
//调整角标
|
||||
if(len>0){
|
||||
len--;
|
||||
$("#areaIp").find(".container-fluid:visible").each(function(){
|
||||
$(this).find("[name^='areaCfg']").each(function(){
|
||||
var name=$(this).attr("name");
|
||||
name=name.substring(name.lastIndexOf(".")+1,name.length);
|
||||
$(this).attr("name","areaCfg["+len+"]."+name);
|
||||
$(this).parents(".form-group").find("div[for^='areaCfg']").attr("for","areaCfg["+len+"]."+name);
|
||||
});
|
||||
len--;
|
||||
});
|
||||
}
|
||||
}
|
||||
function delAreaIsp(obj){
|
||||
var thisObj=$(obj);
|
||||
thisObj.parents(".container-fluid").remove();
|
||||
var len=$("#areaIsp").find(".container-fluid:visible").size();
|
||||
if(len>0){
|
||||
len--;
|
||||
$("#areaIsp").find(".container-fluid:visible").each(function(){
|
||||
$(this).find("[name^='areaIsp']").each(function(){
|
||||
var name=$(this).attr("name");
|
||||
name=name.substring(name.lastIndexOf(".")+1,name.length);
|
||||
$(this).attr("name","areaIsp["+len+"]."+name);
|
||||
$(this).parents(".form-group").find("div[for^='areaIsp']").attr("for","areaIsp["+len+"]."+name);
|
||||
});
|
||||
len--;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
@@ -118,7 +48,7 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
<div class="hidden" id="areaIsp">
|
||||
<h4 class="form-section"><spring:message code="area"/> <spring:message code="isp"/><small><span class="glyphicon glyphicon-plus" title="add"></span></small></h4>
|
||||
<div class="container-fluid hidden">
|
||||
<div class="container-fluid hidden row">
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove" onClick="delAreaIsp(this);"/>
|
||||
@@ -200,7 +130,7 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
<div class="hidden" id="areaIp">
|
||||
<h4 class="form-section"><spring:message code="area"/> ip<small><span class="glyphicon glyphicon-plus" title="add"></span></small></h4>
|
||||
<div class="container-fluid hidden">
|
||||
<div class="container-fluid hidden row">
|
||||
<div class="row">
|
||||
<input type="hidden" id="_areaCfg.isAreaEffective" value="${_areaCfg.isAreaEffective}">
|
||||
<input type="hidden" id="_areaCfg.cfgRegionCode" value="${_areaCfg.cfgRegionCode}">
|
||||
@@ -212,22 +142,14 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
</div>
|
||||
<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 id="_areaCfg.cfgDesc" class="form-control" type="text" value="">
|
||||
</div>
|
||||
<div for="_areaCfg.cfgDesc"></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="ip_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select id="_areaCfg.ipType" class="show-tick form-control required">
|
||||
<option value="4">V4</option>
|
||||
<option value="6">V6</option>
|
||||
<select name="_areaCfg.ipType" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipType">
|
||||
<option value="${ipType.itemCode}">${ipType.itemValue}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="_areaCfg.ipType"></div>
|
||||
@@ -240,7 +162,7 @@ function delAreaIsp(obj){
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
|
||||
<div class="col-md-6">
|
||||
<select id="_areaCfg.ipPattern" class="show-tick form-control required">
|
||||
<option value="1"><spring:message code="subnet"/></option>
|
||||
<option value="1"><spring:message code="ip_subnet"/></option>
|
||||
<option value="2"><spring:message code="ip_range"/></option>
|
||||
<option value="3"><spring:message code="ip"/></option>
|
||||
</select>
|
||||
@@ -249,20 +171,6 @@ function delAreaIsp(obj){
|
||||
</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="port_pattern"/></label>
|
||||
<div class="col-md-6">
|
||||
<select id="_areaCfg.portPattern" class="show-tick form-control required">
|
||||
<option value="1"><spring:message code="port"/></option>
|
||||
<option value="2"><spring:message code="port_range"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="_areaCfg.portPattern"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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="client_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
@@ -271,6 +179,21 @@ function delAreaIsp(obj){
|
||||
<div for="_areaCfg.srcIpAddress"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="port_pattern"/></label>
|
||||
<div class="col-md-6">
|
||||
<select id="_areaCfg.portPattern" class="show-tick form-control required">
|
||||
<option value="1"><spring:message code="port"/></option>
|
||||
<option value="2"><spring:message code="port_mask"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="_areaCfg.portPattern"></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="client_port"/></label>
|
||||
@@ -281,7 +204,7 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
|
||||
@@ -301,7 +224,7 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
||||
@@ -323,8 +246,9 @@ function delAreaIsp(obj){
|
||||
<div class="col-md-6">
|
||||
<select id="_areaCfg.direction" class="show-tick form-control required" >
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_areaCfg.direction==0}">selected</c:if>><spring:message code="twoway"/></option>
|
||||
<option value="1" <c:if test="${_areaCfg.direction==1}">selected</c:if>><spring:message code="oneway"/></option>
|
||||
<option value="0" <c:if test="${_areaCfg.direction==0 || _areaCfg.direction==null}">selected</c:if>><spring:message code="twoway"/></option>
|
||||
<option value="1" <c:if test="${_areaCfg.direction==1 }">selected</c:if>><spring:message code="ingress"/></option>
|
||||
<option value="2" <c:if test="${_areaCfg.direction==2 }">selected</c:if>><spring:message code="degress"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="_areaCfg.direction"></div>
|
||||
@@ -334,7 +258,7 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
<input type="hidden" name="areaCfgIds" value="${areaCfgIds}">
|
||||
<c:forEach items="${areaCfgs}" var ="areaCfg" varStatus="status">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid row">
|
||||
<div class="row">
|
||||
<input type="hidden" name="areaCfg[${status.index}].isAreaEffective" value="${areaCfg.isAreaEffective}">
|
||||
<input name="areaCfg[${status.index}].cfgId" type="hidden" value="${areaCfg.cfgId}">
|
||||
@@ -343,22 +267,14 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
</div>
|
||||
<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 name="areaCfg[${status.index}].cfgDesc" class="form-control" type="text" value="${areaCfg.cfgDesc}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].cfgDesc"></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="ip_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="areaCfg[${status.index}].ipType" class="selectpicker show-tick form-control required">
|
||||
<option value="4" <c:if test="${areaCfg.ipType==4}">selected</c:if>>V4</option>
|
||||
<option value="6" <c:if test="${areaCfg.ipType==6}">selected</c:if>>V6</option>
|
||||
<select name="areaCfg[${status.index}].ipType" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipType">
|
||||
<option value="${ipType.itemCode}" <c:if test="${areaCfg.ipType==ipType.itemCode}">selected</c:if> >${ipType.itemValue}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].ipType"></div>
|
||||
@@ -366,86 +282,73 @@ function delAreaIsp(obj){
|
||||
</div>
|
||||
</div>
|
||||
<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="ip_pattern"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="areaCfg[${status.index}].ipPattern" class="selectpicker show-tick form-control required">
|
||||
<option value="1" <c:if test="${areaCfg.ipPattern==1}">selected</c:if> ><spring:message code="ip_subnet"/></option>
|
||||
<option value="2" <c:if test="${areaCfg.ipPattern==2}">selected</c:if>><spring:message code="ip_range"/></option>
|
||||
<option value="3" <c:if test="${areaCfg.ipPattern==3 || areaCfg.ipPattern==null}">selected</c:if>>IP</option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].ipPattern"></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="client_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].srcIp" class="form-control required ipCheck" type="text" value="${areaCfg.srcIp}">
|
||||
<input name="areaCfg[${status.index}].srcIpAddress" class="form-control required ipCheck" type="text" value="${areaCfg.srcIpAddress}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].srcIp"></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="client_address_mask"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].srcIpMask" class="form-control required ipMask" type="text" value="${areaCfg.srcIpMask}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].srcIpMask"></div>
|
||||
<div for="areaCfg[${status.index}].srcIpAddress"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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="client_port"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].srcPort" class="form-control required" type="text" value="${areaCfg.srcPort}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].srcPort"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row hidden" >
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port_mask"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].srcPortMask" class="form-control required" type="text" value="${areaCfg.srcPortMask}">
|
||||
<select name="areaCfg[${status.index}].portPattern" class="selectpicker show-tick form-control required">
|
||||
<option value="1" <c:if test="${areaCfg.portPattern==1}">selected</c:if> ><spring:message code="port"/></option>
|
||||
<option value="2" <c:if test="${areaCfg.portPattern==2}">selected</c:if>><spring:message code="port_mask"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].srcPortMask"></div>
|
||||
<div for="areaCfg[${status.index}].portPattern"></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="client_port"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].srcPort" class="form-control required checkPort" type="text" value="${areaCfg.srcPort}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].srcPort"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].dstIp" class="form-control required ipCheck" type="text" value="${areaCfg.dstIp}">
|
||||
<input name="areaCfg[${status.index}].destIpAddress" class="form-control required ipCheck" type="text" value="${areaCfg.destIpAddress}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].dstIp"></div>
|
||||
<div for="areaCfg[${status.index}].destIpAddress"></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="server_address_mask"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].dstIpMask" class="form-control required ipMask" type="text" value="${areaCfg.dstIpMask}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].dstIpMask"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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="server_port"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].dstPort" class="form-control required" type="text" value="${areaCfg.dstPort}">
|
||||
<input name="areaCfg[${status.index}].destPort" class="form-control required portCheck" type="text" value="${areaCfg.destPort}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].dstPort"></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="server_port_mask"/></label>
|
||||
<div class="col-md-6">
|
||||
<input name="areaCfg[${status.index}].dstPortMask" class="form-control required" type="text" value="${areaCfg.dstPortMask}">
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].dstPortMask"></div>
|
||||
<div for="areaCfg[${status.index}].destPort"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row hidden" >
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
||||
@@ -466,9 +369,9 @@ function delAreaIsp(obj){
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="direction"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="areaCfg[${status.index}].direction" class="selectpicker show-tick form-control required" >
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${areaCfg.direction==0}">selected</c:if>><spring:message code="twoway"/></option>
|
||||
<option value="1" <c:if test="${areaCfg.direction==1}">selected</c:if>><spring:message code="oneway"/></option>
|
||||
<option value="0" <c:if test="${areaCfg.direction==0 || areaCfg.direction==null}">selected</c:if>><spring:message code="twoway"/></option>
|
||||
<option value="1" <c:if test="${areaCfg.direction==1 }">selected</c:if>><spring:message code="ingress"/></option>
|
||||
<option value="2" <c:if test="${areaCfg.direction==2 }">selected</c:if>><spring:message code="degress"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="areaCfg[${status.index}].direction"></div>
|
||||
|
||||
151
src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp
Normal file
151
src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpForm.jsp
Normal file
@@ -0,0 +1,151 @@
|
||||
<%@ 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 type="text/javascript">
|
||||
$(function(){
|
||||
areaControlInit();
|
||||
$("input[name='isAreaEffective']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if(val==1){
|
||||
$(".areaType").removeClass("hidden");
|
||||
if($("input[name='areaType']:checked").val()==1){//areaISP
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
}else if($("input[name='areaType']:checked").val()==0){//areaIp
|
||||
$("#areaIp").removeClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$(".areaType").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("select[name$='ipType']").on("change",function(){
|
||||
switchIpType($(this));
|
||||
});
|
||||
$("input[name='areaType']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if($(this).is(":visible")){
|
||||
if(val==0){
|
||||
$("#areaIp").removeClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}else{
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$("#areaIsp").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change",function(){
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
},
|
||||
submitHandler: function(form){
|
||||
//loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<%-- <h3 class="page-title">
|
||||
<spring:message code="${add}"></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}/ntc/av/saveContIp" method="post" class="form-horizontal">
|
||||
<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" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<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">
|
||||
<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 }" value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>
|
||||
>
|
||||
<spring:message code="${service.actionCode }"/>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- desc and action -->
|
||||
<%@include file="/WEB-INF/include/form/ipInfo.jsp" %>
|
||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||
<input type="hidden" name="isAreaEffective" value="0">
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
410
src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp
Normal file
410
src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp
Normal file
@@ -0,0 +1,410 @@
|
||||
<%@ 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.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.srcIpAddress}");
|
||||
}else if("${cfg.srcPort}"){
|
||||
$("#intype").val("${cfg.srcPort}");
|
||||
} 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",'');
|
||||
$("#description").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
});
|
||||
var edit=function(url){
|
||||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||||
if(cked.val()==1){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
if(cked.length==1){
|
||||
window.location = url+"&compileId="+cked.attr("id");
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
|
||||
<shiro:hasPermission name="avContentIp:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/ntc/av/contentIpForm?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/ntc/av/contentIpList?functionId=${cfg.functionId}" 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="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="srcIpAddress"><spring:message code="client_ip"></spring:message></form:option>
|
||||
<form:option value="srcPort"><spring:message code="client_port"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
|
||||
</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="avContIp:config">
|
||||
<sys:delRow url="${ctx}/ntc/av/contentIpForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/ntc/av/updateAvContIpValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="avContentIp: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>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/ntc/av/auditAvContIp?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/av/auditAvContIp?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/ntc/av/auditAvContIp?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='request_number'/></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='type'/></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>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<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><spring:message code="seq"/></th> --%>
|
||||
<th><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="ip_type"/></th>
|
||||
<th><spring:message code="client_ip"/></th>
|
||||
<th><spring:message code="client_port"/></th>
|
||||
<th><spring:message code="server_ip"/></th>
|
||||
<th><spring:message code="server_port"/></th>
|
||||
<th><spring:message code="ip_pattern"/></th>
|
||||
<th><spring:message code="port_pattern"/></th>
|
||||
<th><spring:message code="direction"/></th>
|
||||
<th><spring:message code="protocol"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="type"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
<th><spring:message code="label"/></th>
|
||||
<th><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column a.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
|
||||
<%-- <th><spring:message code="operation"></spring:message></th> --%>
|
||||
</tr>
|
||||
</thead>
|
||||
<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>${cfg.cfgDesc }</td>
|
||||
<td>${cfg.ipType }</td>
|
||||
<td>${cfg.srcIpAddress }</td>
|
||||
<td>${cfg.srcPort }</td>
|
||||
<td>${cfg.destIpAddress }</td>
|
||||
<td>${cfg.destPort }</td>
|
||||
<td>${cfg.ipPattern }</td>
|
||||
<td>${cfg.portPattern }</td>
|
||||
<td>${cfg.direction }</td>
|
||||
<td>${cfg.protocol }</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemValue eq cfg.action }">
|
||||
<spring:message code="${dict.itemCode }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}"><spring:message code="yes"/></c:if>
|
||||
</td>
|
||||
<td>${cfg.requestName }</td>
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.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>
|
||||
<td title="${classify }">
|
||||
${fns:abbr(classify,20)}
|
||||
</td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.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>
|
||||
<td title="${attribute }">
|
||||
${fns:abbr(attribute,20)}
|
||||
</td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.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>
|
||||
<td title="${lableInfo }">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</td>
|
||||
<%-- <td>${cfg.areaEffectiveIds }</td> --%>
|
||||
<td>
|
||||
<c:if test="${cfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${cfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -11,44 +11,14 @@ border:1px solid #eeeeee
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
areaControlInit();
|
||||
$("input[name='isAreaEffective']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if(val==1){
|
||||
$(".areaType").removeClass("hidden");
|
||||
if($("input[name='areaType']:checked").val()==1){//areaISP
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
}else if($("input[name='areaType']:checked").val()==0){//areaIp
|
||||
$("#areaIp").removeClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$(".areaType").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("input[name='areaType']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if($(this).is(":visible")){
|
||||
if(val==0){
|
||||
$("#areaIp").removeClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}else{
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
}else{
|
||||
$("#areaIsp").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change",function(){
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
$("#serviceId").val($(".action").attr("serviceId"));
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
@@ -60,6 +30,13 @@ $(function(){
|
||||
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;
|
||||
}
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
@@ -67,10 +44,6 @@ $(function(){
|
||||
$(".action").on("change",function(){
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
//业务内容增加
|
||||
/* $("span[title='add']").on("click",function(){
|
||||
$(".voipIp0").removeClass("hidden");
|
||||
}); */
|
||||
$(".disabled").each(function(){
|
||||
$(this).find("input,select,div,button").each(function(){
|
||||
$(this).attr("disabled","true");
|
||||
@@ -211,9 +184,10 @@ var delContent=function(contentClassName,addBtnClassName){
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="voipIps[${status.index }].ipType" class="selectpicker show-tick form-control required">
|
||||
<option value="4" <c:if test="${voipIp.ipType==4 || voipIp.ipType==null }">selected</c:if> >V4</option>
|
||||
<option value="6" <c:if test="${voipIp.ipType==6}">selected</c:if>>V6</option>
|
||||
<select name="voipIps[${status.index }].ipType" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipType">
|
||||
<option value="${ipType.itemCode}" <c:if test="${voipIp.ipType==ipType.itemCode}">selected</c:if> >${ipType.itemValue}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="voipIps[${status.index }].ipType"></div>
|
||||
@@ -380,23 +354,6 @@ var delContent=function(contentClassName,addBtnClassName){
|
||||
</div>
|
||||
</div>
|
||||
<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="district"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="voipAccounts[${status.index }].district" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${regionList}" var="regionDistrict">
|
||||
<c:if test="${_cfg.functionId eq regionDistrict.functionId && regionDistrict.configRegionCode ==2}">
|
||||
<c:forEach items="${fn:split(regionDistrict.configDistrict,',')}" var="_district">
|
||||
<option value="${_district }" <c:if test="${voipAccount.district==_district || voipAccount.district==null}">selected</c:if> >${_district }</option>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="voipAccounts[${status.index }].district"></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="key_word"/></label>
|
||||
@@ -406,7 +363,20 @@ var delContent=function(contentClassName,addBtnClassName){
|
||||
<div for="voipAccounts[${status.index }].cfgKeywords"></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="whether_hexbinary"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="voipAccounts[${status.index }].isHexbin" class="selectpicker select2 form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${voipAccount.isHexbin==0 || voipAccount.isHexbin==null}">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1" <c:if test="${voipAccount.isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
|
||||
<option value="2" <c:if test="${voipAccount.isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="voipAccounts[${status.index }].isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
@@ -443,29 +413,13 @@ var delContent=function(contentClassName,addBtnClassName){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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="whether_hexbinary"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="voipAccounts[${status.index }].isHexbin" class="selectpicker select2 form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${voipAccount.isHexbin==0 || voipAccount.isHexbin==null}">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1" <c:if test="${voipAccount.isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
|
||||
<option value="2" <c:if test="${voipAccount.isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="voipAccounts[${status.index }].isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:forEach>
|
||||
<!--account info-->
|
||||
<br>
|
||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||
<input type="hidden" name="isAreaEffective" value="0">
|
||||
<%--<br>--%>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
<br>
|
||||
<!-- <input type="hidden" id="isAreaEffective" name="isAreaEffective" value="0"> -->
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
$("#intype").val("${cfg.voipIp.srcPort}");
|
||||
}else if("${cfg.voipAccount.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.voipAccount.cfgKeywords}");
|
||||
}else if("${cfg.voipAccount.district}"){
|
||||
$("#intype").val("${cfg.voipAccount.district}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
@@ -241,14 +239,6 @@
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='district'/>:</label>";
|
||||
html+="<label>"
|
||||
html+=item.district;
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='expression_type'/>:</label>";
|
||||
html+="<label>"
|
||||
if(item.exprType==1){
|
||||
@@ -260,8 +250,6 @@
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='row'>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='match_method'/>:</label>";
|
||||
@@ -281,6 +269,8 @@
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='row'>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label><spring:message code='whether_hexbinary'/>:</label>";
|
||||
@@ -304,6 +294,13 @@
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="<div class='col-md-4'>";
|
||||
html+="<div class='form-group'>";
|
||||
html+="<label></label>";
|
||||
html+="<label>"
|
||||
html+="</label>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
html+="</div>";
|
||||
/* if(index < (data.ip.length-1) && index != 0){
|
||||
alert("下一行");
|
||||
@@ -406,7 +403,6 @@
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="av_voip_control"></spring:message>
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
@@ -447,7 +443,6 @@
|
||||
<form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option>
|
||||
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option>
|
||||
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option>
|
||||
<form:option value="voipAccount.district"><spring:message code="strong_string"/></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -20,6 +20,95 @@ $(function(){
|
||||
$("select[name$='portPattern']").on("change",function(){
|
||||
switchIpInfo(this);
|
||||
});
|
||||
$(".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();
|
||||
if($(this).parent().parent().parent().attr("id")=="areaIp"){
|
||||
obj.find("[id^='_areaCfg']").each(function(){
|
||||
var name=$(this).attr("id").replace("_areaCfg.","");
|
||||
$(this).removeAttr("id");
|
||||
$(this).attr("name","areaCfg["+len+"]."+name);
|
||||
$(this).parents(".form-group").find("div[for^='_areaCfg']").attr("for","areaCfg["+len+"]."+name);
|
||||
$(this).selectpicker("refresh");
|
||||
});
|
||||
obj.removeClass("hidden");
|
||||
switchIpInfo(obj.find("select[name$='ipType']"),"ipType");
|
||||
obj.find("select[name$='ipType']").on("change",function(){
|
||||
switchIpInfo($(this),"ipType");
|
||||
});
|
||||
obj.find("select[name$='ipPattern']").on("change",function(){
|
||||
switchIpInfo($(this),"ipPattern");
|
||||
});
|
||||
obj.appendTo("#areaIp");
|
||||
$("#areaIsp").find(".container-fluid").each(function(){
|
||||
if(!$(this).hasClass("hidden")) $(this).remove();
|
||||
});
|
||||
}else if($(this).parent().parent().parent().attr("id")=="areaIsp"){
|
||||
obj.find("[name^='areaCode']").each(function(){
|
||||
$(this).attr("name","areaIsp["+len+"].area");
|
||||
$(this).parents(".form-group").find("div[for^='areaCode']").attr("for","areaIsp["+len+"].area");
|
||||
$(this).selectpicker("refresh");
|
||||
});
|
||||
obj.find("[name^='ispCode']").each(function(){
|
||||
$(this).attr("name","areaIsp["+len+"].isp");
|
||||
$(this).selectpicker("refresh");
|
||||
});
|
||||
obj.removeClass("hidden");
|
||||
obj.appendTo("#areaIsp");
|
||||
$("#areaIp").find(".container-fluid").each(function(){
|
||||
if(!$(this).hasClass("hidden")) $(this).remove();
|
||||
});
|
||||
}
|
||||
});
|
||||
$("input[name='areaType']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if($(this).is(":visible")){
|
||||
if(val==0){
|
||||
$("#areaIp").removeClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
if($("#areaIp").find(".container-fluid:visible").size() <1){
|
||||
$("#areaIp").find(".glyphicon-plus").click();
|
||||
}
|
||||
}else{
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
if($("#areaIsp").find(".container-fluid:visible").size() <1){
|
||||
$("#areaIsp").find(".glyphicon-plus").click();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$("#areaIsp").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
$("input[name='isAreaEffective']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if(val==1){
|
||||
$(".areaType").removeClass("hidden");
|
||||
if($("input[name='areaType']:checked").val()==1){//areaISP
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
if($("#areaIsp").find(".container-fluid:visible").size() <1){
|
||||
$("#areaIsp").find(".glyphicon-plus").click();
|
||||
}
|
||||
}else if($("input[name='areaType']:checked").val()==0){//areaIp
|
||||
$("#areaIp").removeClass("hidden");
|
||||
if($("#areaIp").find(".container-fluid:visible").size() <1){
|
||||
$("#areaIp").find(".glyphicon-plus").click();
|
||||
}
|
||||
}else{
|
||||
$(".areaType").find("[value='1']").prop("checked",true);
|
||||
$("#areaIsp").removeClass("hidden");
|
||||
if($("#areaIsp").find(".container-fluid:visible").size() <1){
|
||||
$("#areaIsp").find(".glyphicon-plus").click();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$(".areaType").addClass("hidden");
|
||||
$("#areaIp").addClass("hidden");
|
||||
$("#areaIsp").addClass("hidden");
|
||||
}
|
||||
});
|
||||
areaControlInit();
|
||||
});
|
||||
var switchIpType=function(obj){
|
||||
var type=$(obj).val();
|
||||
@@ -73,12 +162,10 @@ var switchIpInfo=function(obj,type){
|
||||
var ipPattern="";
|
||||
var portPattern="";
|
||||
|
||||
var row=$(obj).parents('.row').parents('.row');
|
||||
|
||||
var row=$(obj).parents('.row').parent('.row');
|
||||
ipType=row.find("select[name$='ipType']").val();
|
||||
ipPattern=row.find("select[name$='ipPattern']").val();
|
||||
portPattern=row.find("select[name$='portPattern']").val();
|
||||
|
||||
var srcIp=row.find("input[name$='srcIpAddress']");
|
||||
var destIp=row.find("input[name$='destIpAddress']");
|
||||
var srcPort=row.find("input[name$='srcPort']");
|
||||
@@ -226,6 +313,7 @@ var areaControlInit=function(){
|
||||
}
|
||||
}else{
|
||||
$("input[name='areaEffectiveIds']").val("");
|
||||
$("input[name='isAreaEffective']").eq(1).prop("checked",true);
|
||||
}
|
||||
}
|
||||
//查询
|
||||
@@ -256,4 +344,43 @@ var more=function(obj){
|
||||
if(rows.size()==0){
|
||||
$(obj).addClass("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//删除区域IP
|
||||
function delAreaIp(obj){
|
||||
var thisObj=$(obj);
|
||||
thisObj.parents(".container-fluid").remove();
|
||||
var len=$("#areaIp").find(".container-fluid:visible").size();
|
||||
//调整角标
|
||||
if(len>0){
|
||||
len--;
|
||||
$("#areaIp").find(".container-fluid:visible").each(function(){
|
||||
$(this).find("[name^='areaCfg']").each(function(){
|
||||
var name=$(this).attr("name");
|
||||
name=name.substring(name.lastIndexOf(".")+1,name.length);
|
||||
$(this).attr("name","areaCfg["+len+"]."+name);
|
||||
$(this).parents(".form-group").find("div[for^='areaCfg']").attr("for","areaCfg["+len+"]."+name);
|
||||
});
|
||||
len--;
|
||||
});
|
||||
}
|
||||
}
|
||||
//删除区域ISP
|
||||
function delAreaIsp(obj){
|
||||
var thisObj=$(obj);
|
||||
thisObj.parents(".container-fluid").remove();
|
||||
var len=$("#areaIsp").find(".container-fluid:visible").size();
|
||||
if(len>0){
|
||||
len--;
|
||||
$("#areaIsp").find(".container-fluid:visible").each(function(){
|
||||
$(this).find("[name^='areaIsp']").each(function(){
|
||||
var name=$(this).attr("name");
|
||||
name=name.substring(name.lastIndexOf(".")+1,name.length);
|
||||
$(this).attr("name","areaIsp["+len+"]."+name);
|
||||
$(this).parents(".form-group").find("div[for^='areaIsp']").attr("for","areaIsp["+len+"]."+name);
|
||||
});
|
||||
len--;
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user