Whitelist、Packet、Stream配置导入增加doLog属性.

This commit is contained in:
zhangwenqing
2019-01-13 14:51:23 +08:00
parent cc0b7dc86c
commit 0b1b3132ef
8 changed files with 178 additions and 9 deletions

View File

@@ -490,6 +490,34 @@ public class ExportExcel {
index++;
}
// doLog
if("do_log".equals(headerStr)) {
commentStr="";
List<SysDataDictionaryItem> dict=DictUtils.getDictList("DO_LOG");
if(dict !=null && dict.size()>0){
String configDoLog = service.getConfigDoLog();
String doLogOption = configDoLog.substring(configDoLog.indexOf(";"), configDoLog.lastIndexOf(";"));
for (SysDataDictionaryItem sysDataDictionaryItem : dict) {
String itemCode = sysDataDictionaryItem.getItemCode();
if(doLogOption.contains(itemCode)) {
commentStr=commentStr+itemCode+""+msgProp.getProperty(sysDataDictionaryItem.getItemValue(),sysDataDictionaryItem.getItemValue())+"\n";
index++;
}
}
defaultValue = configDoLog.substring(configDoLog.lastIndexOf(";")+1);
}
commentStr=msgProp.getProperty("select")+":\n"+commentStr;
index++;
commentStr=commentStr+"\n"+msgProp.getProperty("rule_desc_tip")+":\n";
index++;
if(!StringUtil.isEmpty(defaultValue)){
//1、默认值说明
commentStr=commentStr+""+msgProp.getProperty("default_value")+":"+defaultValue+"\n";
index++;
index++;
}
}
if(region.getRegionType().equals(1)){//IP配置
//ip配置需要导入的信息srcIp srcPort destIp destPort Protocol Direction
//确定需要导入的srcIp srcPort destIp destPort信息