修改日志列宽度,详情宽度

This commit is contained in:
zhanghongqing
2018-08-27 21:16:47 +08:00
parent 18bfc299e4
commit 2fac813097
2 changed files with 18 additions and 39 deletions

View File

@@ -1,16 +1,4 @@
$(function(){
//扩展jquery增加全局函数
$.ipcommon=function(){
return {};
}
$.extend($.ipcommon, {
ipType:[],
ipPattern:[],
portPattern:[],
protocol:[],
direction:[]
});
$("select[name$='isHexbin']").each(function(){
setIsHexBin(this);
});
@@ -33,9 +21,9 @@ $(function(){
text=$(element).text().trim()
}
//增加换行
var count = Math.floor(text.length/34);
var count = Math.floor(text.length/52);
for(var i=1;i<=count;i++){
text=text.substring(0,i*34-1)+"\n"+text.substring(i*34-1);
text=text.substring(0,i*52-1)+"\n"+text.substring(i*52-1);
}
//特殊字符转义
text=text.replace(/[<>&"]/g,function(c){return {'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];});
@@ -49,7 +37,7 @@ $(function(){
})
html +="</div>";
top.$.jBox(html,{height:400,width:400,title:"<i class='icon-book-open'></i> Log Info",showIcon:false,opacity:0.5});
top.$.jBox(html,{height:450,width:600,title:"<i class='icon-book-open'></i> Log Info",showIcon:false,opacity:0.5});
})
var tree2 = $("select[name=lableTest]").treeMultiselect({
searchable: true,
@@ -1465,7 +1453,6 @@ var initCommIpVal=function(){
//ip类型处理
if(ipType){
var arr=ipType.split(',');
$.ipcommon.ipType=$("select[name$='ipPattern'] option");
$("select[name$='ipType'] option").each(function(){
var has=false;
for(var type in arr){
@@ -1478,14 +1465,13 @@ var initCommIpVal=function(){
}
}
if(!has){
$(this).remove();
$(this).attr("disabled",true);
}
});
}
//ip格式处理
if(ipPattern){
arr=ipPattern.split(',');
$.ipcommon.ipPattern=$("select[name$='ipPattern'] option");
$("select[name$='ipPattern'] option").each(function(){
var has=false;
for(var type in arr){
@@ -1498,16 +1484,13 @@ var initCommIpVal=function(){
}
}
if(!has){
$(this).remove();
$(this).attr("disabled",true);
}
});
}else{
$.ipcommon.ipPattern=[];
}
//端口格式处理
if(portPattern){
arr=portPattern.split(',');
$.ipcommon.portPattern=$("select[name$='portPattern'] option");
$("select[name$='portPattern'] option").each(function(){
var has=false;
for(var type in arr){
@@ -1520,16 +1503,13 @@ var initCommIpVal=function(){
}
}
if(!has){
$(this).remove();
$(this).attr("disabled",true);
}
});
}else{
$.ipcommon.portPattern=[];
}
//方向处理
if(direction){
arr=direction.split(',');
$.ipcommon.direction=$("select[name$='direction'] option");
$("select[name$='direction'] option").each(function(){
var has=false;
for(var type in arr){
@@ -1542,16 +1522,13 @@ var initCommIpVal=function(){
}
}
if(!has){
$(this).remove();
$(this).attr("disabled",true);
}
});
}else{
$.ipcommon.direction=[];
}
//协议处理
if(protocol){
arr=protocol.split(',');
$.ipcommon.protocol=$("select[name$='protocol'] option");
$("select[name$='protocol'] option").each(function(){
var has=false;
for(var type in arr){
@@ -1564,10 +1541,8 @@ var initCommIpVal=function(){
}
}
if(!has){
$(this).remove();
$(this).attr("disabled",true);
}
});
}else{
$.ipcommon.protocol=[];
}
}