Merge branch 'bugfix-20190123-import' into 'dev-ycx'
修正Ip Spoofing配置导入模板'direction'字段默认值批注;修改配置导入域名字段校验;修复配置导入属性验证发生异常后无提示信息问题(王鑫) See merge request K18_NTCS_WEB/NTC!11 (cherry picked from commit 6704549d61a525406f33a02eb8f93762d272aa40) 38f563ce 修正Ip Spoofing配置导入模板'direction'字段默认值批注;修改配置导入域名字段校验;修复配置导入属性验证发生异常后无提示信息问题(王鑫)
This commit is contained in:
@@ -496,7 +496,7 @@ public class ExportExcel {
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("required")+"\n";
|
||||
index++;
|
||||
}
|
||||
if(("domain_name".equals(headerStr)) && (region.getFunctionId().equals(560))){
|
||||
if("domain_name".equals(headerStr)){
|
||||
commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
index++;
|
||||
//1、非空
|
||||
@@ -1113,9 +1113,9 @@ public class ExportExcel {
|
||||
commentStr="";
|
||||
}
|
||||
if(StringUtil.isEmpty(defaultValue)){
|
||||
defaultValue="0";
|
||||
defaultValue = region.getConfigDirection().split(",")[0];
|
||||
}
|
||||
defaultValue = region.getFunctionId().equals(301)?"1":defaultValue;
|
||||
|
||||
}
|
||||
/*}*/
|
||||
/*if(StringUtil.isEmpty(commentStr)){
|
||||
|
||||
@@ -45,6 +45,7 @@ public class CheckAppFeatureComplexStringFormatThread implements Callable<String
|
||||
public String call() throws Exception {
|
||||
List<Object> dataList=Lists.newArrayList(Constants.MAAT_JSON_SEND_SIZE);
|
||||
StringBuffer msg=new StringBuffer();
|
||||
boolean error = false;
|
||||
while(!srcQueue.isEmpty()) {
|
||||
int size=srcQueue.drainTo(dataList,Constants.MAAT_JSON_SEND_SIZE);
|
||||
if(regionDict.getRegionType().intValue()==3) {
|
||||
@@ -57,10 +58,15 @@ public class CheckAppFeatureComplexStringFormatThread implements Callable<String
|
||||
//msg=e.getMessage();
|
||||
//msg.append(e.getMessage());
|
||||
//break;
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
dataList.clear();
|
||||
}
|
||||
if(error) {
|
||||
msg.append("validate_error");
|
||||
}
|
||||
|
||||
return msg.toString();
|
||||
}
|
||||
public List<AppComplexFeatureCfg> checkAppComplexFeatureCfg(StringBuffer msg,
|
||||
|
||||
@@ -45,6 +45,7 @@ public class CheckComplexStringFormatThread implements Callable<String>{
|
||||
public String call() throws Exception {
|
||||
List<Object> dataList=Lists.newArrayList(Constants.MAAT_JSON_SEND_SIZE);
|
||||
StringBuffer msg=new StringBuffer();
|
||||
boolean error = false;
|
||||
while(!srcQueue.isEmpty()) {
|
||||
int size=srcQueue.drainTo(dataList,Constants.MAAT_JSON_SEND_SIZE);
|
||||
if(regionDict.getRegionType().intValue()==3) {
|
||||
@@ -57,10 +58,15 @@ public class CheckComplexStringFormatThread implements Callable<String>{
|
||||
//msg=e.getMessage();
|
||||
//msg.append(e.getMessage());
|
||||
//break;
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
dataList.clear();
|
||||
}
|
||||
if(error) {
|
||||
msg.append("validate_error");
|
||||
}
|
||||
|
||||
return msg.toString();
|
||||
}
|
||||
public List<ComplexkeywordCfg> checkComplexStringCfg(StringBuffer msg,
|
||||
|
||||
@@ -42,6 +42,7 @@ public class CheckDnsResStrategyFormatThread implements Callable<String>{
|
||||
public String call() throws Exception {
|
||||
List<Object> dataList=Lists.newArrayList(Constants.MAAT_JSON_SEND_SIZE);
|
||||
StringBuffer msg=new StringBuffer();
|
||||
boolean error = false;
|
||||
while(!srcQueue.isEmpty()) {
|
||||
int size=srcQueue.drainTo(dataList,Constants.MAAT_JSON_SEND_SIZE);
|
||||
if(regionDict.getRegionType().intValue()==6) {
|
||||
@@ -53,10 +54,15 @@ public class CheckDnsResStrategyFormatThread implements Callable<String>{
|
||||
// TODO: handle exception
|
||||
//msg=e.getMessage();
|
||||
//break;
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
dataList.clear();
|
||||
}
|
||||
if(error) {
|
||||
msg.append("validate_error");
|
||||
}
|
||||
|
||||
return msg.toString();
|
||||
}
|
||||
public List<DnsResStrategy> checkDnsResStrategyCfg(StringBuffer msg,List<?> list)
|
||||
|
||||
@@ -51,6 +51,7 @@ public class CheckIpFormatThread implements Callable<String>{
|
||||
public String call() throws Exception {
|
||||
List<Object> dataList=Lists.newArrayList(Constants.MAAT_JSON_SEND_SIZE);
|
||||
StringBuffer msg=new StringBuffer();
|
||||
boolean error = false;
|
||||
while(!srcQueue.isEmpty()) {
|
||||
int size=srcQueue.drainTo(dataList,Constants.MAAT_JSON_SEND_SIZE);
|
||||
if(regionDict.getRegionType().intValue()==1) {
|
||||
@@ -63,10 +64,15 @@ public class CheckIpFormatThread implements Callable<String>{
|
||||
// TODO: handle exception
|
||||
//msg.append(e.getMessage());
|
||||
//break;
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
dataList.clear();
|
||||
}
|
||||
if(error) {
|
||||
msg.append("validate_error");
|
||||
}
|
||||
|
||||
return msg.toString();
|
||||
}
|
||||
public List<BaseIpCfg> checkIpCfg(StringBuffer msg,List<Map<Long,AsnGroupInfo>> asnNos, List<Object> list)
|
||||
|
||||
@@ -44,6 +44,7 @@ public class CheckStringFormatThread implements Callable<String>{
|
||||
public String call() throws Exception {
|
||||
List<Object> dataList=Lists.newArrayList(Constants.MAAT_JSON_SEND_SIZE);
|
||||
StringBuffer msg=new StringBuffer();
|
||||
boolean error = false;
|
||||
while(!srcQueue.isEmpty()) {
|
||||
int size=srcQueue.drainTo(dataList,Constants.MAAT_JSON_SEND_SIZE);
|
||||
if(regionDict.getRegionType().intValue()==2) {
|
||||
@@ -55,10 +56,15 @@ public class CheckStringFormatThread implements Callable<String>{
|
||||
// TODO: handle exception
|
||||
//msg=e.getMessage();
|
||||
//break;
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
dataList.clear();
|
||||
}
|
||||
if(error) {
|
||||
msg.append("validate_error");
|
||||
}
|
||||
|
||||
return msg.toString();
|
||||
}
|
||||
|
||||
@@ -84,7 +90,7 @@ public class CheckStringFormatThread implements Callable<String>{
|
||||
}
|
||||
StringBuffer errTip = new StringBuffer();
|
||||
Pattern pattern = Pattern.compile("\t|\r|\n|\b|\f");
|
||||
Pattern domainPattern = Pattern.compile(Constants.DOMAIN_REGEXP);
|
||||
Pattern domainPattern = Pattern.compile("^[a-zA-Z0-9.-]*$");
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
StringBuffer errInfo = new StringBuffer();
|
||||
BaseStringCfg baseStringCfg = new BaseStringCfg();
|
||||
|
||||
@@ -47,6 +47,7 @@ public class CheckTopicWebsiteFormatThread implements Callable<String>{
|
||||
public String call() throws Exception {
|
||||
List<Object> dataList=Lists.newArrayList(Constants.MAAT_JSON_SEND_SIZE);
|
||||
StringBuffer msg=new StringBuffer();
|
||||
boolean error = false;
|
||||
while(!srcQueue.isEmpty()) {
|
||||
int size=srcQueue.drainTo(dataList,Constants.MAAT_JSON_SEND_SIZE);
|
||||
if(regionDict.getRegionType().intValue()==2) {
|
||||
@@ -58,10 +59,15 @@ public class CheckTopicWebsiteFormatThread implements Callable<String>{
|
||||
// TODO: handle exception
|
||||
//msg=e.getMessage();
|
||||
//break;
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
dataList.clear();
|
||||
}
|
||||
if(error) {
|
||||
msg.append("validate_error");
|
||||
}
|
||||
|
||||
return msg.toString();
|
||||
}
|
||||
|
||||
@@ -87,7 +93,7 @@ public class CheckTopicWebsiteFormatThread implements Callable<String>{
|
||||
}
|
||||
StringBuffer errTip = new StringBuffer();
|
||||
Pattern pattern = Pattern.compile("\t|\r|\n|\b|\f");
|
||||
Pattern domainPattern = Pattern.compile(Constants.DOMAIN_REGEXP);
|
||||
Pattern domainPattern = Pattern.compile("^[a-zA-Z0-9.-]*$");
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
StringBuffer errInfo = new StringBuffer();
|
||||
AppTopicDomainCfg baseStringCfg = new AppTopicDomainCfg();
|
||||
|
||||
Reference in New Issue
Block a user