From ea82be590e5bd41da7b67b9dc00f4eda85a3fdc7 Mon Sep 17 00:00:00 2001 From: duandongmei Date: Thu, 24 Jan 2019 15:29:10 +0600 Subject: [PATCH] =?UTF-8?q?domain=E5=92=8Curl=E5=9F=9F=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=97=B6=E5=A2=9E=E5=8A=A0=E8=AD=A6=E5=91=8A=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E3=80=90=E5=90=8E=E6=9C=9F=E9=9C=80=E5=9C=A8?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E6=97=B6=E4=B9=9F=E5=A2=9E=E5=8A=A0=E6=AD=A4?= =?UTF-8?q?=E8=AD=A6=E5=91=8A=E3=80=91=E3=80=82=20=E4=BF=9D=E6=8A=A4?= =?UTF-8?q?=E5=90=8D=E5=8D=95=E4=BF=A1=E6=81=AF=E6=9D=A8=E5=A8=81=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E5=90=8E=EF=BC=8C=E5=86=8D=E8=BF=9B=E8=A1=8C=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/20190124/update_function_region.sql | 2 ++ .../WEB-INF/views/cfg/complexCfgForm.jsp | 3 ++- .../1.11.0/localization/messages_en.js | 4 +++- .../1.11.0/localization/messages_ru.js | 4 +++- .../1.11.0/localization/messages_zh.js | 4 +++- .../webapp/static/global/scripts/common.js | 24 +++++++++++++++++++ 6 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 src/main/resources/sql/20190124/update_function_region.sql diff --git a/src/main/resources/sql/20190124/update_function_region.sql b/src/main/resources/sql/20190124/update_function_region.sql new file mode 100644 index 000000000..a95eab9bf --- /dev/null +++ b/src/main/resources/sql/20190124/update_function_region.sql @@ -0,0 +1,2 @@ +#修改proxy的缓存 url region字典,标记为url配置,用作保护名单的提醒 +update function_region_dict set config_service_type='cache_url' where dict_id=604; \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/complexCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/complexCfgForm.jsp index 6294938c4..221d2c4a5 100644 --- a/src/main/webapp/WEB-INF/views/cfg/complexCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/complexCfgForm.jsp @@ -85,7 +85,7 @@
- domainCheck urlCheck " type="text" id="tags_${tabName}${status.index}" name="${cfgName}.cfgKeywords" value="${cfg.cfgKeywords}">
@@ -96,6 +96,7 @@ domainCheck
+ urlCheck " type="text" name="${cfgName}.cfgKeywords" diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js index 45cd4d968..49538f91b 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js @@ -87,6 +87,8 @@ noStrategyCheck:"No effective spoofing IP configuration", keywordLength:"Please enter a value between 4 and 1024 characters long.", arbitrary:"Arbitrarily", - log_trend:"Log Trend" + log_trend:"Log Trend", + info:"Prompt", + protect_warn:"Warning!" }); }(jQuery)); diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js index 5d564b093..72474f98f 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js @@ -87,6 +87,8 @@ noStrategyCheck:"Нет актированной конфигурации IP-спуфинг.", keywordLength:"Введите между 4 и 1024 символов длинной.", arbitrary:"Любой", - log_trend:"Журнал Тенденция" + log_trend:"Журнал Тенденция", + info:"Инфо", + protect_warn:"Warning!" }); }(jQuery)); diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js index dc90909f1..46a67c833 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js @@ -87,6 +87,8 @@ noStrategyCheck:"策略组下无有效的欺骗IP配置", keywordLength:"请输入一个长度介于4 和1024 之间的字符串", arbitrary:"任意", - log_trend:"日志趋势" + log_trend:"日志趋势", + info:"提示", + protect_warn:"Warning!" }); }(jQuery)); diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index 85b9a4aff..f66ac62bb 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -1,4 +1,11 @@ $(function(){ + var protectedList = [".com"]; + $(".domainCheck").each(function(){ + $(this).on("blur",function(){ + protectedListWarn(this,$(this).val(),protectedList); + }); + protectedListWarn(this,$(this).val(),protectedList); + }); // var leff =$("span[class~='le-ca-fo']").attr("data-original-title") // getConfigSyncStatus(); $("#contentTable").not(".logTb").find("tbody tr").each(function(i){ @@ -429,6 +436,9 @@ $(function(){ }); $(this).prev("input[name$='cfgKeywords']").val(keywordValue);*/ exprTypeChecked(objNamePrefix,size,options); + if($(this).hasClass("urlCheck")){ + protectedListWarn($("#"+$(this).attr("id")+"_tagsinput"),$(this).val(),protectedList); + } }, onRemoveTag:function(tag,size){ $(this).parent(".col-md-6").next("div").html(""); @@ -439,6 +449,9 @@ $(function(){ }); $(this).prev("input[name$='cfgKeywords']").val(keywordValue);*/ exprTypeChecked(objNamePrefix,size,options); + if($(this).hasClass("urlCheck")){ + protectedListWarn($("#"+$(this).attr("id")+"_tagsinput"),$(this).val(),protectedList); + } } }); $(".tagsinput").popover({ @@ -1705,3 +1718,14 @@ function addPrintTableCss(rowValue,cellValue,tableIdValue,cssName){ } } } +/**保护名单提醒**/ +function protectedListWarn(obj,value,protectedList){ + $(obj).next(".fa-warning").remove(); + if(value !=null){ + if(protectedList.indexOf(value) >= 0){ + //$(obj).after(""+$.validator.messages.protect_warn+""); + $.jBox.info($.validator.messages.protect_warn,$.validator.messages.info); + $('.jbox-body .jbox-icon').css('top','55px'); + } + } +}