Authored by htoooth

fix

... ... @@ -111,7 +111,6 @@
retrieve: true,
responsive: true,
searching: true,
ajax: ajaxUrl(),
dataSrc: 'data',
pageLength: 25,
deferLoading: 0,
... ... @@ -122,12 +121,12 @@
{data: 'reqID'},
{data: 'uid'},
{data: 'udid'},
{data: 'code'},
{data: 'message'},
{data: 'script'},
{data: 'code', defaultContent: '无'},
{data: 'message', defaultContent: '无'},
{data: 'script', defaultContent: '无'},
{data: 'line'},
{data: 'column'},
{data: 'stack'}
{data: 'stack', defaultContent: '无'}
],
data: [{
time: "",
... ... @@ -146,6 +145,10 @@
columnDefs: [
{
render: function(data, type, row) {
if (!data) {
return '';
}
return moment(data).format('YYYY/MM/DD HH:MM:ss');
},
targets: 0
... ...
... ... @@ -144,14 +144,28 @@
count: 0,
mean: 0,
length: 0,
detail: ''
detail: []
}],
order: [[ 2, "desc" ]],
columnDefs: [ {
targets: -1,
data: null,
render: function ( data, type, row ) {
return '<button data-toggle="modal" data-target="#myModal">查看</button>';
if (data.length) {
return '<button data-toggle="modal" data-target="#myModal">查看</button>';
} else {
return '—';
}
},
}, {
targets: -2,
data: null,
render: function ( data, type, row ) {
if (data) {
return data;
} else {
return '—';
}
},
}]
});
... ...