diff --git a/src/main/java/com/nis/util/StringUtils.java b/src/main/java/com/nis/util/StringUtils.java index cb573f28f..b0c8d4f30 100644 --- a/src/main/java/com/nis/util/StringUtils.java +++ b/src/main/java/com/nis/util/StringUtils.java @@ -473,11 +473,10 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils { } public static String stringFormat(String str,int len){ - if(str.trim().equals("null")||str==null){ + if(str==null||str.trim().equals("")||str.trim().equals("null")){ return ""; - }else{ + } - str = Encodes.escapeHtml(str); if(len!=-1){ try { @@ -499,5 +498,4 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils { } return str; } - } } diff --git a/src/main/webapp/WEB-INF/views/log/manipulation/dkBehaviorList.jsp b/src/main/webapp/WEB-INF/views/log/manipulation/dkBehaviorList.jsp index bc939823a..0581db4dc 100644 --- a/src/main/webapp/WEB-INF/views/log/manipulation/dkBehaviorList.jsp +++ b/src/main/webapp/WEB-INF/views/log/manipulation/dkBehaviorList.jsp @@ -203,7 +203,9 @@ $(document).ready(function(){ ${log.foundTime} ${log.entranceId} - ${log.appLabel} + + ${fns:stringFormat(log.appLabel,30)} + ${log.c2sPktNum} ${log.s2cPktNum} ${log.c2sByteNum} @@ -231,7 +233,9 @@ $(document).ready(function(){ - ${log.addrList} + + ${fns:stringFormat(log.addrList,30)} + ${fns:abbr(log.serverLocate,20)} ${fns:abbr(log.clientLocate,20)} diff --git a/src/main/webapp/WEB-INF/views/log/ntc/appList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/appList.jsp index 73be41f9d..4b13aae38 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/appList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/appList.jsp @@ -217,7 +217,9 @@ $(document).ready(function(){ - ${log.addrList} + + ${fns:stringFormat(log.addrList,30)} + ${fns:abbr(log.serverLocate,20)} ${fns:abbr(log.clientLocate,20)} diff --git a/src/main/webapp/WEB-INF/views/log/ntc/ddosList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/ddosList.jsp index 2eb58cfe4..39a1cfece 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/ddosList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/ddosList.jsp @@ -237,7 +237,9 @@ $(document).ready(function(){ - ${log.addrList} + + ${fns:stringFormat(log.addrList,30)} + ${fns:abbr(log.serverLocate,20)} ${fns:abbr(log.clientLocate,20)} diff --git a/src/main/webapp/WEB-INF/views/log/ntc/ftpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/ftpList.jsp index 586aceb47..ec733d436 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/ftpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/ftpList.jsp @@ -206,7 +206,10 @@ $(document).ready(function(){ ${fn:substring(log.ftpUrl,0,20) } - ${log.ftpContent} + + + ${fns:stringFormat(log.ftpContent,30)} + ${log.capIp} ${log.transProto} diff --git a/src/main/webapp/WEB-INF/views/log/ntc/ipsecList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/ipsecList.jsp index d8b5c8e22..25fc976fe 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/ipsecList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/ipsecList.jsp @@ -228,7 +228,9 @@ $(document).ready(function(){ - ${log.addrList} + + ${fns:stringFormat(log.addrList,30)} + ${fns:abbr(log.serverLocate,20)} ${fns:abbr(log.clientLocate,20)} diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mailList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mailList.jsp index e5edbf8cc..aed0ef4e5 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mailList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mailList.jsp @@ -193,8 +193,12 @@ ${_log.entranceId } ${_log.mailProto } - ${_log.mailFrom } - ${_log.mailTo } + + ${fns:stringFormat(_log.mailFrom,30)} + + + ${fns:stringFormat(_log.mailTo,30)} + ${_log.subject } ${streamType.itemValue} - ${_log.addrList } + + ${fns:stringFormat(_log.addrList,30)} + ${fns:abbr(_log.serverLocate,20)} ${fns:abbr(_log.clientLocate,20)} diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp index a62cb07e5..9fbbd216b 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp @@ -214,7 +214,9 @@ $(document).ready(function(){ http://${fn:substring(log.logUri,0,20) } - ${log.refer} + + ${fns:stringFormat(log.refer,30)} + ${log.level} @@ -246,7 +248,9 @@ $(document).ready(function(){ - ${log.addrList} + + ${fns:stringFormat(log.addrList,30)} + ${fns:abbr(log.serverLocate,20)} ${fns:abbr(log.clientLocate,20)} diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp index b9683c774..32b935175 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp @@ -214,7 +214,9 @@ $(document).ready(function(){ http://${fn:substring(log.logUri,0,20) } - ${log.refer} + + ${fns:stringFormat(log.refer,30)} + ${log.level} @@ -246,7 +248,9 @@ $(document).ready(function(){ - ${log.addrList} + + ${fns:stringFormat(log.addrList,30)} + ${fns:abbr(log.serverLocate,20)} ${fns:abbr(log.clientLocate,20)} diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp index 46b33bbe2..34f7f308b 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp @@ -214,8 +214,12 @@ $(document).ready(function(){ ${log.duation} ${log.voipProtocol} - ${log.callingAccount} - ${log.calledAccount} + + ${fns:stringFormat(log.callingAccount,30)} + + + ${fns:stringFormat(log.calledAccount,30)} + ${log.callingNumber} ${log.calledNumber} ${log.fromToStoreIp} @@ -259,7 +263,9 @@ $(document).ready(function(){ - ${log.addrList} + + ${fns:stringFormat(log.addrList,30)} + ${log.serverLocate} ${log.clientLocate} diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp index 01a9c1831..d63dc7594 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp @@ -214,8 +214,12 @@ $(document).ready(function(){ ${log.duation} ${log.voipProtocol} - ${log.callingAccount} - ${log.calledAccount} + + ${fns:stringFormat(log.callingAccount,30)} + + + ${fns:stringFormat(log.calledAccount,30)} + ${log.callingNumber} ${log.calledNumber} ${log.fromToStoreIp} @@ -259,7 +263,9 @@ $(document).ready(function(){ - ${log.addrList} + + ${fns:stringFormat(log.addrList,30)} + ${log.serverLocate} ${log.clientLocate} diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipList.jsp index 73df3d23a..be7597d88 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipList.jsp @@ -224,8 +224,12 @@ $(document).ready(function(){ ${log.duation} ${log.voipProtocol} - ${log.callingAccount} - ${log.calledAccount} + + ${fns:stringFormat(log.callingAccount,30)} + + + ${fns:stringFormat(log.calledAccount,30)} + ${log.callingNumber} ${log.calledNumber} ${log.fromToStoreIp} @@ -265,7 +269,9 @@ $(document).ready(function(){ ${log.capIp} - ${log.addrList} + + ${fns:stringFormat(log.addrList,30)} + ${log.userRegion} diff --git a/src/main/webapp/WEB-INF/views/log/ntc/openVpnList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/openVpnList.jsp index 560ea74d5..4dd5c0c6d 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/openVpnList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/openVpnList.jsp @@ -202,8 +202,12 @@ $(document).ready(function(){ ${log.foundTime} ${log.entranceId} - ${log.version} - ${log.encryptMode} + + ${fns:stringFormat(log.version,30)} + + + ${fns:stringFormat(log.encryptMode,30)} + @@ -235,7 +239,9 @@ $(document).ready(function(){ - ${log.addrList} + + ${fns:stringFormat(log.addrList,30)} + ${fns:abbr(log.serverLocate,20)} ${fns:abbr(log.clientLocate,20)} diff --git a/src/main/webapp/WEB-INF/views/log/ntc/sshList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/sshList.jsp index a27a33a13..bd2f2486b 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/sshList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/sshList.jsp @@ -204,17 +204,21 @@ $(document).ready(function(){ ${log.foundTime} ${log.entranceId} - ${log.version} - ${log.hostKey} - - <%-- ${log.hostCookie} --%> - - ${fns:abbr(log.hostCookie,20)} - + + ${fns:stringFormat(log.version,30)} + + + ${fns:stringFormat(log.hostKey,30)} + + + ${fns:stringFormat(log.hostCookie,30)} + + + ${fns:stringFormat(log.encryptMode,30)} + + + ${fns:stringFormat(log.mac,30)} - ${log.encryptMode} - ${log.mac} SSH SSHD @@ -243,7 +247,9 @@ $(document).ready(function(){ - ${log.addrList} + + ${fns:stringFormat(log.addrList,30)} + ${fns:abbr(log.serverLocate,20)} ${fns:abbr(log.clientLocate,20)}