From 714ac134f8efc571d48d8aff311a983adca32b8d Mon Sep 17 00:00:00 2001 From: wangwei Date: Wed, 26 Jun 2019 15:01:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=86=85=E7=BD=AE=E6=8B=A6?= =?UTF-8?q?=E6=88=AA=E7=99=BD=E5=90=8D=E5=8D=95=E7=AD=96=E7=95=A5=20?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=BF=AE=E6=94=B9=E4=B8=8D=E8=83=BD=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E4=B8=8D=E8=83=BD=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/nis/web/dao/configuration/WebsiteCfgDao.xml | 3 ++- .../resources/sql/20190604/intercept-built-in.sql | 7 +++++++ src/main/webapp/WEB-INF/tags/sys/delRow.tag | 11 +++++++---- .../WEB-INF/views/cfg/intercept/interceptList.jsp | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml index 505c6b20a..84bd80df6 100644 --- a/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/WebsiteCfgDao.xml @@ -196,8 +196,9 @@ AND a.IS_VALID in (${batchValidValue}) - + AND a.compile_id != 0 + AND a.compile_id != 1 diff --git a/src/main/resources/sql/20190604/intercept-built-in.sql b/src/main/resources/sql/20190604/intercept-built-in.sql index 5506a7cd6..51eff9d79 100644 --- a/src/main/resources/sql/20190604/intercept-built-in.sql +++ b/src/main/resources/sql/20190604/intercept-built-in.sql @@ -4,3 +4,10 @@ VALUES ('default intercept policy', 128, 0, 0, 6, now(), NULL, NULL, NULL, NULL, INSERT INTO `http_url_cfg` (`cfg_desc`, `cfg_keywords`, `action`, `is_valid`, `is_audit`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `auditor_id`, `audit_time`, `service_id`, `request_id`, `compile_id`, `is_area_effective`, `classify`, `attribute`, `lable`, `expr_type`, `match_method`, `is_hexbin`, `area_effective_ids`, `function_id`, `cfg_region_code`, `cfg_type`, `ratelimit`, `user_region1`, `user_region2`, `user_region3`, `user_region4`, `user_region5`) VALUES ('default intercept policy', '20190946.com', 128, 0, 0, 6, now(), NULL, NULL, NULL, NULL, 521, 0, 0, 0, '0', '0', '0', 0, 1, 2, '', 200, 2, 'PXY_INTERCEPT_DOMAIN', NULL, NULL, NULL, NULL, NULL, NULL); +#添加内置拦截白名单策略 +INSERT INTO `cfg_index_info` +(`cfg_desc`, `action`, `is_valid`, `is_audit`, `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`, `function_id`, `dns_strategy_id`, `do_log`, `user_region1`, `user_region2`, `user_region3`, `user_region4`, `user_region5`, `office_id`, `cancel_request_id`, `source_compile_id`, `do_blacklist`, `common_group_ids`) +VALUES ('built-in fe3.delivery.mp.microsoft.com', 128, 0, 0, 6, now(), NULL, NULL, NULL, NULL, 521, 0, 1, 0, '0', '0', '0', '', 200, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, ''); +INSERT INTO `http_url_cfg` +(`cfg_desc`, `cfg_keywords`, `action`, `is_valid`, `is_audit`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `auditor_id`, `audit_time`, `service_id`, `request_id`, `compile_id`, `is_area_effective`, `classify`, `attribute`, `lable`, `expr_type`, `match_method`, `is_hexbin`, `area_effective_ids`, `function_id`, `cfg_region_code`, `cfg_type`, `ratelimit`, `user_region1`, `user_region2`, `user_region3`, `user_region4`, `user_region5`) +VALUES ('built-in fe3.delivery.mp.microsoft.com', 'fe3.delivery.mp.microsoft.com', 128, 0, 0, 6, now(), NULL, NULL, NULL, NULL, 521, 0, 1, 0, '0', '0', '0', 0, 0, 2, '', 200, 2, 'PXY_INTERCEPT_DOMAIN', NULL, NULL, NULL, NULL, NULL, NULL); \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/tags/sys/delRow.tag b/src/main/webapp/WEB-INF/tags/sys/delRow.tag index 5967432bd..87ea76f82 100644 --- a/src/main/webapp/WEB-INF/tags/sys/delRow.tag +++ b/src/main/webapp/WEB-INF/tags/sys/delRow.tag @@ -252,8 +252,10 @@ function update(url){ top.$.jBox.tip("", ""); return; } - - + if(cked.attr("compileId")==1 && cked.attr("serviceId")==521){ + top.$.jBox.tip(''); + return; + } doAll(checkboxes,url); }else{ top.$.jBox.tip("", ""); @@ -322,7 +324,7 @@ function noPassOpt(url){ var builtInCompile=false; $(checkboxes).filter(":checked").each(function(){ var compileId = $(this).attr("compileId"); - if(compileId == 0){ + if(compileId == 0 || compileId == 1){ builtInCompile=true; } }); @@ -400,7 +402,8 @@ function cancelPassOpt(url){ if(typeof serviceId != "undefined" && serviceIdJudge && typeof compileId != "undefined"){ compileIds.push(compileId); } - if((compileId == 0) || (compileId==1 && serviceId==250) || (compileId==1 && serviceId==520)){ + if((compileId == 0) || (compileId==1 && serviceId==250) || (compileId==1 && serviceId==520) + || (compileId==1 && serviceId==521)){ builtInCompile=true; } }); diff --git a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp index 8a73a864f..852fd0cc0 100644 --- a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp @@ -511,7 +511,7 @@ class="hidden" id="open${status.index}" compileId="${indexCfg.compileId}" cfgId="${indexCfg.cfgId}"> ▷ - + ${indexCfg.compileId }