SNAT地址池添加一条动态地址池信息
app域名特征添加拦截强度
(cherry picked from commit 1d71820d1ee3fbd21f201af14781849de9fb75a3)
(cherry picked from commit e14cca6824)
This commit is contained in:
@@ -302,6 +302,7 @@ public class IpMultiplexController extends CommonController {
|
||||
public List<IpAddrPoolCfg> ajaxGetAddrPools(HttpServletRequest request, HttpServletResponse response) {
|
||||
List<IpAddrPoolCfg> addrPools = ipAddrPoolCfgService.getEffectiveAddrPool();
|
||||
List<IpAddrPoolCfg> addrPoolsNew = new ArrayList<>();
|
||||
Properties msgProp = getMsgProp();
|
||||
for (IpAddrPoolCfg addrPool : addrPools) {
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("addr_pool_id", addrPool.getCfgId());
|
||||
@@ -309,6 +310,7 @@ public class IpMultiplexController extends CommonController {
|
||||
Map<String, Object> resultMap = ConfigServiceUtil.getCGIInfo(url, Constants.IP_NUM_GET, params);
|
||||
if (!StringUtil.isEmpty(resultMap) && !StringUtil.isEmpty(resultMap.get("num"))
|
||||
&& Integer.parseInt(resultMap.get("num").toString()) > 0) {
|
||||
addrPool.setAddrPoolName(msgProp.getProperty(addrPool.getAddrPoolName(),addrPool.getAddrPoolName()));
|
||||
addrPoolsNew.add(addrPool);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,6 +136,7 @@
|
||||
<result column="ratelimit" property="ratelimit" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="AppTopicDomainCfgMap" type="com.nis.domain.configuration.AppTopicDomainCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
@@ -410,7 +411,7 @@
|
||||
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
|
||||
r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY,
|
||||
r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE,
|
||||
r.DOMAIN,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.DO_LOG
|
||||
r.DOMAIN,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.DO_LOG,r.USER_REGION5
|
||||
</sql>
|
||||
|
||||
<sql id="AppTopicDomainCfg_Column" >
|
||||
@@ -1818,11 +1819,11 @@
|
||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
||||
DOMAIN,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG
|
||||
DOMAIN,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG,USER_REGION5
|
||||
)values (
|
||||
<include refid="AppCommonCfg_Value_List" />,
|
||||
#{cfgKeywords,jdbcType=VARCHAR},#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER}
|
||||
#{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER},#{userRegion5,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertAppDomainCfgBatch" parameterType="com.nis.domain.configuration.AppDomainCfg" >
|
||||
@@ -2424,6 +2425,9 @@
|
||||
<if test="doLog != null" >
|
||||
do_log = #{doLog,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userRegion5 != null" >
|
||||
USER_REGION5 = #{userRegion5,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
|
||||
@@ -1427,6 +1427,10 @@ public class AppCfgService extends BaseService {
|
||||
String userRegion = "APP_ID=" + entity.getAppCode() + Constants.USER_REGION_SPLIT + "DOMAIN_ID="
|
||||
+ entity.getCompileId() + Constants.USER_REGION_SPLIT + "DOMAIN_STR="
|
||||
+ keywordsEscape(entity.getCfgKeywords());
|
||||
if(!StringUtil.isEmpty(entity.getUserRegion5())){
|
||||
userRegion+=";"+Constants.INTERCEPT_DOMAN_INTENSITY_USER_REGION_KEY+"="+entity.getUserRegion5();
|
||||
}
|
||||
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
|
||||
@@ -138,6 +138,24 @@ $(function(){
|
||||
<div for="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="intercept_intensity" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="userRegion5"
|
||||
class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('INTERCEPT_DOMAIN_INTENSITY')}" var="intensityC">
|
||||
<option value="${intensityC.itemCode}" <c:if test="${_cfg.userRegion5==intensityC.itemCode || (empty _cfg.userRegion5 && intensityC.itemCode eq 1)}">selected</c:if>><spring:message code="${intensityC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="userRegion5"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
||||
|
||||
@@ -421,15 +421,28 @@
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" serviceId="${cfg.serviceId}" id="${cfg.cfgId}" value="${cfg.isAudit}" addressPoolId="${cfg.cfgId }" ></td>
|
||||
<td>
|
||||
<c:if test="${cfg.cfgId ne 0 }">
|
||||
<input type="checkbox" class="i-checks" serviceId="${cfg.serviceId}" id="${cfg.cfgId}" value="${cfg.isAudit}" addressPoolId="${cfg.cfgId }" >
|
||||
</c:if>
|
||||
</td>
|
||||
<td>${cfg.cfgId }</td>
|
||||
<td>
|
||||
<c:if test="${cfg.cfgId ne 0 }">
|
||||
<a href="javascript:;" data-original-title="${cfg.addrPoolName}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(cfg.addrPoolName,20)}
|
||||
</a>
|
||||
</c:if>
|
||||
<c:if test="${cfg.cfgId eq 0 }">
|
||||
<c:set var="poolName"><spring:message code="${cfg.addrPoolName}"/></c:set>
|
||||
<a href="javascript:;" data-original-title="${poolName}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(poolName,20)}
|
||||
</a>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>${cfg.ipTotal }</td>
|
||||
<td><c:if test="${cfg.cfgId ne 0 }"> ${cfg.ipTotal } </c:if> </td>
|
||||
<td audit="${cfg.isAudit}" addrPoolId="${cfg.cfgId }"><div class="loading-total"></div></td>
|
||||
|
||||
<%-- <td>
|
||||
@@ -459,7 +472,9 @@
|
||||
<!-- <a href="#">新增IP</a>
|
||||
<a href="#">删除IP</a> -->
|
||||
<a href="javascript:;" onclick="getInfo(this)" addrPoolId="${cfg.cfgId }"><spring:message code="show_available_ips"/></a>
|
||||
<c:if test="${cfg.cfgId ne 0 }">
|
||||
<a href="javascript:;" onclick="getAllIpInfo(this)" addrPoolId="${cfg.cfgId }"><spring:message code="show_ips"/></a>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>${cfg.requestName }</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user