日志string类型字段过长特殊字符处理,修改string工具类型对null处理
This commit is contained in:
@@ -473,10 +473,9 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String stringFormat(String str,int len){
|
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 "";
|
return "";
|
||||||
}else{
|
}
|
||||||
|
|
||||||
|
|
||||||
str = Encodes.escapeHtml(str);
|
str = Encodes.escapeHtml(str);
|
||||||
if(len!=-1){
|
if(len!=-1){
|
||||||
@@ -499,5 +498,4 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
|||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,7 +203,9 @@ $(document).ready(function(){
|
|||||||
<td>${log.foundTime}</td>
|
<td>${log.foundTime}</td>
|
||||||
<td>${log.entranceId}</td>
|
<td>${log.entranceId}</td>
|
||||||
|
|
||||||
<td>${log.appLabel}</td>
|
<td title="${fns:escapeHtml(log.appLabel)}">
|
||||||
|
${fns:stringFormat(log.appLabel,30)}
|
||||||
|
</td>
|
||||||
<td>${log.c2sPktNum}</td>
|
<td>${log.c2sPktNum}</td>
|
||||||
<td>${log.s2cPktNum}</td>
|
<td>${log.s2cPktNum}</td>
|
||||||
<td>${log.c2sByteNum}</td>
|
<td>${log.c2sByteNum}</td>
|
||||||
@@ -231,7 +233,9 @@ $(document).ready(function(){
|
|||||||
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td>${log.addrList}</td>
|
<td title="${fns:escapeHtml(log.addrList)}">
|
||||||
|
${fns:stringFormat(log.addrList,30)}
|
||||||
|
</td>
|
||||||
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
||||||
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -217,7 +217,9 @@ $(document).ready(function(){
|
|||||||
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td>${log.addrList}</td>
|
<td title="${fns:escapeHtml(log.addrList)}">
|
||||||
|
${fns:stringFormat(log.addrList,30)}
|
||||||
|
</td>
|
||||||
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
||||||
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -237,7 +237,9 @@ $(document).ready(function(){
|
|||||||
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td>${log.addrList}</td>
|
<td title="${fns:escapeHtml(log.addrList)}">
|
||||||
|
${fns:stringFormat(log.addrList,30)}
|
||||||
|
</td>
|
||||||
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
||||||
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -206,7 +206,10 @@ $(document).ready(function(){
|
|||||||
${fn:substring(log.ftpUrl,0,20) }
|
${fn:substring(log.ftpUrl,0,20) }
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>${log.ftpContent}</td>
|
|
||||||
|
<td title="${fns:escapeHtml(log.ftpContent)}">
|
||||||
|
${fns:stringFormat(log.ftpContent,30)}
|
||||||
|
</td>
|
||||||
|
|
||||||
<td>${log.capIp}</td>
|
<td>${log.capIp}</td>
|
||||||
<td>${log.transProto}</td>
|
<td>${log.transProto}</td>
|
||||||
|
|||||||
@@ -228,7 +228,9 @@ $(document).ready(function(){
|
|||||||
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td>${log.addrList}</td>
|
<td title="${fns:escapeHtml(log.addrList)}">
|
||||||
|
${fns:stringFormat(log.addrList,30)}
|
||||||
|
</td>
|
||||||
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
||||||
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -193,8 +193,12 @@
|
|||||||
<td>${_log.entranceId }</td>
|
<td>${_log.entranceId }</td>
|
||||||
|
|
||||||
<td>${_log.mailProto }</td>
|
<td>${_log.mailProto }</td>
|
||||||
<td>${_log.mailFrom }</td>
|
<td title="${fns:escapeHtml(_log.mailFrom)}">
|
||||||
<td>${_log.mailTo }</td>
|
${fns:stringFormat(_log.mailFrom,30)}
|
||||||
|
</td>
|
||||||
|
<td title="${fns:escapeHtml(_log.mailTo)}">
|
||||||
|
${fns:stringFormat(_log.mailTo,30)}
|
||||||
|
</td>
|
||||||
<td>${_log.subject }</td>
|
<td>${_log.subject }</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="http://${_log.emlFile}" data-original-title="http://${_log.emlFile}" target="_blank"
|
<a href="http://${_log.emlFile}" data-original-title="http://${_log.emlFile}" target="_blank"
|
||||||
@@ -229,7 +233,9 @@
|
|||||||
<c:if test="${streamType.itemCode eq _log.streamDir}">${streamType.itemValue}</c:if>
|
<c:if test="${streamType.itemCode eq _log.streamDir}">${streamType.itemValue}</c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td>${_log.addrList }</td>
|
<td title="${fns:escapeHtml(_log.addrList)}">
|
||||||
|
${fns:stringFormat(_log.addrList,30)}
|
||||||
|
</td>
|
||||||
<td title="${_log.serverLocate}">${fns:abbr(_log.serverLocate,20)}</td>
|
<td title="${_log.serverLocate}">${fns:abbr(_log.serverLocate,20)}</td>
|
||||||
<td title="${_log.clientLocate}">${fns:abbr(_log.clientLocate,20)}</td>
|
<td title="${_log.clientLocate}">${fns:abbr(_log.clientLocate,20)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -214,7 +214,9 @@ $(document).ready(function(){
|
|||||||
http://${fn:substring(log.logUri,0,20) }
|
http://${fn:substring(log.logUri,0,20) }
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>${log.refer}</td>
|
<td title="${fns:escapeHtml(log.refer)}">
|
||||||
|
${fns:stringFormat(log.refer,30)}
|
||||||
|
</td>
|
||||||
<td>${log.level}</td>
|
<td>${log.level}</td>
|
||||||
<!--0:动态黑名单FD;1:静态配置FD;2:首次分析命中 -->
|
<!--0:动态黑名单FD;1:静态配置FD;2:首次分析命中 -->
|
||||||
<td>
|
<td>
|
||||||
@@ -246,7 +248,9 @@ $(document).ready(function(){
|
|||||||
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td>${log.addrList}</td>
|
<td title="${fns:escapeHtml(log.addrList)}">
|
||||||
|
${fns:stringFormat(log.addrList,30)}
|
||||||
|
</td>
|
||||||
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
||||||
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -214,7 +214,9 @@ $(document).ready(function(){
|
|||||||
http://${fn:substring(log.logUri,0,20) }
|
http://${fn:substring(log.logUri,0,20) }
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>${log.refer}</td>
|
<td title="${fns:escapeHtml(log.refer)}">
|
||||||
|
${fns:stringFormat(log.refer,30)}
|
||||||
|
</td>
|
||||||
<td>${log.level}</td>
|
<td>${log.level}</td>
|
||||||
<!--0:动态黑名单FD;1:静态配置FD;2:首次分析命中 -->
|
<!--0:动态黑名单FD;1:静态配置FD;2:首次分析命中 -->
|
||||||
<td>
|
<td>
|
||||||
@@ -246,7 +248,9 @@ $(document).ready(function(){
|
|||||||
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td>${log.addrList}</td>
|
<td title="${fns:escapeHtml(log.addrList)}">
|
||||||
|
${fns:stringFormat(log.addrList,30)}
|
||||||
|
</td>
|
||||||
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
||||||
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -214,8 +214,12 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
<td>${log.duation}</td>
|
<td>${log.duation}</td>
|
||||||
<td>${log.voipProtocol}</td>
|
<td>${log.voipProtocol}</td>
|
||||||
<td>${log.callingAccount}</td>
|
<td title="${fns:escapeHtml(log.callingAccount)}">
|
||||||
<td>${log.calledAccount}</td>
|
${fns:stringFormat(log.callingAccount,30)}
|
||||||
|
</td>
|
||||||
|
<td title="${fns:escapeHtml(log.calledAccount)}">
|
||||||
|
${fns:stringFormat(log.calledAccount,30)}
|
||||||
|
</td>
|
||||||
<td>${log.callingNumber}</td>
|
<td>${log.callingNumber}</td>
|
||||||
<td>${log.calledNumber}</td>
|
<td>${log.calledNumber}</td>
|
||||||
<td>${log.fromToStoreIp}</td>
|
<td>${log.fromToStoreIp}</td>
|
||||||
@@ -259,7 +263,9 @@ $(document).ready(function(){
|
|||||||
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td>${log.addrList}</td>
|
<td title="${fns:escapeHtml(log.addrList)}">
|
||||||
|
${fns:stringFormat(log.addrList,30)}
|
||||||
|
</td>
|
||||||
<td>${log.serverLocate}</td>
|
<td>${log.serverLocate}</td>
|
||||||
<td>${log.clientLocate}</td>
|
<td>${log.clientLocate}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -214,8 +214,12 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
<td>${log.duation}</td>
|
<td>${log.duation}</td>
|
||||||
<td>${log.voipProtocol}</td>
|
<td>${log.voipProtocol}</td>
|
||||||
<td>${log.callingAccount}</td>
|
<td title="${fns:escapeHtml(log.callingAccount)}">
|
||||||
<td>${log.calledAccount}</td>
|
${fns:stringFormat(log.callingAccount,30)}
|
||||||
|
</td>
|
||||||
|
<td title="${fns:escapeHtml(log.calledAccount)}">
|
||||||
|
${fns:stringFormat(log.calledAccount,30)}
|
||||||
|
</td>
|
||||||
<td>${log.callingNumber}</td>
|
<td>${log.callingNumber}</td>
|
||||||
<td>${log.calledNumber}</td>
|
<td>${log.calledNumber}</td>
|
||||||
<td>${log.fromToStoreIp}</td>
|
<td>${log.fromToStoreIp}</td>
|
||||||
@@ -259,7 +263,9 @@ $(document).ready(function(){
|
|||||||
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td>${log.addrList}</td>
|
<td title="${fns:escapeHtml(log.addrList)}">
|
||||||
|
${fns:stringFormat(log.addrList,30)}
|
||||||
|
</td>
|
||||||
<td>${log.serverLocate}</td>
|
<td>${log.serverLocate}</td>
|
||||||
<td>${log.clientLocate}</td>
|
<td>${log.clientLocate}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -224,8 +224,12 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
<td>${log.duation}</td>
|
<td>${log.duation}</td>
|
||||||
<td>${log.voipProtocol}</td>
|
<td>${log.voipProtocol}</td>
|
||||||
<td>${log.callingAccount}</td>
|
<td title="${fns:escapeHtml(log.callingAccount)}">
|
||||||
<td>${log.calledAccount}</td>
|
${fns:stringFormat(log.callingAccount,30)}
|
||||||
|
</td>
|
||||||
|
<td title="${fns:escapeHtml(log.calledAccount)}">
|
||||||
|
${fns:stringFormat(log.calledAccount,30)}
|
||||||
|
</td>
|
||||||
<td>${log.callingNumber}</td>
|
<td>${log.callingNumber}</td>
|
||||||
<td>${log.calledNumber}</td>
|
<td>${log.calledNumber}</td>
|
||||||
<td>${log.fromToStoreIp}</td>
|
<td>${log.fromToStoreIp}</td>
|
||||||
@@ -265,7 +269,9 @@ $(document).ready(function(){
|
|||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td>${log.capIp}</td>
|
<td>${log.capIp}</td>
|
||||||
<td>${log.addrList}</td>
|
<td title="${fns:escapeHtml(log.addrList)}">
|
||||||
|
${fns:stringFormat(log.addrList,30)}
|
||||||
|
</td>
|
||||||
<td>${log.userRegion}</td>
|
<td>${log.userRegion}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
|
|||||||
@@ -202,8 +202,12 @@ $(document).ready(function(){
|
|||||||
<td>${log.foundTime}</td>
|
<td>${log.foundTime}</td>
|
||||||
<td>${log.entranceId}</td>
|
<td>${log.entranceId}</td>
|
||||||
|
|
||||||
<td>${log.version}</td>
|
<td title="${fns:escapeHtml(log.version)}">
|
||||||
<td>${log.encryptMode}</td>
|
${fns:stringFormat(log.version,30)}
|
||||||
|
</td>
|
||||||
|
<td title="${fns:escapeHtml(log.encryptMode)}">
|
||||||
|
${fns:stringFormat(log.encryptMode,30)}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<c:if test="${log.hmac==0}"><spring:message code="no"/></c:if>
|
<c:if test="${log.hmac==0}"><spring:message code="no"/></c:if>
|
||||||
<c:if test="${log.hmac==1}"><spring:message code="yes"/></c:if>
|
<c:if test="${log.hmac==1}"><spring:message code="yes"/></c:if>
|
||||||
@@ -235,7 +239,9 @@ $(document).ready(function(){
|
|||||||
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td>${log.addrList}</td>
|
<td title="${fns:escapeHtml(log.addrList)}">
|
||||||
|
${fns:stringFormat(log.addrList,30)}
|
||||||
|
</td>
|
||||||
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
||||||
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -204,17 +204,21 @@ $(document).ready(function(){
|
|||||||
<td>${log.foundTime}</td>
|
<td>${log.foundTime}</td>
|
||||||
<td>${log.entranceId}</td>
|
<td>${log.entranceId}</td>
|
||||||
|
|
||||||
<td>${log.version}</td>
|
<td title="${fns:escapeHtml(log.version)}">
|
||||||
<td>${log.hostKey}</td>
|
${fns:stringFormat(log.version,30)}
|
||||||
<td>
|
</td>
|
||||||
<%-- ${log.hostCookie} --%>
|
<td title="${fns:escapeHtml(log.hostKey)}">
|
||||||
<a href="javascript:;" data-original-title="${log.hostCookie}"
|
${fns:stringFormat(log.hostKey,30)}
|
||||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
</td>
|
||||||
${fns:abbr(log.hostCookie,20)}
|
<td title="${fns:escapeHtml(log.hostCookie)}">
|
||||||
</a>
|
${fns:stringFormat(log.hostCookie,30)}
|
||||||
|
</td>
|
||||||
|
<td title="${fns:escapeHtml(log.encryptMode)}">
|
||||||
|
${fns:stringFormat(log.encryptMode,30)}
|
||||||
|
</td>
|
||||||
|
<td title="${fns:escapeHtml(log.mac)}">
|
||||||
|
${fns:stringFormat(log.mac,30)}
|
||||||
</td>
|
</td>
|
||||||
<td>${log.encryptMode}</td>
|
|
||||||
<td>${log.mac}</td>
|
|
||||||
<td>
|
<td>
|
||||||
<c:if test="${log.tunnelType==1}">SSH</c:if>
|
<c:if test="${log.tunnelType==1}">SSH</c:if>
|
||||||
<c:if test="${log.tunnelType==2}">SSHD</c:if>
|
<c:if test="${log.tunnelType==2}">SSHD</c:if>
|
||||||
@@ -243,7 +247,9 @@ $(document).ready(function(){
|
|||||||
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
<c:if test="${log.streamDir==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
<td>${log.addrList}</td>
|
<td title="${fns:escapeHtml(log.addrList)}">
|
||||||
|
${fns:stringFormat(log.addrList,30)}
|
||||||
|
</td>
|
||||||
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
<td title="${log.serverLocate}">${fns:abbr(log.serverLocate,20)}</td>
|
||||||
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
<td title="${log.clientLocate}">${fns:abbr(log.clientLocate,20)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user