Merge branch 'develop' of http://192.168.10.125/k18_web/NFS.git into develop
This commit is contained in:
@@ -5,13 +5,16 @@
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$(".ratelimitAction").find("input[name='userRegion1']").on("change",function(){
|
||||
switchRateLimitType();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
if($(".action:checked").val()==64){
|
||||
$("#ratelimit").show();
|
||||
$(".ratelimitAction").removeClass("hidden");
|
||||
}else{
|
||||
$("#ratelimit").hide();
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
}
|
||||
if(($(".action:checked").val()==1) || ($(".action:checked").val()==16)){
|
||||
$(".subscribeId").show();
|
||||
@@ -26,9 +29,9 @@ $(function(){
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
if($(".action:checked").val()==64){
|
||||
$("#ratelimit").show();
|
||||
$(".ratelimitAction").removeClass("hidden");
|
||||
}else{
|
||||
$("#ratelimit").hide();
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
}
|
||||
if(($(".action:checked").val()==1) || ($(".action:checked").val()==16)){
|
||||
$(".subscribeId").show();
|
||||
@@ -86,8 +89,8 @@ $(function(){
|
||||
if($("[name='behavCode']")&&$("[name='behavCode']").val()!=""){
|
||||
$("input[name='exprType']").val(1);
|
||||
}
|
||||
if($("input[name='ratelimit']").is(":hidden")){
|
||||
$("input[name='ratelimit']").val("");
|
||||
if($(".ratelimitAction").is(":hidden")){
|
||||
$(".ratelimitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
||||
}
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
@@ -104,6 +107,21 @@ $(function(){
|
||||
ajaxBehaviour($(this).val());
|
||||
});
|
||||
});
|
||||
|
||||
//限流方式
|
||||
var switchRateLimitType=function(){
|
||||
//0 丢包率 1 带宽
|
||||
var rateLimitType=$(".ratelimitAction").find("input[name='userRegion1']:checked").val();
|
||||
if(rateLimitType == 0){
|
||||
$(".droprate").removeClass("hidden");
|
||||
$(".bandwith").addClass("hidden");
|
||||
}
|
||||
if(rateLimitType == 1){
|
||||
$(".droprate").addClass("hidden");
|
||||
$(".bandwith").removeClass("hidden");
|
||||
}
|
||||
|
||||
}
|
||||
var ajaxBehaviour=function(val){
|
||||
var pathName=window.document.location.pathname.substring(0,window.document.location.pathname.indexOf("/nis")+4);
|
||||
var request=$.ajax({
|
||||
@@ -292,22 +310,75 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" id="ratelimit">
|
||||
<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">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<input type="checkbox" name="userRegion4" class="child-checks" <c:if test="${_cfg.userRegion4 eq '1' }">checked</c:if> value="1">
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="ratelimit" 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.ratelimit==ratelimitC.itemCode || (_cfg.ratelimit==null && ratelimitC.itemCode eq '0.1')}">selected</c:if>><spring:message code="${ratelimitC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<label class="control-label">
|
||||
<spring:message code="block_by_app_server_ip"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="ratelimit"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div for="userRegion4"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ratelimitAction hidden">
|
||||
<h4 class="form-section">
|
||||
<spring:message code="action_region" />
|
||||
<small></small>
|
||||
</h4>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="limit_rate_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="userRegion1" value="0"
|
||||
<%-- <c:if test="${(userRegion1 eq 0) || (empty userRegion1)}"> --%>
|
||||
checked
|
||||
<%-- </c:if> --%>
|
||||
class="required" >
|
||||
<spring:message code="ratelimit" />
|
||||
</label>
|
||||
<%-- <label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="userRegion1" value="1"
|
||||
<c:if test="${(userRegion1 eq 1)}">
|
||||
checked
|
||||
</c:if>
|
||||
class="required" >
|
||||
<spring:message code="bandwith" />
|
||||
</label> --%>
|
||||
</div>
|
||||
<div for="userRegion1"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 droprate">
|
||||
<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">
|
||||
<select name="userRegion2" data-live-search="true" class="selectpicker form-control required">
|
||||
<option value="" ><spring:message code="selected"/></option>
|
||||
<c:forEach items="${fns:getDictList('APP_RATE_LIMIT')}" var="ratelimitC">
|
||||
<option value="${ratelimitC.itemCode}" <c:if test="${_cfg.userRegion2==ratelimitC.itemCode || (_cfg.userRegion2==null && ratelimitC.itemCode eq '0.1')}">selected</c:if>><spring:message code="${ratelimitC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="col-md-6 bandwith">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="bandwith"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required number" type="text" name="userRegion3" value="${_cfg.userRegion3 }">
|
||||
</div>
|
||||
<div for="userRegion3"></div>
|
||||
</div>
|
||||
</div> --%>
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- subscribeId配置 -->
|
||||
<div class="subscribeId" >
|
||||
|
||||
@@ -372,6 +372,7 @@
|
||||
<th class="sort-column r.compile_id" style="display: none"><spring:message code="cfg_id"/></th>
|
||||
<th class="sort-column r.cfg_desc cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="ratelimit"/></th>
|
||||
<th><spring:message code="block_by_app_server_ip"/></th>
|
||||
<th class="sort-column r.action"><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="social_app"/></th>
|
||||
<th><spring:message code="behaviour_type"/></th>
|
||||
@@ -403,13 +404,21 @@
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>
|
||||
<c:if test="${cfg.action eq 64}">
|
||||
<c:forEach items="${fns:getDictList('RATE_LIMIT')}" var="ratelimitC">
|
||||
<c:if test="${cfg.ratelimit==ratelimitC.itemCode}">
|
||||
<c:forEach items="${fns:getDictList('APP_RATE_LIMIT')}" var="ratelimitC">
|
||||
<c:if test="${cfg.userRegion2==ratelimitC.itemCode}">
|
||||
<spring:message code="${ratelimitC.itemValue}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${cfg.userRegion4 eq '1'}">
|
||||
<spring:message code="yes"/>
|
||||
</c:if>
|
||||
<c:if test="${empty cfg.userRegion4}">
|
||||
<spring:message code="no"/>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq cfg.action }">
|
||||
|
||||
@@ -123,7 +123,20 @@
|
||||
|
||||
});
|
||||
|
||||
|
||||
//限流方式
|
||||
var switchRateLimitType=function(){
|
||||
//0 丢包率 1 带宽
|
||||
var rateLimitType=$(".ratelimitAction").find("input[name='userRegion1']:checked").val();
|
||||
if(rateLimitType == 0){
|
||||
$(".droprate").removeClass("hidden");
|
||||
$(".bandwith").addClass("hidden");
|
||||
}
|
||||
if(rateLimitType == 1){
|
||||
$(".droprate").addClass("hidden");
|
||||
$(".bandwith").removeClass("hidden");
|
||||
}
|
||||
|
||||
}
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().next();
|
||||
|
||||
@@ -493,7 +493,7 @@ $(function(){
|
||||
var ns = s.replace(/\t|\r|\n/mg, "");
|
||||
$(this).val(ns);
|
||||
});*/
|
||||
$("input[name*='userRegion']").addClass("invisibleChar");
|
||||
$("input[name*='userRegion'][type='text']").addClass("invisibleChar");
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
return false;
|
||||
@@ -787,20 +787,6 @@ var setDefaultMatchMethod=function (obj){
|
||||
$(obj).parents(".row").parent(".row").find("select[name$='matchMethod']").selectpicker("refresh");
|
||||
}
|
||||
}
|
||||
//限流方式
|
||||
var switchRateLimitType=function(){
|
||||
//0 丢包率 1 带宽
|
||||
var rateLimitType=$(".ratelimitAction").find("input[name='userRegion1']:checked").val();
|
||||
if(rateLimitType == 0){
|
||||
$(".droprate").removeClass("hidden");
|
||||
$(".bandwith").addClass("hidden");
|
||||
}
|
||||
if(rateLimitType == 1){
|
||||
$(".droprate").addClass("hidden");
|
||||
$(".bandwith").removeClass("hidden");
|
||||
}
|
||||
|
||||
}
|
||||
var switchIpType=function(obj){
|
||||
var type=$(obj).val();
|
||||
var row=$(obj).parents('.row');
|
||||
|
||||
Reference in New Issue
Block a user