ip模板提交

样例的level改成下拉选项
拦截强度做成下拉选项
This commit is contained in:
duandongmei
2018-10-17 10:06:08 +08:00
parent cd7f4cc101
commit 6b610bf665
14 changed files with 378 additions and 158 deletions

View File

@@ -32,29 +32,58 @@ $(function(){
<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}">
<c:forEach items="${fns:getDictList('MAAT_SERVICE')}" var="serviceC">
<c:if test="${service.serviceId==serviceC.itemCode}">
<span class="${serviceC.itemValue}">
<input type="radio" name="serviceDictId" <c:if test="${serviceList.size() eq 1}">checked</c:if>
<c:if test="${(37 ne service.functionId)&& (149 ne service.functionId)}">
<label class="radio-inline">
<c:if test="${cfg.functionId eq service.functionId}">
<c:forEach items="${fns:getDictList('MAAT_SERVICE')}" var="serviceC" >
<c:if test="${service.serviceId==serviceC.itemCode }">
<span class="${serviceC.itemValue}">
<input type="radio" name="serviceDictId" <c:if test="${serviceList.size() eq 1}">checked</c:if>
serviceId="${service.serviceId }"
functionId="${service.functionId }"
cfgRegionCodeS="${service.regionCode }"
protocolId="${service.protocolId }"
action="${service.action }"
value="${service.dictId }"
class="required action"
<c:if test="${status.index eq 0 }">checked='true'</c:if>
>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict" >
<c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/>
</c:if>
</c:forEach>
</span>
</c:if>
</c:forEach>
</c:if>
</label>
</c:if>
</c:forEach>
<c:forEach items="${serviceList}" var="service"
varStatus="satus">
<c:if test="${(service.serviceId ne 37) || (service.serviceId ne 149)}">
<label class="radio-inline"> <c:if
test="${cfg.functionId eq service.functionId}">
<input type="radio" name="serviceDictId"
serviceId="${service.serviceId }"
functionId="${service.functionId }"
cfgRegionCodeS="${service.regionCode }"
protocolId="${service.protocolId }"
action="${service.action }"
value="${service.dictId }" class="required action">
value="${service.dictId }"
class="required action"
<c:if test="${satus.index eq 0}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action}">
<c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/>
</c:if>
</c:forEach>
</span>
</c:if>
</c:forEach>
</c:if>
</label>
</c:forEach>
</label>
</c:if>
</c:forEach>
</div>
<div for="action"></div>
</div>

View File

@@ -88,10 +88,10 @@ function hiddenlevel(){
var action=$("input[name='action']:checked").val();
if(action==16){
$(".leveL").addClass("hidden");
$("input[name='level']").val(0);
$("select[name='level']").val(0);
}else {
$(".leveL").removeClass("hidden");
$("input[name='level']").val(0);
$("select[name='level']").val(0);
}
}
</script>
@@ -215,7 +215,12 @@ function hiddenlevel(){
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="harm_level"/></label>
<div class="col-md-6">
<input class="form-control required number" range="[75,99]" type="text" name="level" value="${_cfg.level }">
<select name="level" data-live-search="true" class="selectpicker form-control required">
<option value="0" ><spring:message code="selected"/></option>
<c:forEach items="${fns:getDictList('CONFIDENCE_INTERVAL')}" var="configdenceC">
<option value="${configdenceC.itemCode}" <c:if test="${_cfg.level==configdenceC.itemCode || (_cfg.level==null && configdenceC.itemCode eq 100)}">selected</c:if>><spring:message code="${configdenceC.itemValue}"/></option>
</c:forEach>
</select>
</div>
<div for="level"></div>
</div>

View File

@@ -76,7 +76,7 @@
$(".bandwith").find("input[name='userRegion3']").attr("disabled",true);
}
if(rateLimitType == 1){//带宽
$(".droprate").find("input[name='userRegion2']").attr("disabled",true);
$(".droprate").find("select[name='userRegion2']").attr("disabled",true);
}
}else if(action==80){//替换
$(".monitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
@@ -317,7 +317,12 @@
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ratelimit"/></label>
<div class="col-md-6">
<input class="form-control required number" range="[0,1]" type="text" placeholder="0.001" name="userRegion2" value="${_cfg.userRegion2 }">
<select name="userRegion2" data-live-search="true" class="selectpicker form-control required">
<option value="" ><spring:message code="selected"/></option>
<c:forEach items="${fns:getDictList('RATE_LIMIT')}" var="ratelimitC">
<option value="${ratelimitC.itemCode}" <c:if test="${_cfg.userRegion2==ratelimitC.itemCode || (_cfg.userRegion2==null && ratelimitC.itemCode eq '0.001')}">selected</c:if>><spring:message code="${ratelimitC.itemValue}"/></option>
</c:forEach>
</select>
</div>
<div for="userRegion2"></div>
</div>

View File

@@ -375,7 +375,11 @@
<c:if test="${cfg.functionId ne 212 }">
<td>
<c:if test="${indexCfg.action eq 64}">
${indexCfg.userRegion2 }
<c:forEach items="${fns:getDictList('RATE_LIMIT')}" var="ratelimitC">
<c:if test="${indexCfg.userRegion2==ratelimitC.itemCode}">
<spring:message code="${ratelimitC.itemValue}"/>
</c:if>
</c:forEach>
</c:if>
</td>
<%-- <td>

View File

@@ -337,11 +337,13 @@ var processAction=function(configType,obj){
var rateLimitType=$("input[name='userRegion1']:checked").val();
if(rateLimitType == 0){//丢包率
$(".bandwith").find("input[name='userRegion3']").attr("disabled",true);
$(".droprate").find("input[name='userRegion2']").removeAttr("disabled");
$(".droprate").find("select[name='userRegion2']").removeAttr("disabled");
$(".droprate").find("select[name='userRegion2']").selectpicker("refresh");
}
if(rateLimitType == 1){//带宽
$(".bandwith").find("input[name='userRegion3']").removeAttr("disabled");
$(".droprate").find("input[name='userRegion2']").attr("disabled",true);
$(".droprate").find("select[name='userRegion2']").attr("disabled",true);
$(".droprate").find("select[name='userRegion2']").selectpicker("refresh");
}
}else if(action==1){
//先清空,再添加
@@ -545,7 +547,12 @@ var showHideIPSECProtocol=function(obj){
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ratelimit"/></label>
<div class="col-md-6">
<input class="form-control required number" range="[0,1]" type="text" placeholder="0.001" name="userRegion2" value="${_cfg.userRegion2 }">
<select name="userRegion2" data-live-search="true" class="selectpicker form-control required">
<option value="" ><spring:message code="selected"/></option>
<c:forEach items="${fns:getDictList('RATE_LIMIT')}" var="ratelimitC">
<option value="${ratelimitC.itemCode}" <c:if test="${_cfg.userRegion2==ratelimitC.itemCode || (_cfg.userRegion2==null && ratelimitC.itemCode eq '0.001')}">selected</c:if>><spring:message code="${ratelimitC.itemValue}"/></option>
</c:forEach>
</select>
</div>
<div for="userRegion2"></div>
</div>

View File

@@ -85,12 +85,17 @@
<body>
<div class="page-content">
<!-- 模板导入start -->
<%@include file="/WEB-INF/include/excel/importModal.jsp" %>
<div class="theme-panel hidden-xs hidden-sm">
<shiro:hasPermission name="iplist:config">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/ntc/iplist/form?functionId=${cfg.functionId}'">
<i class="fa fa-plus"></i>
<spring:message code="add"></spring:message></button>
<spring:message code="add"></spring:message></button>
<button type="button" class="btn btn-primary import" >
<i class="fa fa-plus"></i>
<spring:message code="import"></spring:message></button>
</shiro:hasPermission>
</div>
@@ -166,7 +171,7 @@
<shiro:hasPermission name="iplist:config">
<sys:delRow url="${ctx}/ntc/iplist/form" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/ntc/iplist/updateValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
<%-- <sys:delRow url="${ctx}/ntc/iplist/exportIpAddr?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/iplist/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow> --%>
<sys:delRow url="${ctx}/ntc/iplist/exportIpAddr?functionId=${cfg.functionId }" searchUrl="${ctx}/ntc/iplist/list?functionId=${cfg.functionId}" id="contentTable" maxRow="10000" label="export"></sys:delRow>
</shiro:hasPermission>
<shiro:hasPermission name="iplist:confirm">
<div class="btn-group">
@@ -357,7 +362,13 @@
</c:if>
</c:forEach>
</td>
<td>${indexCfg.userRegion2 }</td>
<td>
<c:forEach items="${fns:getDictList('RATE_LIMIT')}" var="ratelimitC">
<c:if test="${indexCfg.userRegion2==ratelimitC.itemCode}">
<spring:message code="${ratelimitC.itemValue}"/>
</c:if>
</c:forEach>
</td>
<td>
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
<c:if test="${dict.itemCode eq indexCfg.doLog }">