From 3e706f70277c42a008b58ac234e2cf9e4f0aa83a Mon Sep 17 00:00:00 2001 From: leijun Date: Wed, 23 Jan 2019 10:33:55 +0000 Subject: [PATCH] =?UTF-8?q?SNAT=E5=9C=B0=E5=9D=80=E6=B1=A0=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=B8=80=E6=9D=A1=E5=8A=A8=E6=80=81=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E6=B1=A0=E4=BF=A1=E6=81=AF=20app=E5=9F=9F=E5=90=8D=E7=89=B9?= =?UTF-8?q?=E5=BE=81=E6=B7=BB=E5=8A=A0=E6=8B=A6=E6=88=AA=E5=BC=BA=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 1d71820d1ee3fbd21f201af14781849de9fb75a3) (cherry picked from commit e14cca68243de0f001ec7a94cb50940db006545b) --- .../manipulation/IpMultiplexController.java | 2 ++ .../nis/web/dao/configuration/AppCfgDao.xml | 10 +++++++--- .../service/configuration/AppCfgService.java | 4 ++++ .../sql/20190123/add_ip_reuse_addr_pool.sql | 0 .../views/cfg/app/appDomainCfgForm.jsp | 18 ++++++++++++++++++ .../maintenance/ipMultiplexPool/snatlist2.jsp | 19 +++++++++++++++++-- 6 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/sql/20190123/add_ip_reuse_addr_pool.sql diff --git a/src/main/java/com/nis/web/controller/configuration/manipulation/IpMultiplexController.java b/src/main/java/com/nis/web/controller/configuration/manipulation/IpMultiplexController.java index 53f00fbaf..2ed0a247f 100644 --- a/src/main/java/com/nis/web/controller/configuration/manipulation/IpMultiplexController.java +++ b/src/main/java/com/nis/web/controller/configuration/manipulation/IpMultiplexController.java @@ -302,6 +302,7 @@ public class IpMultiplexController extends CommonController { public List ajaxGetAddrPools(HttpServletRequest request, HttpServletResponse response) { List addrPools = ipAddrPoolCfgService.getEffectiveAddrPool(); List addrPoolsNew = new ArrayList<>(); + Properties msgProp = getMsgProp(); for (IpAddrPoolCfg addrPool : addrPools) { Map params = new HashMap(); params.put("addr_pool_id", addrPool.getCfgId()); @@ -309,6 +310,7 @@ public class IpMultiplexController extends CommonController { Map 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); } } diff --git a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml index 638f888ec..4c6fe22bd 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml @@ -136,6 +136,7 @@ + @@ -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 @@ -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 ( , #{cfgKeywords,jdbcType=VARCHAR},#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER}, - #{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER} + #{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER},#{userRegion5,jdbcType=VARCHAR} ) @@ -2424,6 +2425,9 @@ do_log = #{doLog,jdbcType=INTEGER}, + + USER_REGION5 = #{userRegion5,jdbcType=INTEGER}, + where cfg_id = #{cfgId,jdbcType=BIGINT} diff --git a/src/main/java/com/nis/web/service/configuration/AppCfgService.java b/src/main/java/com/nis/web/service/configuration/AppCfgService.java index 36b287c2f..a67dc4d6a 100644 --- a/src/main/java/com/nis/web/service/configuration/AppCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AppCfgService.java @@ -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); diff --git a/src/main/resources/sql/20190123/add_ip_reuse_addr_pool.sql b/src/main/resources/sql/20190123/add_ip_reuse_addr_pool.sql new file mode 100644 index 000000000..e69de29bb diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp index 1bc39b110..327b898aa 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp @@ -138,6 +138,24 @@ $(function(){
+
+
+ +
+ +
+
+
+
+ +