配置导入增加配置描述、关键字长度限制;部分报表导出文件名修改

This commit is contained in:
zhangwenqing
2018-12-27 17:28:44 +08:00
parent 1948fd6763
commit 09705aca19
7 changed files with 62 additions and 5 deletions

View File

@@ -90,6 +90,14 @@ public class CheckComplexStringFormatThread implements Callable<String>{
StringBuffer errInfo = new StringBuffer();
ComplexkeywordCfg baseStringCfg = new ComplexkeywordCfg();
BeanUtils.copyProperties(list.get(i), baseStringCfg);
// 配置描述、关键字长度限制
if(baseStringCfg.getCfgDesc().length() > 128) {
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
}
if(baseStringCfg.getCfgKeywords().length() < 4 || baseStringCfg.getCfgKeywords().length() > 1024){
errInfo.append(prop.getProperty("key_word")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("min_length")+":4,"+prop.getProperty("max_length")+":1024") + ";");
}
if (regionDict.getRegionType().equals(3)) {
if (regionDict.getFunctionId().equals(7)) {
Long dnsStrategyId = baseStringCfg.getDnsStrategyId();

View File

@@ -103,6 +103,11 @@ public class CheckIpFormatThread implements Callable<String>{
StringBuffer errInfo = new StringBuffer();
IpPortCfg baseIpCfg = new IpPortCfg();
BeanUtils.copyProperties(list.get(i), baseIpCfg);
// 配置描述长度限制
if(baseIpCfg.getCfgDesc().length() > 128) {
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
}
// 特殊字段验证
// packet ip ratelimit
if (serviceDict!=null&&serviceDict.getFunctionId().intValue() == 5 && serviceDict.getAction().intValue() == 64) {

View File

@@ -88,6 +88,14 @@ public class CheckStringFormatThread implements Callable<String>{
StringBuffer errInfo = new StringBuffer();
BaseStringCfg baseStringCfg = new BaseStringCfg();
BeanUtils.copyProperties(list.get(i), baseStringCfg);
// 配置描述、关键字长度限制
if(baseStringCfg.getCfgDesc().length() > 128) {
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
}
if(baseStringCfg.getCfgKeywords().length() < 4 || baseStringCfg.getCfgKeywords().length() > 1024){
errInfo.append(prop.getProperty("key_word")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("min_length")+":4,"+prop.getProperty("max_length")+":1024") + ";");
}
if (regionDict.getRegionType().equals(2)) {
if (regionDict.getFunctionId().equals(510) && "p2p_hash".equals(regionDict.getConfigServiceType())) {
String userRegion1 = baseStringCfg.getUserRegion1();

View File

@@ -1429,4 +1429,7 @@ letter_num=LETTER
config_num=CONFIG
monitor_num=MONITOR
control_num=CONTROL
contains_non_hex_char=Contains non-hexadecimal characters
contains_non_hex_char=Contains non-hexadecimal characters
max_length=Maximum Length
min_length=Minimum Length
length_error=Length Error

View File

@@ -1433,4 +1433,7 @@ letter_num=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u041f\u
config_num=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439
monitor_num=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430
control_num=\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f
contains_non_hex_char=Contains non-hexadecimal characters
contains_non_hex_char=Contains non-hexadecimal characters
max_length=Maximum Length
min_length=Minimum Length
length_error=Length Error

View File

@@ -1429,4 +1429,7 @@ letter_num=\u6765\u51fd\u4ef6\u6570
config_num=\u914d\u7f6e\u603b\u6570
monitor_num=\u76d1\u6d4b\u6570\u91cf
control_num=\u7ba1\u63a7\u6570\u91cf
contains_non_hex_char=\u5305\u542b\u975e\u5341\u516d\u8fdb\u5236\u5b57\u7b26
contains_non_hex_char=\u5305\u542b\u975e\u5341\u516d\u8fdb\u5236\u5b57\u7b26
max_length=\u6700\u5927\u957F\u5EA6
min_length=\u6700\u5C0F\u957F\u5EA6
length_error=\u957F\u5EA6\u9519\u8BEF

View File

@@ -121,9 +121,36 @@ $(document).ready(function() {
var action = "";
}
var reportType = $("[name=reportType]").find('[value=' + "${bean.reportType}" + ']').text() + "_";
var reportTime = "${bean.reportTime}";
return cfgName + action + reportType + reportTime;
//var reportTime = "${bean.reportTime}";
return cfgName + action + reportType + getStringFormatDate();
}
function getStringFormatDate() {
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
var strDate = date.getDate();
var hours = date.getHours();
var minutes = date.getMinutes();
var seconds = date.getSeconds();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
if (hours >= 1 && hours <= 9) {
hours = "0" + hours;
}
if (minutes >= 1 && minutes <= 9) {
minutes = "0" + minutes;
}
if (seconds >= 1 && seconds <= 9) {
seconds = "0" + seconds;
}
var currentdate = year+""+ month+""+strDate+""+ hours+""+ minutes+""+seconds;
return currentdate;
}
var reportDate=0;
function changeReportType(reportType) {