Merge branch 'develop' of https://git.mesalab.cn/K18_NTCS_WEB/NTC.git into develop

This commit is contained in:
duandongmei
2019-01-23 19:28:44 +06:00
12 changed files with 48 additions and 15 deletions

View File

@@ -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)){

View File

@@ -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,

View File

@@ -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,

View File

@@ -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)

View File

@@ -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();

View File

@@ -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();

View File

@@ -268,7 +268,7 @@ public class DashboardController extends BaseController{
//两个时间段之间的秒数
double allSeconds = DateUtils.getSecondsOfTwoDate(sdf.parse(beginDate),sdf.parse(endDate));
for(TrafficIpActiveStatistic data:list) {
data.setAvgByte(f.format(Long.parseLong(data.get_byte())/1024/1024/1024/allSeconds));
data.setAvgByte(f.format(Long.parseLong(data.get_byte())*8/1024/1024/1024/allSeconds));
data.setAvgPacket(lf.format(Long.parseLong(data.get_packet())/allSeconds));
}
}

View File

@@ -352,7 +352,7 @@ public class TrafficStatisticsInfoController extends BaseController {
m.put("linkNum", lf.format(m.get("linkNum")));
double avgPacket=Double.parseDouble(m.get("packets").toString())/allSeconds;
m.put("pps",lf.format(avgPacket));
double avgByte=Double.parseDouble(m.get("GByte").toString())/allSeconds;
double avgByte=Double.parseDouble(m.get("GByte").toString())*8/allSeconds;
m.put("bps",f.format(avgByte));
totalLink+=Long.parseLong( m.get("linkNum").toString());
totalPackets+=Long.parseLong(m.get("packets").toString());
@@ -442,7 +442,7 @@ public class TrafficStatisticsInfoController extends BaseController {
double avgPacket=Double.parseDouble(m.get("packets").toString())/allSeconds;
m.put("pps",lf.format(avgPacket));
double avgByte=Double.parseDouble(m.get("GByte").toString())/allSeconds;
double avgByte=Double.parseDouble(m.get("GByte").toString())*8/allSeconds;
m.put("bps",f.format(avgByte));
}
for (Object object : list) {
@@ -553,7 +553,7 @@ public class TrafficStatisticsInfoController extends BaseController {
for(Map m:list) {
double avgPacket=Double.parseDouble(m.get("pktNum").toString())/allSeconds;
m.put("pps",dl.format(avgPacket));
double avgByte=Double.parseDouble(m.get("byteNum").toString())/1024/1024/1024/allSeconds;
double avgByte=Double.parseDouble(m.get("byteNum").toString())*8/1024/1024/1024/allSeconds;
m.put("bps",f.format(avgByte));
}
}
@@ -673,7 +673,7 @@ public class TrafficStatisticsInfoController extends BaseController {
double avgPacket=Double.parseDouble(m.get("pktCount").toString())/allSeconds;
m.put("pps",dl.format(avgPacket));
double avgByte=Double.parseDouble(m.get("byteCount").toString())/1024/1024/1024/allSeconds;
double avgByte=Double.parseDouble(m.get("byteCount").toString())*8/1024/1024/1024/allSeconds;
m.put("bps",f.format(avgByte));
}
List<WebsiteDomainTopic> codeList = appCfgService.getDomainDict(new WebsiteDomainTopic());
@@ -756,7 +756,7 @@ public class TrafficStatisticsInfoController extends BaseController {
totalGByte+=Double.parseDouble(lf.format(m.get("count")));
double avgPacket=Double.parseDouble(m.get("packets").toString())/allSeconds;
m.put("pps",lf.format(avgPacket));
double avgByte=Double.parseDouble(m.get("count").toString())/1024/1024/1024/allSeconds;
double avgByte=Double.parseDouble(m.get("count").toString())*8/1024/1024/1024/allSeconds;
m.put("bps",f.format(avgByte));
m.remove("domainData");
Double value1=0d;

View File

@@ -1490,4 +1490,5 @@ endTime=End Time
single=Single
everyDay=Every Day
everyWeek=Every Week
everyMonth=Every Month
everyMonth=Every Month
validate_error=Unexpected error occurred while validating

View File

@@ -1494,4 +1494,5 @@ endTime=\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C
single=\u041E\u0434\u043D\u043E\u043A\u0440\u0430\u0442\u043D\u043E
everyDay=\u0415\u0436\u0435\u0434\u043D\u0435\u0432\u043D\u043E
everyWeek=\u0415\u0436\u0435\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u043E
everyMonth=\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u043E
everyMonth=\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u043E
validate_error=Unexpected error occurred while validating

View File

@@ -1490,4 +1490,5 @@ endTime=\u7ED3\u675F\u65F6\u95F4
single=\u5355\u6B21
everyDay=\u6BCF\u5929
everyWeek=\u6BCF\u5468
everyMonth=\u6BCF\u6708
everyMonth=\u6BCF\u6708
validate_error=\u9A8C\u8BC1\u65F6\u53D1\u751F\u610F\u5916\u9519\u8BEF

View File

@@ -243,7 +243,7 @@
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
</div>
<input id="searchFoundStartTime" name="searchFoundStartTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="${log.searchFoundStartTime}" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setEndTimeByFormat('#searchFoundStartTime','#searchFoundEndTime',1,'d','yyyy-MM-dd hh:mm:ss',false,'yyyy-MM-dd hh')"/>
value="${log.searchFoundStartTime}" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setStartTimeByFormat('#searchFoundStartTime','#searchFoundEndTime',1,'d','yyyy-MM-dd hh:mm:ss',false,'yyyy-MM-dd hh')"/>
</div>
</div>
<div class="pull-left">