配置导入增加配置描述、关键字长度限制;部分报表导出文件名修改
This commit is contained in:
@@ -90,6 +90,14 @@ public class CheckComplexStringFormatThread implements Callable<String>{
|
|||||||
StringBuffer errInfo = new StringBuffer();
|
StringBuffer errInfo = new StringBuffer();
|
||||||
ComplexkeywordCfg baseStringCfg = new ComplexkeywordCfg();
|
ComplexkeywordCfg baseStringCfg = new ComplexkeywordCfg();
|
||||||
BeanUtils.copyProperties(list.get(i), 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(3)) {
|
if (regionDict.getRegionType().equals(3)) {
|
||||||
if (regionDict.getFunctionId().equals(7)) {
|
if (regionDict.getFunctionId().equals(7)) {
|
||||||
Long dnsStrategyId = baseStringCfg.getDnsStrategyId();
|
Long dnsStrategyId = baseStringCfg.getDnsStrategyId();
|
||||||
|
|||||||
@@ -103,6 +103,11 @@ public class CheckIpFormatThread implements Callable<String>{
|
|||||||
StringBuffer errInfo = new StringBuffer();
|
StringBuffer errInfo = new StringBuffer();
|
||||||
IpPortCfg baseIpCfg = new IpPortCfg();
|
IpPortCfg baseIpCfg = new IpPortCfg();
|
||||||
BeanUtils.copyProperties(list.get(i), baseIpCfg);
|
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
|
// packet ip ratelimit
|
||||||
if (serviceDict!=null&&serviceDict.getFunctionId().intValue() == 5 && serviceDict.getAction().intValue() == 64) {
|
if (serviceDict!=null&&serviceDict.getFunctionId().intValue() == 5 && serviceDict.getAction().intValue() == 64) {
|
||||||
|
|||||||
@@ -88,6 +88,14 @@ public class CheckStringFormatThread implements Callable<String>{
|
|||||||
StringBuffer errInfo = new StringBuffer();
|
StringBuffer errInfo = new StringBuffer();
|
||||||
BaseStringCfg baseStringCfg = new BaseStringCfg();
|
BaseStringCfg baseStringCfg = new BaseStringCfg();
|
||||||
BeanUtils.copyProperties(list.get(i), 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.getRegionType().equals(2)) {
|
||||||
if (regionDict.getFunctionId().equals(510) && "p2p_hash".equals(regionDict.getConfigServiceType())) {
|
if (regionDict.getFunctionId().equals(510) && "p2p_hash".equals(regionDict.getConfigServiceType())) {
|
||||||
String userRegion1 = baseStringCfg.getUserRegion1();
|
String userRegion1 = baseStringCfg.getUserRegion1();
|
||||||
|
|||||||
@@ -1429,4 +1429,7 @@ letter_num=LETTER
|
|||||||
config_num=CONFIG
|
config_num=CONFIG
|
||||||
monitor_num=MONITOR
|
monitor_num=MONITOR
|
||||||
control_num=CONTROL
|
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
|
||||||
@@ -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
|
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
|
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
|
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
|
||||||
@@ -1429,4 +1429,7 @@ letter_num=\u6765\u51fd\u4ef6\u6570
|
|||||||
config_num=\u914d\u7f6e\u603b\u6570
|
config_num=\u914d\u7f6e\u603b\u6570
|
||||||
monitor_num=\u76d1\u6d4b\u6570\u91cf
|
monitor_num=\u76d1\u6d4b\u6570\u91cf
|
||||||
control_num=\u7ba1\u63a7\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
|
||||||
@@ -121,9 +121,36 @@ $(document).ready(function() {
|
|||||||
var action = "";
|
var action = "";
|
||||||
}
|
}
|
||||||
var reportType = $("[name=reportType]").find('[value=' + "${bean.reportType}" + ']').text() + "_";
|
var reportType = $("[name=reportType]").find('[value=' + "${bean.reportType}" + ']').text() + "_";
|
||||||
var reportTime = "${bean.reportTime}";
|
//var reportTime = "${bean.reportTime}";
|
||||||
return cfgName + action + reportType + 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;
|
var reportDate=0;
|
||||||
function changeReportType(reportType) {
|
function changeReportType(reportType) {
|
||||||
|
|||||||
Reference in New Issue
Block a user