1.修复HTTP(s) Monitor/Block配置导出无请求内容、响应头域BUG

2.增加分组域管理Excel导入GroupName必填校验
This commit is contained in:
zhangwenqing
2019-06-24 10:36:36 +08:00
parent a0ecce4678
commit 1eaf3fb4c6
3 changed files with 20 additions and 7 deletions

View File

@@ -152,7 +152,13 @@ public class CheckIpFormatThread implements Callable<String>{
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
}
}
if(regionDict.getFunctionId().equals(605)) {
if(StringUtils.isBlank(baseIpCfg.getGroupName())) {
errInfo.append(
String.format(prop.getProperty("can_not_null"), prop.getProperty("group_name")) + ";");
}
}
if(regionDict.getFunctionId().equals(200)) {
if(!serviceDict.getAction().equals(2)) {
baseIpCfg.setDoLog(0);

View File

@@ -125,6 +125,12 @@ public class CheckStringFormatThread implements Callable<String>{
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
}
if(regionDict.getFunctionId().equals(606) || regionDict.getFunctionId().equals(607) || regionDict.getFunctionId().equals(608)) {
if(StringUtils.isBlank(baseStringCfg.getGroupName())) {
errInfo.append(
String.format(prop.getProperty("can_not_null"), prop.getProperty("group_name")) + ";");
}
}
if(regionDict.getFunctionId().equals(200)) {
if(!serviceDict.getAction().equals(2)) {
baseStringCfg.setDoLog(0);

View File

@@ -501,12 +501,7 @@ public class HttpRedirectPolicyController extends BaseController {
dataMap.put(entity.getMenuNameCode(), ipLists);
dataMap.put("NTC_HTTP_URL", httpUrlList);
dataMap.put("NTC_HTTP_REQ_HDR", httpReqHdrList);
if (entity.getFunctionId() != 208 && entity.getFunctionId() != 211) {
titleList.add("NTC_HTTP_RES_BODY");
classMap.put("NTC_HTTP_RES_BODY", HttpBodyCfg.class);
noExportMap.put("NTC_HTTP_RES_BODY", httpResBodyCfgNoExport);
dataMap.put("NTC_HTTP_RES_BODY", httpResBodyList);
} else if (entity.getFunctionId() != 211) {
if (entity.getFunctionId() != 211) {
titleList.add("NTC_HTTP_RES_HDR");
titleList.add("NTC_HTTP_REQ_BODY");
classMap.put("NTC_HTTP_RES_HDR", HttpResHeadCfg.class);
@@ -515,6 +510,12 @@ public class HttpRedirectPolicyController extends BaseController {
noExportMap.put("NTC_HTTP_REQ_BODY", httpReqBodyCfgNoExport);
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
dataMap.put("NTC_HTTP_REQ_BODY", httpReqBodyList);
if (entity.getFunctionId() != 208) {
titleList.add("NTC_HTTP_RES_BODY");
classMap.put("NTC_HTTP_RES_BODY", HttpBodyCfg.class);
noExportMap.put("NTC_HTTP_RES_BODY", httpResBodyCfgNoExport);
dataMap.put("NTC_HTTP_RES_BODY", httpResBodyList);
}
}
titleList.add("NTC_UNIVERSAL_IP");
titleList.add("NTC_SUBSCRIBE_ID");