IP限速修改①界面输入IP限速比例字段②审核userregion设置限速比例
This commit is contained in:
@@ -7,10 +7,39 @@ import java.util.Map;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
public final class Constants {
|
||||
|
||||
/**
|
||||
* 用户自定义域,限速
|
||||
*/
|
||||
public static final String USERREGION_RATE_LIMIT=Configurations.getStringProperty("userregion_rate_limit", "RATE_LIMIT");
|
||||
/**
|
||||
* 用户自定义域,策略分组号
|
||||
*/
|
||||
public static final String USERREGION_IR_STRATEGY=Configurations.getStringProperty("userregion_ir_strategy", "IR_STRATEGY");
|
||||
/**
|
||||
* 用户自定义域,策略分组类型
|
||||
*/
|
||||
public static final String USERREGION_IR_TYPE=Configurations.getStringProperty("userregion_ir_type", "IR_TYPE");
|
||||
/**
|
||||
* 用户自定义域,域名ID
|
||||
*/
|
||||
public static final String USERREGION_DOMIAN_ID=Configurations.getStringProperty("userregion_domian_id", "DOMIAN_ID");
|
||||
/**
|
||||
* 用户自定义域,域名
|
||||
*/
|
||||
public static final String USERREGION_DOMIAN_STR=Configurations.getStringProperty("userregion_domian_str", "DOMIAN_STR");
|
||||
/**
|
||||
* IP复用业务类型
|
||||
*/
|
||||
public static final int SERVICE_IP_RATELIMIT = Configurations.getIntProperty("service_ip_ratelimit", 0x421);
|
||||
/**
|
||||
* IP复用业务类型
|
||||
*/
|
||||
public static final int SERVICE_IP_MULITIPLEX = Configurations.getIntProperty("service_ip_mulitiplex", 768);
|
||||
/**
|
||||
* 域名拦截业务类型
|
||||
*/
|
||||
public static final Integer SERVICE_PXY_DOMAIN_INTERCEPT = Configurations.getIntProperty("service_pxy_domain_intercept",0x201);
|
||||
/**
|
||||
* 当前时区
|
||||
*/
|
||||
@@ -336,7 +365,6 @@ public final class Constants {
|
||||
public static final String PROTOCOL_NUM_REGION = Configurations.getStringProperty("protocol_num_region","protocol_num");
|
||||
public static final String BGP_IP_REGION = Configurations.getStringProperty("bgp_ip_region","bgp_ip");
|
||||
public static final String KEYWORD_EXPR = Configurations.getStringProperty("keyword_expr","***and***");
|
||||
public static final Integer SERVICE_PXY_DOMAIN_INTERCEPT = Configurations.getIntProperty("service_pxy_domain_intercept",0x201);
|
||||
//用户自定义域分隔符
|
||||
public static final String USER_REGION_SPLIT = Configurations.getStringProperty("user_region_split", ";");
|
||||
//用户自定义域占位符
|
||||
|
||||
@@ -191,6 +191,11 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
maatCfg.setGroupRelationList(groupRelationList);
|
||||
maatCfg.setGroupNum(groupRelationList.size());
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
if(Constants.SERVICE_IP_MULITIPLEX==cfg.getServiceId().intValue()){
|
||||
|
||||
}else if(Constants.SERVICE_IP_RATELIMIT==cfg.getServiceId().intValue()){
|
||||
maatCfg.setUserRegion(Constants.USERREGION_RATE_LIMIT+"="+cfg.getRatelimit());
|
||||
}
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
|
||||
@@ -688,6 +688,7 @@ target_ip_protect=target ip protect
|
||||
ratelimit_config=ratelimit config
|
||||
ip_ratelimit=ip ratelimit
|
||||
domain_ratelimit=domain ratelimit
|
||||
ratelimit=ratelimit scale
|
||||
#=============about manipulation=========
|
||||
#=============about Maintenance=========
|
||||
ip_multiplex_pool_config=ip multiplex pool config
|
||||
|
||||
@@ -672,6 +672,7 @@ target_ip_protect=target ip protect
|
||||
ratelimit_config=ratelimit config
|
||||
ip_ratelimit=ip ratelimit
|
||||
domain_ratelimit=domain ratelimit
|
||||
ratelimit=ratelimit scale
|
||||
#=============about manipulation=========
|
||||
#=============about Maintenance=========
|
||||
ip_multiplex_pool_config=ip multiplex pool config
|
||||
|
||||
@@ -716,6 +716,7 @@ target_ip_protect=\u76EE\u6807IP\u9632\u62A4
|
||||
ratelimit_config=\u9650\u6D41\u7BA1\u7406
|
||||
ip_ratelimit=ip\u9650\u6D41
|
||||
domain_ratelimit=\u57DF\u540D\u9650\u6D41
|
||||
ratelimit=\u9650\u901F\u6BD4\u4F8B
|
||||
#=============about manipulation=========
|
||||
#=============about app config===========
|
||||
domain=\u57DF\u540D
|
||||
|
||||
@@ -289,4 +289,11 @@ keyword_expr=***and***
|
||||
time_zone=8
|
||||
#需要特殊处理的业务类型
|
||||
service_pxy_domain_intercept=513
|
||||
service_ip_mulitiplex=768
|
||||
service_ip_mulitiplex=768
|
||||
service_ip_ratelimit=1057
|
||||
#用户自定义域
|
||||
userregion_rate_limit=RATE_LIMIT
|
||||
userregion_ir_strategy=IR_STRATEGY
|
||||
userregion_ir_type=ir_type
|
||||
userregion_domian_id=DOMIAN_ID
|
||||
userregion_domian_str=DOMIAN_STR
|
||||
@@ -161,10 +161,25 @@ $(function(){
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="dnsStrategyId"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${specialProtocol ne null and specialProtocol eq 'ipratelimit'}">
|
||||
<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="ratelimit"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required number" range="[0,100]" type="text" name="ratelimit">
|
||||
</div>
|
||||
<div for="ratelimit"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</div>
|
||||
|
||||
@@ -224,6 +224,9 @@
|
||||
<c:if test="${specialFunctionId ne null and specialFunctionId eq 'ipmulitiplex'}">
|
||||
<th><spring:message code="group_name"/></th>
|
||||
</c:if>
|
||||
<c:if test="${specialFunctionId ne null and specialFunctionId eq 'ipratelimit'}">
|
||||
<th><spring:message code="ratelimit"/></th>
|
||||
</c:if>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="type"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
@@ -279,6 +282,12 @@
|
||||
<c:if test="${specialFunctionId ne null and specialFunctionId eq 'ipmulitiplex'}">
|
||||
<td>${cfg.groupName }</td>
|
||||
</c:if>
|
||||
<c:if test="${specialFunctionId ne null and specialFunctionId eq 'ipratelimit'}">
|
||||
<td>
|
||||
<c:if test="${cfg.ratelimit eq null}">0%</c:if>
|
||||
<c:if test="${cfg.ratelimit ne null}">${cfg.ratelimit}%</c:if>
|
||||
</td>
|
||||
</c:if>
|
||||
<td>${cfg.requestName }</td>
|
||||
<td>
|
||||
<c:set var="classify"></c:set>
|
||||
|
||||
Reference in New Issue
Block a user