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'); + } + } +}